diff --git a/README.md b/README.md index 68aac68..8bcec7f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Audiobookshelf is a self-hosted audiobook server for managing and playing your a * Chromecast support on the web app * Fetch metadata and cover art from several sources -**Shipped version:** 2.0.11~ynh2 +**Shipped version:** 2.0.22~ynh1 **Demo:** https://audiobookshelf.org/ diff --git a/README_fr.md b/README_fr.md index 959dc56..2a619b6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Audiobookshelf est un serveur auto-hébergé pour gérer et lire vos livres audi * Support de Chromecast dans la webapp * Récupération des métadonnées et des pochettes depuis plusieurs sources -**Version incluse :** 2.0.11~ynh2 +**Version incluse :** 2.0.22~ynh1 **Démo :** https://audiobookshelf.org/ diff --git a/conf/app.src b/conf/app.src index bbccc0d..9189dd9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/advplyr/audiobookshelf/archive/refs/tags/v2.0.11.tar.gz -SOURCE_SUM=40f8c592625a5d364e50111518c9a3d29744c4f8678327433a220c16cebec404 +SOURCE_URL=https://github.com/advplyr/audiobookshelf/archive/refs/tags/v2.0.22.tar.gz +SOURCE_SUM=8b3e75fd5f4251e298e5047fac696b6543bf7e5ac873ff8d0cc8c74f5bc0ab3d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f362132..f087890 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Audiobook server for managing and playing your audiobooks", "fr": "Serveur de livres audio pour gérer et lire vos livres audio" }, - "version": "2.0.11~ynh2", + "version": "2.0.22~ynh1", "url": "https://audiobookshelf.org/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/upgrade b/scripts/upgrade index abb6957..3e7d4d5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,19 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +# If datadir doesn't exist, create it +if [ -z $datadir ]; then + datadir=/home/yunohost.app/$app + ynh_app_setting_set --app=$app --key=datadir --value=$datadir + mkdir -p $datadir + rsync -arz "$final_path/config/" "$datadir/config/" --delete-after --remove-source-files + rsync -arz "$final_path/audiobooks/" "$datadir/audiobooks/" --delete-after --remove-source-files + rsync -arz "$final_path/metadata/" "$datadir/metadata/" --delete-after --remove-source-files + chmod 750 "$datadir" + chmod -R o-rwx "$datadir" + chown -R $app:$app "$datadir" +fi + #================================================= # CREATE DEDICATED USER #=================================================