1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00
This commit is contained in:
Éric Gaspar 2023-07-16 21:34:19 +02:00
parent a3a62a9548
commit 15abe050af
3 changed files with 27 additions and 0 deletions

View file

@ -97,11 +97,17 @@ pushd $install_dir
php$phpversion artisan migrate -n --force
php$phpversion artisan config:clear -n
php$phpversion artisan config:cache -n
patch -p1 < "$YNH_CWD/../conf/ffprobe.patch"
popd
# Setup custom user.css file
ynh_add_config --template="../conf/user.css.example" --destination="$install_dir/public/dist/user.css"
ynh_replace_string --match_string="\$ffmpeg = FFMpeg::create();" --replace_string="\$ffmpeg = FFMpeg::create(array(\
'ffmpeg.binaries' => '/usr/bin/ffmpeg',\
'ffprobe.binaries' => '/usr/bin/ffprobe',\
));" --target_file="$install_dir/app/Actions/Photo/Extensions/VideoEditing.php"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -52,6 +52,11 @@ then
ynh_setup_source --dest_dir="$install_dir" --keep=".env public/dist/user.css"
fi
ynh_replace_string --match_string="\$ffmpeg = FFMpeg::create();" --replace_string="\$ffmpeg = FFMpeg::create(array(\
'ffmpeg.binaries' => '/usr/bin/ffmpeg',\
'ffprobe.binaries' => '/usr/bin/ffprobe',\
));" --target_file="$install_dir/app/Actions/Photo/Extensions/VideoEditing.php"
chmod 750 "$install_dir/bootstrap/cache"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"

View file

@ -0,0 +1,16 @@
diff --git a/app/Actions/Photo/Extensions/VideoEditing.php b/app/Actions/Photo/Extensions/VideoEditing.php
index 1a96769..5842606 100644
--- a/app/Actions/Photo/Extensions/VideoEditing.php
+++ b/app/Actions/Photo/Extensions/VideoEditing.php
@@ -45,7 +45,10 @@ trait VideoEditing
/**
* ! check if we can use path instead of this ugly thing.
*/
- $ffmpeg = FFMpeg::create();
+ $ffmpeg = FFMpeg::create(array(
+ 'ffmpeg.binaries' => '/usr/bin/ffmpeg',
+ 'ffprobe.binaries' => '/usr/bin/ffprobe',
+ ));
/** @var Video */
$video = $ffmpeg->open(Storage::path('big/' . $photo->url));
if (!($tmp = tempnam(sys_get_temp_dir(), 'lychee')) ||