From 5bb8e0fbff6d00ec9072ab1e4950ba8135918751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 22 Jan 2022 10:55:17 +0100 Subject: [PATCH] Testing - Add config panel - Add YNH_ARCH helper - Upgrade to 0.47.5 --- README.md | 16 +++++++++++++++- README_fr.md | 14 +++++++++++++- check_process | 3 +++ conf/{armv6.src => amd64.src} | 4 ++-- conf/arm64.src | 4 ++-- conf/{armv5.src => armhf.src} | 4 ++-- conf/armv7.src | 5 ----- conf/navidrome.toml | 7 +++++-- conf/x86-64.src | 5 ----- config_panel.toml | 32 ++++++++++++++++++++++++++++++++ doc/DESCRIPTION.md | 15 ++++++++++++++- doc/DESCRIPTION_fr.md | 13 +++++++++++++ manifest.json | 2 +- scripts/_common.sh | 25 ------------------------- scripts/change_url | 4 ++++ scripts/install | 9 ++++++++- scripts/restore | 3 +-- scripts/upgrade | 23 +++++++++++++++++++++-- 18 files changed, 136 insertions(+), 52 deletions(-) rename conf/{armv6.src => amd64.src} (52%) rename conf/{armv5.src => armhf.src} (52%) delete mode 100644 conf/armv7.src delete mode 100644 conf/x86-64.src create mode 100644 config_panel.toml diff --git a/README.md b/README.md index 6d9252e..4e6e7c1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,21 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists -**Shipped version:** 0.47.0~ynh1 +### Features + +- Handles very large music collections +- Streams virtually any audio format available +- Reads and uses all your beautifully curated metadata +- Great support for compilations (Various Artists albums) and box sets (multi-disc albums) +- Multi-user, each user has their own play counts, playlists, favourites, etc... +- Very low resource usage +- Automatically monitors your library for changes, importing new files and reloading new metadata +- Themeable, modern and responsive Web interface based on Material UI +- Compatible with all Subsonic/Madsonic/Airsonic clients +- Transcoding on the fly. Can be set per user/player. Opus encoding is supported + + +**Shipped version:** 0.47.5~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index d5a6251..b20cbdf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,8 +14,20 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés +### Caractéristiques -**Version incluse :** 0.47.0~ynh1 +- Gère de très grandes collections de musique +- Streams pratiquement n'importe quel format audio disponible +- Lit et utilise toutes vos métadonnées +- Support pour les compilations (divers albums d'artistes) et les albums multi-disques +- Multi-User, chaque utilisateur a ses propres listes de lecture, favoris etc. +- Utilisation très faible des ressources +- Surveille automatiquement votre bibliothèque pour des modifications, importation de nouveaux fichiers et recharger de nouvelles métadonnées +- Interface Web thématique, moderne et réactive basée sur l'interface utilisateur du matériel +- Compatible avec tous les clients subsonique/madsononique/aironique +- Encodage à la volée. Peut être défini par utilisateur/lecteur. Le codage opus est pris en charge + +**Version incluse :** 0.47.5~ynh1 **Démo :** https://demo.navidrome.org/app/#/login diff --git a/check_process b/check_process index 2c86312..ff7c2bb 100644 --- a/check_process +++ b/check_process @@ -13,6 +13,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=e41c919ddb65673ea6b452e138d36c240be3b6b7 + upgrade=1 from_commit=d7eb59fdd7a47ef4365af59db857e763f70564a4 backup_restore=1 multi_instance=0 change_url=1 @@ -22,4 +23,6 @@ Notification=none ;;; Upgrade options ; commit=e41c919ddb65673ea6b452e138d36c240be3b6b7 name=Testing (#43) + ; commit=d7eb59fdd7a47ef4365af59db857e763f70564a4 + name=Testing (#70) manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/armv6.src b/conf/amd64.src similarity index 52% rename from conf/armv6.src rename to conf/amd64.src index 221b2ef..13dc6b2 100644 --- a/conf/armv6.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv6.tar.gz -SOURCE_SUM=9cf4f771a5ad39e31f4b01fe8a276183b754a9d390af16fd5bed48aac7690744 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz +SOURCE_SUM=0244a3b659f9dc70dd21c4209c0f168f4d744579ce94eb059b6c1f5606efc2d7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/arm64.src b/conf/arm64.src index 0ab64e0..c0685e1 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_arm64.tar.gz -SOURCE_SUM=1488ebc3e0412573a387502855d7cf64875c0f2939c92ff3283d4efaedf56251 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_arm64.tar.gz +SOURCE_SUM=f95051895db329ae8fc1a9968ff8e61388aea288400faa1e1a79458b8ff4d473 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armhf.src similarity index 52% rename from conf/armv5.src rename to conf/armhf.src index 9140d91..beca70a 100644 --- a/conf/armv5.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv5.tar.gz -SOURCE_SUM=c49157f71efbc4d05e3aea90dfd9a39ad9fe5ad23694894fcd2fdde87e379783 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv7.tar.gz +SOURCE_SUM=81663cd2e7a571e9db798f45161bdde8c681fa60e0e30e454dcee403010d0632 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src deleted file mode 100644 index ebf125e..0000000 --- a/conf/armv7.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv7.tar.gz -SOURCE_SUM=8100c0a02ec6bd9941c3d44433c9fa5e11b49e86a8d5b9fc36f62225a8d0af6f -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 4419bba..f658574 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -29,7 +29,7 @@ DataFolder = "__CONFIG_PATH__" MusicFolder = "/home/yunohost.multimedia/share/Music" # Enable the option in the UI to download music/albums/artists/playlists from the server -EnableDownloads = "true" +EnableDownloads = "__ENABLE_DOWNLOADS__" #Change background image used in the Login page UILoginBackgroundUrl = "" @@ -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" @@ -56,7 +59,7 @@ IgnoredArticles = "The El La Los Las Le Les Os As O A" AutoImportPlaylists = "true" # The default metadata extractor is still ffmpeg but you can use the new taglib extractor -Scanner.Extractor = "taglib" +Scanner.Extractor = "__SCANNER_EXTRACTOR__" # Last.FM ApiKey LastFM.ApiKey = "" diff --git a/conf/x86-64.src b/conf/x86-64.src deleted file mode 100644 index 979e940..0000000 --- a/conf/x86-64.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_x86_64.tar.gz -SOURCE_SUM=32806fd9d4c2a2d2e719a64e5162d2718775fa02928cf5d34a41c047a522adc0 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..c8361fe --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,32 @@ +version = "1.0" + +[main] +name = "Navidrome configuration" +services = ["__APP__"] + + [main.config] + name = "Configuration Options" + + [main.config.enable_animation] + ask = "Enable cover animation" + type = "boolean" + yes = "true" + no = "false" + 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" + yes = "true" + no = "false" + 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" diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 0afcc5e..20c2034 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,2 +1,15 @@ Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s -Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists \ No newline at end of file +Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists + +### Features + +- Handles very large music collections +- Streams virtually any audio format available +- Reads and uses all your beautifully curated metadata +- Great support for compilations (Various Artists albums) and box sets (multi-disc albums) +- Multi-user, each user has their own play counts, playlists, favourites, etc... +- Very low resource usage +- Automatically monitors your library for changes, importing new files and reloading new metadata +- Themeable, modern and responsive Web interface based on Material UI +- Compatible with all Subsonic/Madsonic/Airsonic clients +- Transcoding on the fly. Can be set per user/player. Opus encoding is supported diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index d524c6c..4608ae2 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1,2 +1,15 @@ Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés + +### Caractéristiques + +- Gère de très grandes collections de musique +- Streams pratiquement n'importe quel format audio disponible +- Lit et utilise toutes vos métadonnées +- Support pour les compilations (divers albums d'artistes) et les albums multi-disques +- Multi-User, chaque utilisateur a ses propres listes de lecture, favoris etc. +- Utilisation très faible des ressources +- Surveille automatiquement votre bibliothèque pour des modifications, importation de nouveaux fichiers et recharger de nouvelles métadonnées +- Interface Web thématique, moderne et réactive basée sur l'interface utilisateur du matériel +- Compatible avec tous les clients subsonique/madsononique/aironique +- Encodage à la volée. Peut être défini par utilisateur/lecteur. Le codage opus est pris en charge \ No newline at end of file diff --git a/manifest.json b/manifest.json index 9917bf6..4bea732 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.47.0~ynh1", + "version": "0.47.5~ynh1", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index b4b81b0..39722ca 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,28 +18,3 @@ pkg_dependencies="ffmpeg" #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" - elif [ -n "$(uname -m | grep armv7)" ]; then - architecture="armv7" - elif [ -n "$(uname -m | grep armv6)" ]; then - architecture="armv6" - elif [ -n "$(uname -m | grep armv5)" ]; then - architecture="armv5" - else - architecture="unknown" - fi - echo $architecture -} diff --git a/scripts/change_url b/scripts/change_url index c1ba790..07c4761 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,6 +30,10 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +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) + #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= diff --git a/scripts/install b/scripts/install index 47fd126..ef49713 100644 --- a/scripts/install +++ b/scripts/install @@ -23,10 +23,14 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH app=$YNH_APP_INSTANCE_NAME +scanner_extractor="taglib" +enable_downloads="true" +enable_animation="true" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -45,6 +49,9 @@ 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 +ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/restore b/scripts/restore index 9518ed0..23281c0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index eeea0c8..02fdd2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,11 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$(ynh_detect_arch) +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 @@ -56,6 +60,21 @@ 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 +fi + +if [ -z "$scanner_extractor" ]; then + scanner_extractor="taglib" + 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 @@ -113,7 +132,7 @@ ynh_script_progression --message="Updating a configuration file..." 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" +ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" chmod 600 "$config_path/navidrome.toml" chown -R $app:$app "$config_path"