From a8ac13c16eada067247fda513611a368a671bcc4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 21 Sep 2022 01:03:09 +0200 Subject: [PATCH 01/11] Apply last example_ynh --- .gitignore | 2 - conf/nginx.conf | 43 +++++++------- conf/systemd.service | 15 +++-- doc/DESCRIPTION.md | 7 +++ doc/DESCRIPTION_fr.md | 1 + doc/DISCLAIMER_fr.md | 6 -- manifest.json | 16 ++--- scripts/_common.sh | 2 +- scripts/backup | 21 ++++--- scripts/change_url | 3 +- scripts/install | 102 +++++++++++++++++++------------- scripts/remove | 46 ++++++++------- scripts/restore | 101 +++++++++++++++++--------------- scripts/upgrade | 133 +++++++++++++++++++++--------------------- 14 files changed, 268 insertions(+), 230 deletions(-) delete mode 100644 .gitignore create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/conf/nginx.conf b/conf/nginx.conf index b2901aa..c904fa9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,28 +3,27 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $http_host; - proxy_max_temp_file_size 0; - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect http:// https://; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $http_host; + proxy_max_temp_file_size 0; + proxy_pass http://127.0.0.1:__PORT__; + proxy_redirect http:// https://; - # set client body size to 500 MB - # Allows to upload zip file up to 500 MB - # See https://github.com/YunoHost-Apps/airsonic_ynh/issues/4 - client_max_body_size 500M; + # set client body size to 500 MB + # Allows to upload zip file up to 500 MB + # See https://github.com/YunoHost-Apps/airsonic_ynh/issues/4 + client_max_body_size 500M; - # Fix last DSub releases not able to connect with LDAP - # See https://github.com/airsonic/airsonic/issues/260 - sub_filter_types text/xml application/json; - sub_filter_once off; - sub_filter 'subsonic' 'madsonic'; - - # Include SSOWAT user panel. - # Removed since sub_filter_once directive is also used in this file -# include conf.d/yunohost_panel.conf.inc; -# proxy_set_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' www.gstatic.com; img-src 'self' *.akamaized.net; style-src 'self' 'unsafe-inline' fonts.googleapis.com; font-src 'self' fonts.gstatic.com; frame-src 'self'; object-src 'none'"; + # Fix last DSub releases not able to connect with LDAP + # See https://github.com/airsonic/airsonic/issues/260 + sub_filter_types text/xml application/json; + sub_filter_once off; + sub_filter 'subsonic' 'madsonic'; + + # Include SSOWAT user panel. + #include conf.d/yunohost_panel.conf.inc; + #proxy_set_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' www.gstatic.com; img-src 'self' *.akamaized.net; style-src 'self' 'unsafe-inline' fonts.googleapis.com; font-src 'self' fonts.gstatic.com; frame-src 'self'; object-src 'none'"; } diff --git a/conf/systemd.service b/conf/systemd.service index da45966..eee82fa 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,6 +8,8 @@ AssertPathExists=__FINALPATH__ [Service] Type=simple +User=__APP__ +Group=__APP__ Environment="JAVA_OPTS=-Xmx256m" Environment="JAVA_ARGS=" EnvironmentFile=-/etc/default/__APP__ @@ -17,22 +19,17 @@ ExecStart=/usr/bin/java \ -Dserver.context-path=${CONTEXT_PATH} \ -Dserver.port=${PORT} \ -jar ${JAVA_JAR} $JAVA_ARGS -User=__APP__ -Group=__APP__ # See https://www.freedesktop.org/software/systemd/man/systemd.exec.html # for details -DevicePolicy=closed DeviceAllow=char-alsa rw NoNewPrivileges=yes PrivateTmp=yes PrivateUsers=yes -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes +DevicePolicy=closed SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap ReadWritePaths=__FINALPATH__ @@ -44,6 +41,9 @@ ReadWritePaths=__FINALPATH__ # if you don't want airsonic to be able to # write anything on your filesystem outside of AIRSONIC_HOME. ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes # You can uncomment the following line if you don't have any media # in /home/…. This will prevent airsonic from ever reading/writing anything there. @@ -54,6 +54,5 @@ ProtectSystem=full # and executeable, making hacker's lifes a bit harder. #MemoryDenyWriteExecute=yes - [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..43e68db --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,7 @@ +Airsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room. + +Airsonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Airsonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten. + +If you have constrained bandwidth, you may set an upper limit for the bit rate of the music streams. Airsonic will then automatically re sample the music to a suitable bit rate. + +In addition to being a streaming media server, Airsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Airsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..c8e80e7 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Streamez et gérez votre collection de musique diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index b1f1a70..e69de29 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,6 +0,0 @@ -## FonctionnalitĂ©s spĂ©cifiques Ă  YunoHost - -* Comptes LDAP YunoHost pris en charge : **oui** -* [MultimĂ©dia](https://github.com/YunoHost-Apps/yunohost.multimedia) gĂ©rĂ© -* Limite de mĂ©moire RAM fixĂ©e Ă  256 Mb car Airsonic quittait souvant par manque de RAM (bonjour OOM killer) -* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ \ No newline at end of file diff --git a/manifest.json b/manifest.json index 797e2f3..fb0ccb7 100644 --- a/manifest.json +++ b/manifest.json @@ -17,18 +17,18 @@ }, "license": "GPL-3.0-or-later", "maintainer": { - "name": "Gofannon", - "email": "gofannon@riseup.net" + "name": "", + "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 11.0.0" }, "multi_instance": true, "services": [ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -39,14 +39,14 @@ "example": "/airsonic", "default": "/airsonic" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", "default": true + }, + { + "name": "admin", + "type": "user" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 4b38524..a863a98 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app +# dependencies used by the app (must be on a single line) pkg_dependencies="openjdk-8-jre|openjdk-11-jre ffmpeg" #================================================= diff --git a/scripts/backup b/scripts/backup index a27e558..52238cf 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,6 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -14,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -28,6 +29,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -40,6 +42,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup --src_path="$datadir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= @@ -59,14 +67,13 @@ ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= ynh_backup --src_path="/etc/systemd/system/$app.service" + +#================================================= +# BACKUP VARIOUS FILES +#================================================= + ynh_backup --src_path="/etc/default/$app" -#================================================= -# BACKUP DATA -#================================================= - -ynh_backup --src_path="/home/yunohost.app/$app" --is_big - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url index 563965e..23a3b63 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) path_url=$(ynh_app_setting_get --app=$app --key=path) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 @@ -122,6 +122,7 @@ ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/defaul #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=12 +# Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path="$final_path/airsonic.log" --line_match="Started Application in" #================================================= diff --git a/scripts/install b/scripts/install index 6d583ee..d123d6f 100644 --- a/scripts/install +++ b/scripts/install @@ -18,7 +18,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -29,8 +29,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME @@ -61,7 +61,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin #================================================= ynh_script_progression --message="Finding an available port..." --weight=1 -# Find a free port +# Find an available port port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port @@ -87,7 +87,7 @@ ynh_script_progression --message="Setting up source files..." --weight=82 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$final_path +ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" @@ -109,7 +109,7 @@ ynh_script_progression --message="Creating a data directory..." --weight=1 datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir -mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} +mkdir -p $datadir/{Podcasts,Playlists} chmod 764 "$datadir" chmod -R o-rwx "$datadir" @@ -130,6 +130,7 @@ ynh_multimedia_addaccess $app #================================================= # ENABLE "TRANSCODE" #================================================= +ynh_script_progression --message="Enabling transcode..." --weight=1 ### For details, see https://airsonic.github.io/docs/transcode/ @@ -147,6 +148,20 @@ fi # Ensure links belong to the $app user chown $app $final_path/transcode +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" +chmod 400 "/etc/default/$app" +chown $app:$app "/etc/default/$app" + +# Copy configuration file of airsonic +ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" +chmod 400 "$final_path/airsonic.properties" +chown $app:$app "$final_path/airsonic.properties" + #================================================= # SETUP SYSTEMD #================================================= @@ -155,45 +170,20 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=3 # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# MODIFY CONFIG FILES -#================================================= - -ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" -# Copy configuration file of airsonic -ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" - -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 - -# Use logrotate to manage application logfile(s) -ynh_use_logrotate $final_path/$app.log - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=12 - -# Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="$final_path/$app.log" --line_match="Started Application in" - #================================================= # SETUP APPLICATION WITH CURL #================================================= +ynh_script_progression --message="Setuping application with CURL..." --weight=1 -# Set the app as temporarily public for cURL call +ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/$app.log" --line_match="Started Application in" + +# Set the app as temporarily public for curl call +ynh_script_progression --message="Configuring SSOwat..." --weight=1 +# Making the app public for curl ynh_permission_update --permission="main" --add="visitors" # Reload Nginx -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemd_action --service_name=nginx --action="reload" ynh_script_progression --message="Finalizing installation..." --weight=10 @@ -225,9 +215,14 @@ token=$(echo -n $passwordAdmin$salt | md5sum | awk '{print $1}') ynh_local_curl "/rest/createUser.view" "u=admin" "t=$token" "s=$salt" "username=$admin" "password=a" "v=$VERSION" "c=myapp" "email=$mailadmin" "adminRole=Yes" "ldapAuthenticated=Yes" "settingsRole=Yes" "streamRole=Yes" "jukeboxRole=Yes" "downloadRole=Yes" "uploadRole=Yes" "playlistRole=Yes" "coverArtRole=Yes" "commentRole=Yes" "podcastRole=Yes" "shareRole=Yes" "videoConversionRole=Yes" +# Remove the public access +ynh_permission_update --permission="main" --remove="visitors" + #================================================= # USE MULTIMEDIA #================================================= +ynh_script_progression --message="Using multimedia..." --weight=1 + ynh_systemd_action --service_name=$app --action="stop" # Use multimedia folder @@ -238,15 +233,42 @@ ynh_script_progression --message="Restarting a systemd service..." --weight=12 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in" +#================================================= +# GENERIC FINALIZATION +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Configuring log rotation..." --weight=1 + +# Use logrotate to manage application logfile(s) +ynh_use_logrotate $final_path/$app.log + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --weight=12 + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_path/$app.log" --line_match="Started Application in" + #================================================= # SETUP SSOWAT #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 -# Make app public if necessary or protect it -if [ $is_public -eq 0 ] +# Make app public if necessary +if [ $is_public -eq 1 ] then - ynh_permission_update --permission="main" --remove="visitors" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/remove b/scripts/remove index 04721d0..8bf8d53 100644 --- a/scripts/remove +++ b/scripts/remove @@ -24,13 +24,13 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL +# REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove a service from the admin panel, added by `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=2 + ynh_script_progression --message="Removing $app service integration..." --weight=1 yunohost service remove $app fi @@ -43,12 +43,12 @@ ynh_script_progression --message="Stopping and removing the systemd service..." ynh_remove_systemd_config #================================================= -# REMOVE DEPENDENCIES +# REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=19 +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 -# Remove metapackage and its dependencies -ynh_remove_app_dependencies +# Remove the app-specific logrotate config +ynh_remove_logrotate #================================================= # REMOVE APP MAIN DIR @@ -58,6 +58,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$datadir" +fi + #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -65,30 +76,21 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================ -# REMOVE DATA DIR -#================================================ - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="/home/yunohost.app/$app" -fi #================================================= -# REMOVE LOGROTATE CONFIGURATION +# REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 +ynh_script_progression --message="Removing dependencies..." --weight=19 -# Remove the app-specific logrotate config -ynh_remove_logrotate +# Remove metapackage and its dependencies +ynh_remove_app_dependencies #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE FILES +# REMOVE VARIOUS FILES #================================================= +ynh_script_progression --message="Removing various files..." --weight=1 ynh_secure_remove --file="/etc/default/$app" diff --git a/scripts/restore b/scripts/restore index 00b312d..402efd7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -42,12 +42,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -67,6 +61,19 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$datadir" --not_mandatory + +mkdir -p $datadir + +chmod 764 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + #================================================= # SPECIFIC RESTORATION #================================================= @@ -77,9 +84,17 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=43 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # ENABLE "TRANSCODE" #================================================= +ynh_script_progression --message="Enabling transcode..." --weight=1 ### For details, see https://airsonic.github.io/docs/transcode/ @@ -98,46 +113,11 @@ fi chown $app $final_path/transcode #================================================= -# RESTORE SYSTEMD +# RESTORE VARIOUS FILES #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +ynh_script_progression --message="Restoring various files..." --weight=1 -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/default/$app" -systemctl enable $app.service --quiet - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=12 - -ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/$app.log" --line_match="Started Application in" - -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - -#================================================= -# RESTORE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=1 - -# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. -ynh_restore_file --origin_path="$datadir" --not_mandatory - -mkdir -p $datadir - -chmod 764 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -150,6 +130,35 @@ ynh_multimedia_addfolder --source_dir="/home/yunohost.app/$app/Playlists" --dest # Allow airsonic to write into these directories ynh_multimedia_addaccess --user_name=$app +#================================================= +# RESTORE SYSTEMD +#================================================= +ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service --quiet + +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --weight=12 + +ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/$app.log" --line_match="Started Application in" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 013069b..23d6661 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,14 +18,15 @@ app=$YNH_APP_INSTANCE_NAME 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) admin=$(ynh_app_setting_get --app=$app --key=admin) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) @@ -37,14 +38,21 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - ynh_clean_check_starting - - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="stop" + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -74,14 +82,18 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +# Rename legacy folder to proper location +if [[ ! -e /home/yunohost.app/$app ]] && [[ -e /home/yunohost.$app ]] +then + mkdir -p /home/yunohost.app/ + mv /home/yunohost.$app /home/yunohost.app/$app +fi -ynh_systemd_action --service_name=$app --action="stop" +mkdir -p $datadir/{Podcasts,Playlists} + +chmod 764 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= # CREATE DEDICATED USER @@ -107,6 +119,13 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=4 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -116,40 +135,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config #================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=4 - -ynh_install_app_dependencies $pkg_dependencies - -# #================================================= -# # SPECIFIC UPGRADE -# #================================================= -# # CREATE DIRECTORIES -# #================================================= - -# mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} - -# #================================================= -# # SECURING FILES AND DIRECTORIES -# #================================================= - -# Rename legacy folder to proper location -if [[ ! -e /home/yunohost.app/$app ]] && [[ -e /home/yunohost.$app ]] -then - mkdir -p /home/yunohost.app/ - mv /home/yunohost.$app /home/yunohost.app/$app -fi - -mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} - -#================================================= -# SECURING FILES AND DIRECTORIES -#================================================= - -chown -R $app:www-data /home/yunohost.app/$app -chmod 764 /home/yunohost.app/$app - +# SPECIFIC UPGRADE #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #================================================= @@ -175,6 +161,7 @@ ynh_multimedia_addaccess $app #================================================= # ENABLE "TRANSCODE" #================================================= +ynh_script_progression --message="Enabling transcode..." --weight=1 ### For details, see https://airsonic.github.io/docs/transcode/ @@ -193,19 +180,17 @@ fi chown $app $final_path/transcode #================================================= -# STORE THE CONFIG FILE CHECKSUM +# UPDATE A CONFIG FILE #================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=1 + +ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" +chmod 400 "/etc/default/$app" +chown $app:$app "/etc/default/$app" -# Copy configuration file of airsonic ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" - -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 - -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append --logfile="$final_path/$app.log" +chmod 400 "$final_path/airsonic.properties" +chown $app:$app "$final_path/airsonic.properties" #================================================= # SETUP SYSTEMD @@ -215,20 +200,10 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config -ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" - #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# USE MULTIMEDIA #================================================= - -yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=12 - -ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in" +ynh_script_progression --message="Using multimedia..." --weight=1 # Use multimedia folder if needed if ! grep -q "/home/yunohost.multimedia/share/Music" $final_path/db/airsonic.script; then @@ -243,6 +218,30 @@ if ! grep -q "/home/yunohost.multimedia/share/Music" $final_path/db/airsonic.scr ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in" fi +#================================================= +# GENERIC FINALIZATION +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append --logfile="$final_path/$app.log" + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="Airsonic daemon" --log="$final_path/$app.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --weight=12 + +ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in" + #================================================= # RELOAD NGINX #================================================= From 8706c199981eb370aa0d449cab0262641f3a46eb Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 21 Sep 2022 12:45:01 +0200 Subject: [PATCH 02/11] Update DESCRIPTION_fr.md --- doc/DESCRIPTION_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index c8e80e7..e840f77 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1 @@ -Streamez et gérez votre collection de musique +Streamez et gĂ©rez votre collection de musique From 1cf046c7d7a9438426b899197dc9b4b35a183474 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 21 Sep 2022 10:45:07 +0000 Subject: [PATCH 03/11] Auto-update README --- README.md | 10 +++++++++- README_fr.md | 12 +++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fbcb1e0..d81d4f8 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,18 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Stream and manage your music collection +Airsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room. + +Airsonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Airsonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten. + +If you have constrained bandwidth, you may set an upper limit for the bit rate of the music streams. Airsonic will then automatically re sample the music to a suitable bit rate. + +In addition to being a streaming media server, Airsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Airsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes. + **Shipped version:** 10.6.2~ynh3 + **Demo:** https://airsonic.github.io/demo/ ## Screenshots diff --git a/README_fr.md b/README_fr.md index d0d3766..70c8bb6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,9 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Streamez et gĂ©rez votre collection de musique -**Version incluse :** 10.6.2~ynh3 + +**Version incluse :** 10.6.2~ynh3 + **DĂ©mo :** https://airsonic.github.io/demo/ @@ -25,14 +27,6 @@ Streamez et gĂ©rez votre collection de musique ![Capture d'Ă©cran de Airsonic](./doc/screenshots/screenshot_01.png) -## Avertissements / informations importantes - -## FonctionnalitĂ©s spĂ©cifiques Ă  YunoHost - -* Comptes LDAP YunoHost pris en charge : **oui** -* [MultimĂ©dia](https://github.com/YunoHost-Apps/yunohost.multimedia) gĂ©rĂ© -* Limite de mĂ©moire RAM fixĂ©e Ă  256 Mb car Airsonic quittait souvant par manque de RAM (bonjour OOM killer) -* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ ## Documentations et ressources * Site officiel de l'app : From b8f9f6f6fefde7e01275aebb43f9573516d71f9a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 21 Sep 2022 21:52:33 +0200 Subject: [PATCH 04/11] Update check_process --- check_process | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index df2cbf6..8b47e9f 100644 --- a/check_process +++ b/check_process @@ -2,8 +2,8 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" is_public=1 + admin="john" ; Checks pkg_linter=1 setup_sub_dir=1 @@ -12,9 +12,10 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=72d530415c016b23b6ba62085272957b04d2cca6 + upgrade=1 from_commit=72d530415c016b23b6ba62085272957b04d2cca6 backup_restore=1 multi_instance=1 + port_already_use=0 change_url=1 ;;; Options Email= From 90007488ceaa3c04787b562897fddaf6de171af1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 21 Sep 2022 22:43:56 +0200 Subject: [PATCH 05/11] Upgrade to Airsonic-Advanced --- .github/workflows/updater.sh | 132 ++++++++++++++++++++++++++++++++++ .github/workflows/updater.yml | 49 +++++++++++++ check_process | 2 + conf/airsonic.properties | 1 + conf/app.src | 6 +- conf/nginx.conf | 10 ++- conf/systemd.service | 2 +- doc/DESCRIPTION.md | 2 + doc/DESCRIPTION_fr.md | 10 ++- doc/DISCLAIMER_fr.md | 6 ++ manifest.json | 11 ++- scripts/_common.sh | 2 +- scripts/install | 6 +- scripts/upgrade | 6 +- 14 files changed, 225 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/updater.sh create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100644 index 0000000..23bc22f --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,132 @@ +#!/bin/bash + +#================================================= +# PACKAGE UPDATING HELPER +#================================================= + +# This script is meant to be run by GitHub Actions +# The YunoHost-Apps organisation offers a template Action to run this script periodically +# Since each app is different, maintainers can adapt its contents so as to perform +# automatic actions when a new upstream release is detected. + +#================================================= +# FETCHING LATEST RELEASE AND ITS ASSETS +#================================================= + +# Fetching information +current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') +repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') +# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | .tag_name' | sort -V | tail -1) +assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) + +# Later down the script, we assume the version has only digits and dots +# Sometimes the release name starts with a "v", so let's filter it out. +# You may need more tweaks here if the upstream repository has different naming conventions. +if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then + version=${version:1} +fi + +# Setting up the environment variables +echo "Current version: $current_version" +echo "Latest release from upstream: $version" +echo "VERSION=$version" >> $GITHUB_ENV +echo "REPO=$repo" >> $GITHUB_ENV +# For the time being, let's assume the script will fail +echo "PROCEED=false" >> $GITHUB_ENV + +# Proceed only if the retrieved version is greater than the current one +if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then + echo "::warning ::No new version available" + exit 0 +# Proceed only if a PR for this new version does not already exist +elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then + echo "::warning ::A branch already exists for this update" + exit 0 +fi + +# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) +echo "${#assets[@]} available asset(s)" + +#================================================= +# UPDATE SOURCE FILES +#================================================= + +# Here we use the $assets variable to get the resources published in the upstream release. +# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. + +# Let's loop over the array of assets URLs +for asset_url in ${assets[@]}; do + + echo "Handling asset at $asset_url" + + # Assign the asset to a source file in conf/ directory + # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) + # Leave $src empty to ignore the asset + case $asset_url in + *"war"*) + src="app" + ;; + *) + src="" + ;; + esac + + # If $src is not empty, let's process the asset + if [ ! -z "$src" ]; then + + # Create the temporary directory + tempdir="$(mktemp -d)" + + # Download sources and calculate checksum + filename=${asset_url##*/} + curl --silent -4 -L $asset_url -o "$tempdir/$filename" + checksum=$(sha256sum "$tempdir/$filename" | head -c 64) + + # Delete temporary directory + rm -rf $tempdir + + # Get extension + if [[ $filename == *.tar.gz ]]; then + extension=tar.gz + else + extension=${filename##*.} + fi + + # Rewrite source file + cat < conf/$src.src +SOURCE_URL=$asset_url +SOURCE_SUM=$checksum +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=war +SOURCE_IN_SUBDIR=false +SOURCE_FILENAME=airsonic.war +SOURCE_EXTRACT=false +EOT + echo "... conf/$src.src updated" + + else + echo "... asset ignored" + fi + +done + +#================================================= +# SPECIFIC UPDATE STEPS +#================================================= + +# Any action on the app's source code can be done. +# The GitHub Action workflow takes care of committing all changes after this script ends. + +#================================================= +# GENERIC FINALIZATION +#================================================= + +# Replace new version in manifest +echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json + +# No need to update the README, yunohost-bot takes care of it + +# The Action will proceed only if the PROCEED environment variable is set to true +echo "PROCEED=true" >> $GITHUB_ENV +exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..fb72ba0 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,49 @@ +# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. +# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. +# This file should be enough by itself, but feel free to tune it to your needs. +# It calls updater.sh, which is where you should put the app-specific update steps. +name: Check for new upstream releases +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it every day at 6:00 UTC + schedule: + - cron: '0 6 * * *' +jobs: + updater: + runs-on: ubuntu-latest + steps: + - name: Fetch the source code + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run the updater script + id: run_updater + run: | + # Setting up Git user + git config --global user.name 'yunohost-bot' + git config --global user.email 'yunohost-bot@users.noreply.github.com' + # Run the updater script + /bin/bash .github/workflows/updater.sh + - name: Commit changes + id: commit + if: ${{ env.PROCEED == 'true' }} + run: | + git commit -am "Upgrade to v$VERSION" + - name: Create Pull Request + id: cpr + if: ${{ env.PROCEED == 'true' }} + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update to version ${{ env.VERSION }} + committer: 'yunohost-bot ' + author: 'yunohost-bot ' + signoff: false + base: testing + branch: ci-auto-update-v${{ env.VERSION }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + draft: false diff --git a/check_process b/check_process index 8b47e9f..b02d6ae 100644 --- a/check_process +++ b/check_process @@ -13,6 +13,8 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=72d530415c016b23b6ba62085272957b04d2cca6 + # 10.6.2~ynh3 + upgrade=1 from_commit=6ca76697a8f8da7419eb490aa435649f1b9d96c2 backup_restore=1 multi_instance=1 port_already_use=0 diff --git a/conf/airsonic.properties b/conf/airsonic.properties index c2eeb96..8dd63a5 100644 --- a/conf/airsonic.properties +++ b/conf/airsonic.properties @@ -10,3 +10,4 @@ LdapAutoShadowing=true GettingStartedEnabled=false PodcastFolder=/home/yunohost.multimedia/share/Podcasts PlaylistFolder=/home/yunohost.multimedia/share/Playlists +server.forward-headers-strategy=native diff --git a/conf/app.src b/conf/app.src index 2e22a93..0682ffd 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/airsonic/airsonic/releases/download/v10.6.2/airsonic.war -SOURCE_SUM=94b17d6a7859a9c029dcbcdc672f4d49bd605bf46bdf74ac51ea0d593db67860 +SOURCE_URL=https://github.com/airsonic-advanced/airsonic-advanced/releases/download/11.0.0-SNAPSHOT.20220625052932/airsonic.war +SOURCE_SUM=6be139912d0e15b97e454f52fa8a7bb2f511d177afe202f6e2f32dcd8a253cc8 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=false +SOURCE_FORMAT=war SOURCE_IN_SUBDIR=false SOURCE_FILENAME=airsonic.war SOURCE_EXTRACT=false diff --git a/conf/nginx.conf b/conf/nginx.conf index c904fa9..554fa78 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,14 +3,20 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header Host $host; proxy_max_temp_file_size 0; proxy_pass http://127.0.0.1:__PORT__; proxy_redirect http:// https://; + proxy_buffering off; + proxy_request_buffering off; # set client body size to 500 MB # Allows to upload zip file up to 500 MB diff --git a/conf/systemd.service b/conf/systemd.service index eee82fa..eef34bf 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -16,7 +16,7 @@ EnvironmentFile=-/etc/default/__APP__ ExecStart=/usr/bin/java \ $JAVA_OPTS \ -Dairsonic.home=${AIRSONIC_HOME} \ - -Dserver.context-path=${CONTEXT_PATH} \ + -Dserver.servlet.context-path=${CONTEXT_PATH} \ -Dserver.port=${PORT} \ -jar ${JAVA_JAR} $JAVA_ARGS diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 43e68db..758595a 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,3 +1,5 @@ +Airsonic-Advanced is a more modern implementation of the Airsonic fork with several key performance and feature enhancements. It adds and supersedes several features in Airsonic. + Airsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room. Airsonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Airsonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index e840f77..17b3038 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,9 @@ -Streamez et gĂ©rez votre collection de musique +Airsonic-Advanced est une implĂ©mentation plus moderne de la bifurcation d'Airsonic avec plusieurs amĂ©liorations clĂ©s en termes de performances et de fonctionnalitĂ©s. Elle ajoute et remplace plusieurs fonctionnalitĂ©s d'Airsonic. + +Airsonic est un streamer multimĂ©dia gratuit, basĂ© sur le web, qui fournit un accès omniprĂ©sent Ă  votre musique. Utilisez-le pour partager votre musique avec vos amis, ou pour Ă©couter votre propre musique au travail. Vous pouvez diffuser votre musique sur plusieurs lecteurs simultanĂ©ment, par exemple sur un lecteur dans votre cuisine et un autre dans votre salon. + +Airsonic est conçu pour gĂ©rer de très grandes collections de musique (des centaines de gigaoctets). Bien qu'il soit optimisĂ© pour le streaming MP3, il fonctionne pour tout format audio ou vidĂ©o pouvant ĂŞtre diffusĂ© par HTTP, par exemple AAC et OGG. En utilisant des plug-ins de transcodage, Airsonic prend en charge la conversion et le streaming Ă  la volĂ©e de pratiquement tous les formats audio, notamment WMA, FLAC, APE, Musepack, WavPack et Shorten. + +Si vous avez une bande passante limitĂ©e, vous pouvez fixer une limite supĂ©rieure pour le dĂ©bit binaire des flux musicaux. Airsonic rĂ©Ă©chantillonnera alors automatiquement la musique Ă  un dĂ©bit binaire appropriĂ©. + +En plus d'ĂŞtre un serveur de mĂ©dias en streaming, Airsonic fonctionne très bien comme un jukebox local. L'interface web intuitive, ainsi que les fonctions de recherche et d'indexation, sont optimisĂ©es pour une navigation efficace dans les grandes bibliothèques de mĂ©dias. Airsonic est Ă©galement livrĂ© avec un rĂ©cepteur de podcasts intĂ©grĂ©, avec la plupart des fonctionnalitĂ©s que vous trouvez dans iTunes. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index e69de29..22dee7f 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,6 @@ +## CaractĂ©ristiques spĂ©cifiques de YunoHost + +* Comptes LDAP supportĂ©s par YunoHost : **Oui** +* Gestion du [MultimĂ©dia](https://github.com/YunoHost-Apps/yunohost.multimedia) +* La limite de mĂ©moire RAM a Ă©tĂ© fixĂ©e Ă  256 Mo car Airsonic Ă©tait souvent tuĂ© par le manque de RAM (hello OOM killer). +* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ diff --git a/manifest.json b/manifest.json index fb0ccb7..d410071 100644 --- a/manifest.json +++ b/manifest.json @@ -1,19 +1,18 @@ { - "name": "Airsonic", + "name": "Airsonic-Advanced", "id": "airsonic", "packaging_format": 1, "description": { "en": "Stream and manage your music collection", "fr": "Streamez et gĂ©rez votre collection de musique" }, - "version": "10.6.2~ynh3", - "url": "http://airsonic.github.io", + "version": "11.0.0-SNAPSHOT.20220625052932~ynh1", + "url": "https://github.com/airsonic-advanced/airsonic-advanced", "upstream": { "license": "GPL-3.0-or-later", - "website": "https://airsonic.github.io/", - "demo": "https://airsonic.github.io/demo/", + "website": "https://github.com/airsonic-advanced/airsonic-advanced", "admindoc": "https://airsonic.github.io/docs/", - "code": "https://github.com/airsonic/airsonic" + "code": "https://github.com/airsonic-advanced/airsonic-advanced" }, "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index a863a98..04255ba 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="openjdk-8-jre|openjdk-11-jre ffmpeg" +pkg_dependencies="openjdk-11-jre ffmpeg" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index d123d6f..1e2f445 100644 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/opt/yunohost/$app +final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path @@ -154,12 +154,12 @@ chown $app $final_path/transcode ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" -chmod 400 "/etc/default/$app" +chmod 600 "/etc/default/$app" chown $app:$app "/etc/default/$app" # Copy configuration file of airsonic ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" -chmod 400 "$final_path/airsonic.properties" +chmod 600 "$final_path/airsonic.properties" chown $app:$app "$final_path/airsonic.properties" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 23d6661..bb81357 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,7 +60,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If final_path doesn't exist, create it if [ -z "$final_path" ]; then - final_path=/opt/yunohost/$app + final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi @@ -185,11 +185,11 @@ chown $app $final_path/transcode ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" -chmod 400 "/etc/default/$app" +chmod 600 "/etc/default/$app" chown $app:$app "/etc/default/$app" ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" -chmod 400 "$final_path/airsonic.properties" +chmod 600 "$final_path/airsonic.properties" chown $app:$app "$final_path/airsonic.properties" #================================================= From ff4f64a7fbfe50a85fa435f162883393f9b6d581 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 21 Sep 2022 20:44:02 +0000 Subject: [PATCH 06/11] Auto-update README --- README.md | 18 +++++++++--------- README_fr.md | 35 +++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d81d4f8..5a28bd4 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,20 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# Airsonic for YunoHost +# Airsonic-Advanced for YunoHost [![Integration level](https://dash.yunohost.org/integration/airsonic.svg)](https://dash.yunohost.org/appci/app/airsonic) ![Working status](https://ci-apps.yunohost.org/ci/badges/airsonic.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/airsonic.maintain.svg) -[![Install Airsonic with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) +[![Install Airsonic-Advanced with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Airsonic quickly and simply on a YunoHost server. +> *This package allows you to install Airsonic-Advanced quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview +Airsonic-Advanced is a more modern implementation of the Airsonic fork with several key performance and feature enhancements. It adds and supersedes several features in Airsonic. + Airsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room. Airsonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Airsonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten. @@ -24,14 +26,12 @@ If you have constrained bandwidth, you may set an upper limit for the bit rate o In addition to being a streaming media server, Airsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Airsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes. -**Shipped version:** 10.6.2~ynh3 +**Shipped version:** 11.0.0-SNAPSHOT.20220625052932~ynh1 -**Demo:** https://airsonic.github.io/demo/ - ## Screenshots -![Screenshot of Airsonic](./doc/screenshots/screenshot_01.png) +![Screenshot of Airsonic-Advanced](./doc/screenshots/screenshot_01.png) ## Disclaimers / important information @@ -44,9 +44,9 @@ In addition to being a streaming media server, Airsonic works very well as a loc ## Documentation and resources -* Official app website: +* Official app website: * Official admin documentation: -* Upstream app code repository: +* Upstream app code repository: * YunoHost documentation for this app: * Report a bug: diff --git a/README_fr.md b/README_fr.md index 70c8bb6..c07f8a1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,35 +3,50 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# Airsonic pour YunoHost +# Airsonic-Advanced pour YunoHost [![Niveau d'intĂ©gration](https://dash.yunohost.org/integration/airsonic.svg)](https://dash.yunohost.org/appci/app/airsonic) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/airsonic.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/airsonic.maintain.svg) -[![Installer Airsonic avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) +[![Installer Airsonic-Advanced avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Airsonic rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer Airsonic-Advanced rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Streamez et gĂ©rez votre collection de musique +Airsonic-Advanced est une implĂ©mentation plus moderne de la bifurcation d'Airsonic avec plusieurs amĂ©liorations clĂ©s en termes de performances et de fonctionnalitĂ©s. Elle ajoute et remplace plusieurs fonctionnalitĂ©s d'Airsonic. + +Airsonic est un streamer multimĂ©dia gratuit, basĂ© sur le web, qui fournit un accès omniprĂ©sent Ă  votre musique. Utilisez-le pour partager votre musique avec vos amis, ou pour Ă©couter votre propre musique au travail. Vous pouvez diffuser votre musique sur plusieurs lecteurs simultanĂ©ment, par exemple sur un lecteur dans votre cuisine et un autre dans votre salon. + +Airsonic est conçu pour gĂ©rer de très grandes collections de musique (des centaines de gigaoctets). Bien qu'il soit optimisĂ© pour le streaming MP3, il fonctionne pour tout format audio ou vidĂ©o pouvant ĂŞtre diffusĂ© par HTTP, par exemple AAC et OGG. En utilisant des plug-ins de transcodage, Airsonic prend en charge la conversion et le streaming Ă  la volĂ©e de pratiquement tous les formats audio, notamment WMA, FLAC, APE, Musepack, WavPack et Shorten. + +Si vous avez une bande passante limitĂ©e, vous pouvez fixer une limite supĂ©rieure pour le dĂ©bit binaire des flux musicaux. Airsonic rĂ©Ă©chantillonnera alors automatiquement la musique Ă  un dĂ©bit binaire appropriĂ©. + +En plus d'ĂŞtre un serveur de mĂ©dias en streaming, Airsonic fonctionne très bien comme un jukebox local. L'interface web intuitive, ainsi que les fonctions de recherche et d'indexation, sont optimisĂ©es pour une navigation efficace dans les grandes bibliothèques de mĂ©dias. Airsonic est Ă©galement livrĂ© avec un rĂ©cepteur de podcasts intĂ©grĂ©, avec la plupart des fonctionnalitĂ©s que vous trouvez dans iTunes. -**Version incluse :** 10.6.2~ynh3 +**Version incluse :** 11.0.0-SNAPSHOT.20220625052932~ynh1 -**DĂ©mo :** https://airsonic.github.io/demo/ - ## Captures d'Ă©cran -![Capture d'Ă©cran de Airsonic](./doc/screenshots/screenshot_01.png) +![Capture d'Ă©cran de Airsonic-Advanced](./doc/screenshots/screenshot_01.png) + +## Avertissements / informations importantes + +## CaractĂ©ristiques spĂ©cifiques de YunoHost + +* Comptes LDAP supportĂ©s par YunoHost : **Oui** +* Gestion du [MultimĂ©dia](https://github.com/YunoHost-Apps/yunohost.multimedia) +* La limite de mĂ©moire RAM a Ă©tĂ© fixĂ©e Ă  256 Mo car Airsonic Ă©tait souvent tuĂ© par le manque de RAM (hello OOM killer). +* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l'app : * Documentation officielle de l'admin : -* DĂ©pĂ´t de code officiel de l'app : +* DĂ©pĂ´t de code officiel de l'app : * Documentation YunoHost pour cette app : * Signaler un bug : From c98a9b92154a360d8b74cb803e42bc5b3dcba1e2 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 22 Sep 2022 02:03:07 +0200 Subject: [PATCH 07/11] Disable multiinstance --- check_process | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index b02d6ae..f8326f5 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,7 @@ # 10.6.2~ynh3 upgrade=1 from_commit=6ca76697a8f8da7419eb490aa435649f1b9d96c2 backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=1 ;;; Options diff --git a/manifest.json b/manifest.json index d410071..7900db8 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "requirements": { "yunohost": ">= 11.0.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx" ], From 0d906fda70a9a7741f8ce4148d6326ca7abdb8a9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 22 Sep 2022 02:10:18 +0200 Subject: [PATCH 08/11] Revert "Disable multiinstance" This reverts commit c98a9b92154a360d8b74cb803e42bc5b3dcba1e2. --- check_process | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index f8326f5..b02d6ae 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,7 @@ # 10.6.2~ynh3 upgrade=1 from_commit=6ca76697a8f8da7419eb490aa435649f1b9d96c2 backup_restore=1 - multi_instance=0 + multi_instance=1 port_already_use=0 change_url=1 ;;; Options diff --git a/manifest.json b/manifest.json index 7900db8..d410071 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "requirements": { "yunohost": ">= 11.0.0" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx" ], From f896e1c3fb05bb0e77a85ab93a1b3f8b8386eeb9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 22 Sep 2022 02:40:04 +0200 Subject: [PATCH 09/11] Disabling sandboxing --- conf/systemd.service | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index eef34bf..02006c4 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -22,16 +22,16 @@ ExecStart=/usr/bin/java \ # See https://www.freedesktop.org/software/systemd/man/systemd.exec.html # for details -DeviceAllow=char-alsa rw -NoNewPrivileges=yes -PrivateTmp=yes -PrivateUsers=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 -RestrictNamespaces=yes -RestrictRealtime=yes -DevicePolicy=closed -SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap -ReadWritePaths=__FINALPATH__ +#DeviceAllow=char-alsa rw +#NoNewPrivileges=yes +#PrivateTmp=yes +#PrivateUsers=yes +#RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +#RestrictNamespaces=yes +#RestrictRealtime=yes +#DevicePolicy=closed +#SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap +#ReadWritePaths=__FINALPATH__ # You can uncomment the following line if you're not using the jukebox # This will prevent airsonic from accessing any real (physical) devices @@ -40,10 +40,10 @@ ReadWritePaths=__FINALPATH__ # You can change the following line to `strict` instead of `full` # if you don't want airsonic to be able to # write anything on your filesystem outside of AIRSONIC_HOME. -ProtectSystem=full -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes +#ProtectSystem=full +#ProtectControlGroups=yes +#ProtectKernelModules=yes +#ProtectKernelTunables=yes # You can uncomment the following line if you don't have any media # in /home/…. This will prevent airsonic from ever reading/writing anything there. From 67715593ed87db872046c294c97a45ebc092b9b6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 22 Sep 2022 02:40:08 +0200 Subject: [PATCH 10/11] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 1e2f445..ccfdd30 100644 --- a/scripts/install +++ b/scripts/install @@ -101,6 +101,8 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# SPECIFIC SETUP #================================================= # CREATE DATA DIRECTORY #================================================= From 8ed7ba423fd2e5666d8307914d8be4065ddaf30e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 3 Oct 2022 20:15:31 +0000 Subject: [PATCH 11/11] Auto-update README --- README.md | 2 +- README_fr.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a28bd4..db2837b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ If you have constrained bandwidth, you may set an upper limit for the bit rate o In addition to being a streaming media server, Airsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Airsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes. -**Shipped version:** 11.0.0-SNAPSHOT.20220625052932~ynh1 +**Shipped version:** 11.0.0-SNAPSHOT.20220625052932~ynh1 *(:warning: This is the `advanced` branch. The [`master` branch](https://github.com/YunoHost-Apps/airsonic_ynh/tree/master) used in the catalog is currently on version 10.6.2\~ynh3.)* ## Screenshots diff --git a/README_fr.md b/README_fr.md index 2897259..2951bca 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,16 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Airsonic-Advanced est une implĂ©mentation plus moderne de la bifurcation d'Airsonic avec plusieurs amĂ©liorations clĂ©s en termes de performances et de fonctionnalitĂ©s. Elle ajoute et remplace plusieurs fonctionnalitĂ©s d'Airsonic. -**Version incluse :** 11.0.0-SNAPSHOT.20220625052932~ynh1 +Airsonic est un streamer multimĂ©dia gratuit, basĂ© sur le web, qui fournit un accès omniprĂ©sent Ă  votre musique. Utilisez-le pour partager votre musique avec vos amis, ou pour Ă©couter votre propre musique au travail. Vous pouvez diffuser votre musique sur plusieurs lecteurs simultanĂ©ment, par exemple sur un lecteur dans votre cuisine et un autre dans votre salon. + +Airsonic est conçu pour gĂ©rer de très grandes collections de musique (des centaines de gigaoctets). Bien qu'il soit optimisĂ© pour le streaming MP3, il fonctionne pour tout format audio ou vidĂ©o pouvant ĂŞtre diffusĂ© par HTTP, par exemple AAC et OGG. En utilisant des plug-ins de transcodage, Airsonic prend en charge la conversion et le streaming Ă  la volĂ©e de pratiquement tous les formats audio, notamment WMA, FLAC, APE, Musepack, WavPack et Shorten. + +Si vous avez une bande passante limitĂ©e, vous pouvez fixer une limite supĂ©rieure pour le dĂ©bit binaire des flux musicaux. Airsonic rĂ©Ă©chantillonnera alors automatiquement la musique Ă  un dĂ©bit binaire appropriĂ©. + +En plus d'ĂŞtre un serveur de mĂ©dias en streaming, Airsonic fonctionne très bien comme un jukebox local. L'interface web intuitive, ainsi que les fonctions de recherche et d'indexation, sont optimisĂ©es pour une navigation efficace dans les grandes bibliothèques de mĂ©dias. Airsonic est Ă©galement livrĂ© avec un rĂ©cepteur de podcasts intĂ©grĂ©, avec la plupart des fonctionnalitĂ©s que vous trouvez dans iTunes. + + +**Version incluse :** 11.0.0-SNAPSHOT.20220625052932~ynh1 *(:warning: Il s'agit de la branche `advanced`. La [branche `master`](https://github.com/YunoHost-Apps/airsonic_ynh/tree/master) utilisĂ©e dans le catalogue est actuellement en 10.6.2\~ynh3.)* ## Captures d'Ă©cran