1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00
This commit is contained in:
ericgaspar 2022-01-13 10:54:43 +01:00
parent 9b3109adbd
commit d14d9b643d
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 8 additions and 10 deletions

View file

@ -7,9 +7,8 @@ name = "Navidrome configuration"
name = "Navidrome configuration"
services = ["__APP__"]
[main.config.EnableDownloads]
[main.config.enable_downloads]
ask = "Allow music download from the server?"
type = "boolean"
default = true
help = "Enable the option in the UI to download music/albums/artists/playlists from the server"
bind = ":/var/lib/navidrome/navidrome.toml"
bind = "EnableDownloads:/var/lib/navidrome/navidrome.toml"

View file

@ -27,8 +27,7 @@ architecture=$YNH_ARCH
app=$YNH_APP_INSTANCE_NAME
EnableDownloads="true"
enable_downloads="true"
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@ -48,7 +47,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=EnableDownloads --value=$EnableDownloads
ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads
#=================================================
# STANDARD MODIFICATIONS

View file

@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$YNH_ARCH
EnableDownloads=$(ynh_app_setting_get --app=$app --key=EnableDownloads)
enable_downloads=$(ynh_app_setting_get --app=$app --key=enable_downloads)
#=================================================
# CHECK VERSION
@ -58,9 +58,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "$EnableDownloads" ] ||
EnableDownloads="true"
ynh_app_setting_set --app=$app --key=EnableDownloads --value=$EnableDownloads
if [ -z "$enable_downloads" ] ||
enable_downloads="true"
ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads
fi
# Cleaning legacy permissions