diff --git a/conf/navidrome.toml b/conf/navidrome.toml index f658574..ffa96a1 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -16,6 +16,9 @@ BaseURL = "__PATH_URL__" # Configure periodic scans using “cron” syntax. To disable it altogether, set it to "" (empty string) ScanSchedule = "@every 1m30s" +# Enables transcoding configuration in the UI +EnableTranscodingConfig = "__ENABLE_TRANSCODING__" + # Size of transcoding cache. Set to 0 to disable cache TranscodingCacheSize = "150MB" @@ -35,7 +38,7 @@ EnableDownloads = "__ENABLE_DOWNLOADS__" UILoginBackgroundUrl = "" # Add a welcome message to the login screen -UIWelcomeMessage = "" +UIWelcomeMessage = "__WELCOME_MESSAGE__" # Controls whether the player in the UI will animate the album cover (rotation) EnableCoverAnimation = "__ENABLE_ANIMATION__" diff --git a/config_panel.toml b/config_panel.toml index c8361fe..1cef0dd 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -30,3 +30,17 @@ services = ["__APP__"] default = "taglib" help = "Select metadata extractor implementation" bind = "Scanner.Extractor:/var/lib/navidrome/navidrome.toml" + + [main.config.enable_transcoding] + ask = "Enable transcoding" + type = "boolean" + yes = "true" + no = "false" + help = "Enables transcoding configuration in the UI" + bind = "EnableTranscodingConfig:/var/lib/navidrome/navidrome.toml" + + [main.config.welcome_message] + ask = "Welcome message" + type = "string" + help = "Add a welcome message to the login screen" + bind = "UIWelcomeMessage:/var/lib/navidrome/navidrome.toml" diff --git a/scripts/install b/scripts/install index ef49713..695aa21 100644 --- a/scripts/install +++ b/scripts/install @@ -30,6 +30,8 @@ app=$YNH_APP_INSTANCE_NAME scanner_extractor="taglib" enable_downloads="true" enable_animation="true" +enable_transcoding="false" +welcome_message="" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -52,6 +54,8 @@ 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 +ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding +ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 02fdd2e..b7cf631 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,8 @@ 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) +enable_transcoding=$(ynh_app_setting_get --app=$app --key=enable_transcoding) +welcome_message=$(ynh_app_setting_get --app=$app --key=welcome_message) #================================================= # CHECK VERSION @@ -75,6 +77,16 @@ if [ -z "$scanner_extractor" ]; then ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor fi +if [ -z "$enable_transcoding" ]; then + enable_transcoding="false" + ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding +fi + +if [ -z "$welcome_message" ]; then + welcome_message="" + ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all