From 7c1224de448ff050f795d0b47dfafb50de7491bc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 21:52:14 +0100 Subject: [PATCH] Fix --- conf/navidrome.toml | 3 +++ config_panel.toml | 6 ++++++ scripts/install | 2 ++ scripts/upgrade | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 81172c4..f658574 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -37,6 +37,9 @@ UILoginBackgroundUrl = "" # Add a welcome message to the login screen UIWelcomeMessage = "" +# Controls whether the player in the UI will animate the album cover (rotation) +EnableCoverAnimation = "__ENABLE_ANIMATION__" + # How long Navidrome will wait before closing web ui idle sessions SessionTimeout = "24h" diff --git a/config_panel.toml b/config_panel.toml index 7d447fc..d8f46df 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -7,6 +7,12 @@ services = ["__APP__"] [main.config] name = "Configuration Options" + [main.config.enable_animation] + ask = "Enable cover animation" + type = "boolean" + help = "Controls whether the player in the UI will animate the album cover" + bind = "EnableCoverAnimation:/var/lib/navidrome/navidrome.toml" + [main.config.enable_downloads] ask = "Allow music download" type = "boolean" diff --git a/scripts/install b/scripts/install index cbd97d8..708e2b4 100644 --- a/scripts/install +++ b/scripts/install @@ -29,6 +29,7 @@ app=$YNH_APP_INSTANCE_NAME enable_downloads="true" scanner_extractor="taglib" +enable_animation="true" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -50,6 +51,7 @@ 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 +ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index e9c5c84..b85aec5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,6 +24,7 @@ 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) +enable_animation=$(ynh_app_setting_get --app=$app --key=enable_animation) #================================================= # CHECK VERSION @@ -59,6 +60,11 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if [ -z "$enable_animation" ]; then + enable_animation="true" + ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation +fi + if [ -z "$enable_downloads" ]; then enable_downloads="true" ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads