From 5bc2d06ba29627fc0da06fa5bdf620388bc5ce67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 25 Sep 2020 11:13:11 +0200 Subject: [PATCH] Upgrade to V.0.34.0 (#27) - Upgrade to v.0.34.0 - Set /home/yunohost.multimedia/share/Music as default folder for Media - Add more settings and comments in config file --- README.md | 14 +++++++++----- README_fr.md | 14 +++++++++----- conf/arm64.src | 4 ++-- conf/armv5.src | 4 ++-- conf/armv6.src | 4 ++-- conf/armv7.src | 4 ++-- conf/i386.src | 4 ++-- conf/navidrome.toml | 38 +++++++++++++++++++++++++++++++++++++- conf/x86-64.src | 4 ++-- manifest.json | 2 +- scripts/backup | 2 +- scripts/change_url | 4 ++-- scripts/install | 19 +++++-------------- scripts/remove | 8 ++++---- scripts/restore | 10 +++++----- scripts/upgrade | 45 +++++++-------------------------------------- 16 files changed, 92 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 7aa1e31..c4e401b 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify! +Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. -**Shipped version:** 0.33.0 +**Shipped version:** 0.34.0 ## Screenshots @@ -23,11 +23,15 @@ Navidrome is an open source web-based music collection server and streamer. It g ## Configuration -You can configure Navidrome by editing this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/). +#### Where are stored your music files -The music is to be stored in the folder `/home/yunohost.navidrome/Music`. +Your music files are stored by default in your shared [multimedia folder](https://github.com/YunoHost-Apps/yunohost.multimedia) `/home/yunohost.multimedia/share/Music`. This folder is accessible from Nextcloud with *External Storages* enabled. This will allow you to easily upload your music files to the server. -You must activate public site if you want to connect a client player to Navidrome. +You can configure an alternative path to you music files by editing the path `MusicFolder = "/home/yunohost.multimedia/share/Music"` in this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/). + +#### Client player + +You must activate *public site* if you want to connect a client player to Navidrome. ## Documentation diff --git a/README_fr.md b/README_fr.md index 0879950..63f053e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -9,9 +9,9 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble -Navidrome est un serveur et un streamer de collection de musique en ligne open source. Il vous donne la liberté d'écouter votre collection de musique à partir de n'importe quel navigateur ou appareil mobile. C'est comme votre Spotify personnel ! +Navidrome est un serveur et un streamer de collection de musique en ligne open source. Il vous donne la liberté d'écouter votre playlist à partir de n'importe quel navigateur ou appareil mobile. -**Version incluse :** 0.33.0 +**Version incluse :** 0.34.0 ## Captures d'écran @@ -23,11 +23,15 @@ Navidrome est un serveur et un streamer de collection de musique en ligne open s ## Configuration -Vous pouvez configurer Navidrome en modifiant le fichier `/var/lib/navidrome/navidrome.toml` et en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/). +#### Où stocker votre musique -La musique est à stocker dans le dossier `/home/yunohost.navidrome/Music`. +Votre musique est a stockée par default dans le [dossier multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) partagé `/home/yunohost.multimedia/share/Music`. Ce dossier, facilement accessible depuis Nextcloud avec *Stockages externes* activée, vous permettra d'*uploader* facilement vos fichiers de musique sur votre server. -Vous devez activer site public si vous souhaitez connecter un lecteur client à Navidrome. +Vous pouvez personnaliser le dossier de stockage de vos fichiers de musique en éditant le fichier de configuration `/var/lib/navidrome/navidrome.toml` et rediriger la variable `MusicFolder = "/home/yunohost.multimedia/share/Music"`. Vous pouvez également changer d'autre réglage en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/). + +#### Utilisation d'un client + +Vous devez activer *site public* si vous souhaitez connecter un lecteur client à Navidrome. ## Documentation diff --git a/conf/arm64.src b/conf/arm64.src index ffe1c5c..7ce6687 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_arm64.tar.gz -SOURCE_SUM=2ce6229395ed593d5cc4d58e4d1315c10662c21893e08904f18b3a2a52386a64 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_arm64.tar.gz +SOURCE_SUM=8674db5eec78a4133bedf41a4746584b82409811bae30ed90966abe66351ec70 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armv5.src index aff9b70..f0b8e4c 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_armv5.tar.gz -SOURCE_SUM=8f933f28cc573b94ae61c766261714fe61607db0ec577a9f5b045e1bbb2f828d +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_armv5.tar.gz +SOURCE_SUM=c9a2a06e0ba1428e603772df56c3f67343fd1ff7006cf8693d20fdc3ff96230c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index 68e3891..de8b17d 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_armv6.tar.gz -SOURCE_SUM=0c12f0588ea840b549a914872e817299e0be64c73fcf11bfe928c157ce953c29 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_armv6.tar.gz +SOURCE_SUM=e756750290cedd913a6039517eb03ee6e2ab3f5d7cb63221b4bac84922796371 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src index 28c9ffd..a7e70e6 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_armv7.tar.gz -SOURCE_SUM=5c4e6080c2c3d92042821c9e31597b2e9489ca8c6c0aed6eec9e439c6908749d +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_armv7.tar.gz +SOURCE_SUM=c1d1047319840a7bd879fd4d7613a50c021cd863ec6859f72249ac353f0ea665 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/i386.src b/conf/i386.src index 38542bc..d937ba6 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_i386.tar.gz -SOURCE_SUM=677b0a5db655dcb0cf0380b8bb0b631dddbf4125a936c7a1fe7002246e1e6b02 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_i386.tar.gz +SOURCE_SUM=9fba5e08c28fb172387b79c2125a0f777fa2c06fa6fe228b815a7b2622619613 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/navidrome.toml b/conf/navidrome.toml index fce04bf..2fb93e1 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -1,8 +1,44 @@ +# Log level. Useful for troubleshooting. Possible values: error, info, debug, trace LogLevel = "INFO" + +# IP address the server will bind to Address = "127.0.0.1" + +# HTTP port Navidrome will use Port = "__PORT__" + +# Base URL (only the path part) to configure Navidrome behind a proxy (ex: /music) BaseURL = "__PATH_URL__" + +# How frequently to scan for changes in your music library. Set it to 0 to disable scans ScanInterval = "90s" + +# Size of transcoding cache. Set to 0 to disable cache TranscodingCacheSize = "150MiB" + +# Folder to store application data (DB, cache…) DataFolder = "__CONFIG_PATH__" -MusicFolder = "/home/yunohost.navidrome/Music" + +# Folder where your music library is stored. Can be read-only +MusicFolder = "/home/yunohost.multimedia/share/Music" + +# How long Navidrome will wait before closing web ui idle sessions +SessionTimeout = "24h" + +# Set JPEG quality percentage for resized cover art images +CoverJpegQuality = "75" + +#Configure the order to look for cover art images. Use special embedded value to get embedded images from the audio files +CoverArtPriority = "embedded, cover.*, folder.*, front.*" + +# Match query strings anywhere in searchable fields, not only in word boundaries. Useful for languages where words are not space separated +SearchFullString = "false" + +# List of ignored articles when sorting/indexing artists +IgnoredArticles = "The El La Los Las Le Les Os As O A" + +# Enable/disable .m3u playlist auto-import +AutoImportPlaylists = "true" + +# The default metadata extractor is still ffmpeg but you can use the new taglib extractor +Scanner.Extractor = "taglib" diff --git a/conf/x86-64.src b/conf/x86-64.src index ff0e797..8871498 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.33.0/navidrome_0.33.0_Linux_x86_64.tar.gz -SOURCE_SUM=fbec1addab0bf4d471e334358682ed50ad9452185e738de8607b1eddc019fc90 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.34.0/navidrome_0.34.0_Linux_x86_64.tar.gz +SOURCE_SUM=d2b75a9a19ba9b34b230753cbfa3a93549acb7126f81fad49da6a454fcb841f2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 6036bbc..028cd5f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.33.0~ynh1", + "version": "0.34.0~ynh1", "url": "https://github.com/deluan/navidrome/", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/backup b/scripts/backup index 5b83cfc..ca6fc22 100644 --- a/scripts/backup +++ b/scripts/backup @@ -64,4 +64,4 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for Navidrome. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 923adc9..1a815e9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=1 +ynh_script_progression --message="Backing up Navidrome before changing its URL..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -139,4 +139,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for Navidrome" --last diff --git a/scripts/install b/scripts/install index b86da5e..3bf61b2 100644 --- a/scripts/install +++ b/scripts/install @@ -91,20 +91,15 @@ ynh_setup_source --dest_dir=$final_path --source_id="$architecture" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=3 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #================================================= -ynh_script_progression --message="Adding multimedia directories..." --weight=5 - -mkdir -p /home/yunohost.$app/Music +ynh_script_progression --message="Adding multimedia directories..." --weight=2 ynh_multimedia_build_main_dir -ynh_multimedia_addfolder --source_dir="/home/yunohost.$app/Music" --dest_dir="share/Music" #================================================= # MODIFY A CONFIG FILE @@ -142,12 +137,8 @@ ynh_add_systemd_config ynh_script_progression --message="Securing files and directories..." --weight=1 # Set permissions to app files -chown -R $app:$app "$final_path" -chown -R $app:$app "$config_path" - -# Set permissions to media files -chown -R $app:www-data /home/yunohost.$app/ -chmod -R 764 /home/yunohost.$app +chown -R $app: "$final_path" +chown -R $app: "$config_path" #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -186,4 +177,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of Navidrome completed" --last diff --git a/scripts/remove b/scripts/remove index c1a3d15..4ab94ad 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service..." --weight=1 @@ -52,7 +52,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing $app main directory..." --weight=6 +ynh_script_progression --message="Removing Navidrome main directory..." --weight=6 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -60,7 +60,7 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE APP CONFIG DIR #================================================= -ynh_script_progression --message="Removing $app config directory..." --weight=6 +ynh_script_progression --message="Removing Navidrome config directory..." --weight=6 # Remove the config directory securely ynh_secure_remove --file="/var/lib/$app" @@ -87,4 +87,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of Navidrome completed" --last diff --git a/scripts/restore b/scripts/restore index 9d2faec..6d34123 100644 --- a/scripts/restore +++ b/scripts/restore @@ -52,14 +52,14 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring $app main directory..." --weight=4 +ynh_script_progression --message="Restoring Navidrome main directory..." --weight=4 ynh_restore_file --origin_path="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring $app config directory..." --weight=2 +ynh_script_progression --message="Restoring Navidrome config directory..." --weight=2 ynh_restore_file --origin_path="/var/lib/$app" @@ -77,8 +77,8 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chown -R $app:$app "$final_path" -chown -R $app:$app "/var/lib/$app" +chown -R $app: "$final_path" +chown -R $app: "/var/lib/$app" #================================================= # SPECIFIC RESTORATION @@ -125,4 +125,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for Navidrome" --last diff --git a/scripts/upgrade b/scripts/upgrade index fe9d1aa..b2a525e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,7 +33,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=4 +ynh_script_progression --message="Backing up Navidrome before upgrading..." --weight=4 # Backup the current version of the app ynh_backup_before_upgrade @@ -62,7 +62,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # # Create a temporary directory - # tmpdir="$(mktemp -d)" + #tmpdir="$(mktemp -d)" # # Backup the config file in the temp dir # cp -a "/var/lib/$app/navidrome.toml" "$tmpdir/navidrome.toml" @@ -102,40 +102,13 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# YUNOHOST MULTIMEDIA INTEGRATION -#================================================= -ynh_script_progression --message="Adding multimedia directories..." --weight=5 - -mkdir -p /home/yunohost.$app/Music - -ynh_multimedia_build_main_dir -ynh_multimedia_addfolder --source_dir="/home/yunohost.$app/Music" --dest_dir="share/Music" - -#================================================= -# MODIFY A CONFIG FILE -#================================================= -# ynh_script_progression --message="Modifying a config file..." - -config_path="/var/lib/$app" -# mkdir -p "$config_path" - -# ynh_backup_if_checksum_is_different --file="$config_path/navidrome.toml" - -# cp ../conf/navidrome.toml "$config_path/navidrome.toml" - -# # Main config File -# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml" -# ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$config_path/navidrome.toml" -# ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="$config_path/navidrome.toml" - -# ynh_store_file_checksum --file="$config_path/navidrome.toml" - #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 +config_path="/var/lib/$app" + ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="../conf/systemd.service" @@ -151,12 +124,8 @@ ynh_add_systemd_config ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R $app:$app $final_path -chown -R $app:$app $config_path - -# Set permissions on media files -chown -R $app:www-data /home/yunohost.$app/ -chmod -R 764 /home/yunohost.$app +chown -R $app: $final_path +chown -R $app: $config_path #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -183,4 +152,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of Navidrome completed" --last