mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
fix
This commit is contained in:
parent
a3a62a9548
commit
15abe050af
3 changed files with 27 additions and 0 deletions
|
@ -97,11 +97,17 @@ pushd $install_dir
|
||||||
php$phpversion artisan migrate -n --force
|
php$phpversion artisan migrate -n --force
|
||||||
php$phpversion artisan config:clear -n
|
php$phpversion artisan config:clear -n
|
||||||
php$phpversion artisan config:cache -n
|
php$phpversion artisan config:cache -n
|
||||||
|
patch -p1 < "$YNH_CWD/../conf/ffprobe.patch"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Setup custom user.css file
|
# Setup custom user.css file
|
||||||
ynh_add_config --template="../conf/user.css.example" --destination="$install_dir/public/dist/user.css"
|
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
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -52,6 +52,11 @@ then
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env public/dist/user.css"
|
ynh_setup_source --dest_dir="$install_dir" --keep=".env public/dist/user.css"
|
||||||
fi
|
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 750 "$install_dir/bootstrap/cache"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
16
sources/app-00-ffmpeg.patch
Normal file
16
sources/app-00-ffmpeg.patch
Normal 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')) ||
|
Loading…
Add table
Reference in a new issue