From 68ca2da8c1d238eb1342451cd21fb59fee291dd5 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 16 Jan 2022 19:19:07 +0100 Subject: [PATCH 1/4] Allow the app to access multimedia directories --- manifest.json | 2 +- scripts/install | 10 ++++++++++ scripts/restore | 10 ++++++++++ scripts/upgrade | 10 ++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 9a648d3..e6fd98e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Automated subtitle downloading for Sonarr and Radarr", "fr": "Téléchargement automatique de sous-titres pour Sonarr et Radarr" }, - "version": "1.0.1~ynh1", + "version": "1.0.1~ynh2", "url": "https://bazarr.media", "upstream": { "license": "GPL-3.0", diff --git a/scripts/install b/scripts/install index 3d962c9..43f7b16 100755 --- a/scripts/install +++ b/scripts/install @@ -145,6 +145,16 @@ ynh_add_config --template="config.ini" --destination="$final_path/data/config/co chmod 660 "$final_path/data/config/config.ini" chown $app: "$final_path/data/config/config.ini" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=1 + +# 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 bb03e31..1196324 100755 --- a/scripts/restore +++ b/scripts/restore @@ -98,6 +98,16 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=1 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 05e0b1a..f455546 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,6 +129,16 @@ ynh_add_config --template="config.ini" --destination="$final_path/data/config/co chmod 660 "$final_path/data/config/config.ini" chown $app: "$final_path/data/config/config.ini" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=1 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # SETUP SYSTEMD #================================================= From d9a1b38f7c9297c8810b97e36946ca276e0cbaa7 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 16 Jan 2022 19:20:41 +0100 Subject: [PATCH 2/4] Update check_process --- check_process | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index 9248db0..773d794 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,7 @@ setup_private=1 setup_public=0 upgrade=1 - #upgrade=1 from_commit=CommitHash + upgrade=1 from_commit=22445f018b70ed1a89593107afff498b672f93ad backup_restore=1 multi_instance=1 port_already_use=0 @@ -29,6 +29,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& + ; commit=22445f018b70ed1a89593107afff498b672f93ad + name=2022-01-13 v1.0.1~ynh1 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER& From 0e362cb4da76a1c1b03e920273f5da316b206533 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 16 Jan 2022 18:20:50 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index acbf9f6..b6d6f64 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download - Subtitles upgrade whenever better ones are released -**Shipped version:** 1.0.1~ynh1 +**Shipped version:** 1.0.1~ynh2 ## Screenshots -![](./doc/screenshots/example.jpg) +![](./doc/screenshots/bazarr.png) ## Disclaimers / important information diff --git a/README_fr.md b/README_fr.md index 6ecba37..6950e91 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,13 +20,13 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download - Subtitles upgrade whenever better ones are released -**Version incluse :** 1.0.1~ynh1 +**Version incluse :** 1.0.1~ynh2 ## Captures d'écran -![](./doc/screenshots/example.jpg) +![](./doc/screenshots/bazarr.png) ## Avertissements / informations importantes From 2ef0d0cb1f1851909bc4e2514797684bbe3000e1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 16 Jan 2022 22:20:40 +0100 Subject: [PATCH 4/4] Store Flask and API key and attempt to write "/" as base url instead of nothing --- conf/config.ini | 2 +- scripts/install | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/config.ini b/conf/config.ini index 95af563..bd6db84 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -1,7 +1,7 @@ [general] ip = 127.0.0.1 port = __PORT__ -base_url = __PATH__ +base_url = __PATH_URL__ path_mappings = [] debug = False branch = master diff --git a/scripts/install b/scripts/install index 43f7b16..a7a5ef7 100755 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,10 @@ ynh_systemd_action --service_name=$app --action="stop" --line_match="Bazarr exit detect_and_read_radarr_and_sonarr_settings flask_key=$(ynh_string_random --length=32) +ynh_app_setting_set --app=$app --key=flask_key --value=$flask_key + api_key=$(ynh_string_random --length=32) +ynh_app_setting_set --app=$app --key=api_key --value=$api_key ynh_add_config --template="config.ini" --destination="$final_path/data/config/config.ini"