1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00

Add config panel (#71)

- Add config panel
- Add YNH_ARCH helper
This commit is contained in:
Éric Gaspar 2022-01-20 16:42:18 +01:00 committed by GitHub
parent 521c01229f
commit 57b5f1a76c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 122 additions and 40 deletions

View file

@ -18,6 +18,20 @@ 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
### 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.0~ynh1
**Demo:** https://demo.navidrome.org/app/#/login

View file

@ -14,6 +14,18 @@ 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
- 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.0~ynh1

View file

@ -1,5 +0,0 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv5.tar.gz
SOURCE_SUM=c49157f71efbc4d05e3aea90dfd9a39ad9fe5ad23694894fcd2fdde87e379783
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false

View file

@ -1,5 +0,0 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv6.tar.gz
SOURCE_SUM=9cf4f771a5ad39e31f4b01fe8a276183b754a9d390af16fd5bed48aac7690744
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false

View file

@ -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 = ""

32
config_panel.toml Normal file
View file

@ -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"

View file

@ -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
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

View file

@ -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

View file

@ -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
}

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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