mirror of
https://github.com/YunoHost-Apps/navidrome_ynh.git
synced 2024-09-03 19:46:30 +02:00
Fix
This commit is contained in:
parent
d14d9b643d
commit
4153bab277
3 changed files with 18 additions and 2 deletions
|
@ -8,7 +8,15 @@ name = "Navidrome configuration"
|
|||
services = ["__APP__"]
|
||||
|
||||
[main.config.enable_downloads]
|
||||
ask = "Allow music download from the server?"
|
||||
ask = "Allow music download"
|
||||
type = "boolean"
|
||||
help = "Enable the option in the UI to download music/albums/artists/playlists from the server"
|
||||
bind = "EnableDownloads:/var/lib/navidrome/navidrome.toml"
|
||||
|
||||
[main.config.scanner_extractor]
|
||||
ask = "Select metadata extractor"
|
||||
type = "select"
|
||||
choices = ["taglib", "ffmpeg"]
|
||||
default = "taglib"
|
||||
help = "Select metadata extractor implementation."
|
||||
bind = "Scanner.Extractor:/var/lib/navidrome/navidrome.toml"
|
||||
|
|
|
@ -28,6 +28,7 @@ architecture=$YNH_ARCH
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
enable_downloads="true"
|
||||
scanner_extractor="taglib"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
|
@ -48,6 +49,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=enable_downloads --value=$enable_downloads
|
||||
ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
|
|
@ -23,6 +23,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
|||
architecture=$YNH_ARCH
|
||||
|
||||
enable_downloads=$(ynh_app_setting_get --app=$app --key=enable_downloads)
|
||||
scanner_extractor=$(ynh_app_setting_get --app=$app --key=scanner_extractor)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -58,11 +59,16 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [ -z "$enable_downloads" ] ||
|
||||
if [ -z "$enable_downloads" ]; then
|
||||
enable_downloads="true"
|
||||
ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads
|
||||
fi
|
||||
|
||||
if [ -z "$scanner_extractor" ]; then
|
||||
scanner_extractor="true"
|
||||
ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
|
Loading…
Add table
Reference in a new issue