diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 4aa170f..ea3f461 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -100,3 +100,6 @@ DefaultLanguage="__LANGUAGE__" # Disable the activity panel that can hang some browsers with >100% CPU usage # See https://github.com/navidrome/navidrome/issues/1511 DevActivityPanel=false + +# Enable the Sharing feature +EnableSharing=__ENABLE_SHARING__ diff --git a/config_panel.toml b/config_panel.toml index 1cef0dd..19e0c77 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -23,6 +23,14 @@ services = ["__APP__"] 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.enable_sharing] + ask = "Enable Sharing feature" + type = "boolean" + yes = "true" + no = "false" + help = "Enable the Sharing feature" + bind = "EnableSharing:/var/lib/navidrome/navidrome.toml" + [main.config.scanner_extractor] ask = "Select metadata extractor" type = "select" diff --git a/scripts/install b/scripts/install index e50eefd..ef8edab 100644 --- a/scripts/install +++ b/scripts/install @@ -35,6 +35,7 @@ enable_downloads="true" enable_animation="true" enable_transcoding="false" welcome_message="" +enable_sharing="false" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -60,6 +61,7 @@ ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extracto ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message +ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 24282f4..b777268 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,7 @@ scanner_extractor=$(ynh_app_setting_get --app=$app --key=scanner_extractor) enable_animation=$(ynh_app_setting_get --app=$app --key=enable_animation) enable_transcoding=$(ynh_app_setting_get --app=$app --key=enable_transcoding) welcome_message=$(ynh_app_setting_get --app=$app --key=welcome_message) +enable_sharing=$(ynh_app_setting_get --app=$app --key=enable_sharing) #================================================= # CHECK VERSION @@ -100,6 +101,11 @@ if [ -z "$welcome_message" ]; then ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message fi +if [ -z "$enable_sharing" ]; then + enable_sharing="false" + ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -149,11 +155,11 @@ ynh_add_nginx_config config_path="/var/lib/$app" -# # Uncomment when there is new options added upstream -# ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" +# Uncomment when there is new options added upstream +ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" -# chmod 600 "$config_path/navidrome.toml" -# chown -R $app:$app "$config_path" +chmod 600 "$config_path/navidrome.toml" +chown -R $app:$app "$config_path" #================================================= # SETUP SYSTEMD