From 126d61d6e02fbed231c12a6a91731309210e39ce Mon Sep 17 00:00:00 2001 From: scith Date: Sat, 1 Apr 2017 20:41:34 +0200 Subject: [PATCH] YunoHost Multimedia YunoHost Multimedia: /home/yunohost.transmission and completed -> share/Torrents --- scripts/install | 9 +++++++++ scripts/upgrade | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/scripts/install b/scripts/install index 84e54d3..af1a22b 100644 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,15 @@ sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod sudo find /home/yunohost.transmission/watched -type d | while read LINE; do sudo chmod 770 "$LINE" ; done ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched" +# YunoHost multimedia +wget -qq https://github.com/YunoHost-Apps/yunohost.multimedia/archive/master.zip +unzip -qq master.zip +sudo ./yunohost.multimedia-master/script/ynh_media_build.sh +# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) +sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission" --dest="share/Torrents" +# And share completed directory +sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission/completed" --dest="share/Torrents" + # Create RPC password rpcpassword=$(ynh_string_random) ynh_app_setting_set "$app" rpcpassword "$rpcpassword" diff --git a/scripts/upgrade b/scripts/upgrade index a447713..e4d9cec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,6 +36,15 @@ if [ -z "$watchdir" ]; then ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched" fi +# YunoHost multimedia +wget -qq https://github.com/YunoHost-Apps/yunohost.multimedia/archive/master.zip +unzip -qq master.zip +sudo ./yunohost.multimedia-master/script/ynh_media_build.sh +# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) +sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission" --dest="share/Torrents" +# And share completed directory +sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission/completed" --dest="share/Torrents" + # Create RPC password if none exists if [ -z "$rpcpassword" ]; then rpcpassword=$(ynh_string_random)