From ec61512016c2ca266b43ab4967a12de70aa0bea5 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 13 Jun 2021 13:28:06 +0200 Subject: [PATCH] Integrate with YunoHost's multimedia directories --- doc/DISCLAIMER.md | 1 + doc/DISCLAIMER_fr.md | 1 + scripts/install | 10 ++++++++++ scripts/restore | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 2502870..057af7d 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,3 +1,4 @@ * Supported architectures are `arm`, `arm64`, and `amd64` * Access control is done with YunoHost's permissions system. * API (`domain.tld/path/api`) can be accessed by visitors to allow control by remote clients. +* The app uses YunoHost's multimedia directories, hence it has write access to users' and shared directories in `/home/yunohost.multimedia`. After installation, you can choose these directories to store your media. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 1e71b63..aeb69c3 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,3 +1,4 @@ * Les architectures compatibles sont `arm`, `arm64`, et `amd64` * Le contrôle de l'accès se fait avec le système de permissions de YunoHost. * L'API (`domain.tld/path/api`) est accessible aux visiteurs pour permettre le contrôle via des clients externes. +* L'application utilise les dossiers multimédia de YunoHost, elle a donc accès en écriture aux dossiers utilisateurs et communs de `/home/yunohost.multimedia`. Après installation, vous pourrez choisir ces dossiers pour y stocker vos médias. diff --git a/scripts/install b/scripts/install index bfc2beb..ca6202a 100755 --- a/scripts/install +++ b/scripts/install @@ -126,6 +126,16 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app: "$final_path" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 341b81e..11c5999 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,16 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app: "$final_path" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # SPECIFIC RESTORATION #=================================================