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

Fix linter warnings

This commit is contained in:
ericgaspar 2021-04-05 23:50:32 +02:00
parent 955046e5b1
commit 68457bbd5d
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 28 additions and 44 deletions

View file

@ -1,7 +1,7 @@
# Mopidy for YunoHost # Mopidy for YunoHost
[![Integration level](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg)
[![Install mopidy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) [![Install Mopidy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -9,8 +9,7 @@
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Mopidy - is an extensible music server. Mopidy - is an extensible music server. It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer.
It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer.
**Shipped version:** 3.1.1 **Shipped version:** 3.1.1
@ -42,13 +41,13 @@ This installation is shipped with various extensions:
#### Multi-user support #### Multi-user support
Are LDAP and HTTP auth supported? No \ * Are LDAP and HTTP auth supported? **No**
Can the app be used by multiple users? ?? * Can the app be used by multiple users? ??
#### Supported architectures #### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
## Limitations ## Limitations
@ -57,12 +56,9 @@ Can the app be used by multiple users? ??
## Additional information ## Additional information
* To list current settings enter `sudo mopidyctl config`. * To list current settings enter `sudo mopidyctl config`.
* Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust mopidy's configuration. * Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust Mopidy's configuration.
* To rebuild the database of your local music collection enter `sudo mopidyctl local scan`. * To rebuild the database of your local music collection enter `sudo mopidyctl local scan`.
**More info on the documentation page:**
https://yunohost.org/packaging_apps
## Links ## Links
* Report a bug: https://github.com/YunoHost-Apps/mopidy_ynh/issues * Report a bug: https://github.com/YunoHost-Apps/mopidy_ynh/issues
@ -73,7 +69,6 @@ https://yunohost.org/packaging_apps
## Developer info ## Developer info
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.

View file

@ -1,7 +1,7 @@
# Mopidy pour YunoHost # Mopidy pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg)
[![Installer mopidy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) [![Installer Mopidy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
@ -9,8 +9,7 @@
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
## Vue d'ensemble ## Vue d'ensemble
Mopidy - est un serveur de musique extensible. Mopidy - est un serveur de musique extensible. Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming.
Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming.
Vous pouvez modifier la liste de lecture à partir d'un téléphone, d'une tablette ou d'un ordinateur. Vous pouvez modifier la liste de lecture à partir d'un téléphone, d'une tablette ou d'un ordinateur.
**Version incluse :** 3.1.1 **Version incluse :** 3.1.1
@ -40,17 +39,18 @@ Cette installation est livrée avec différentes extensions:
## Documentation ## Documentation
* Documentation officielle : https://docs.mopidy.com/en/latest/ * Documentation officielle : https://docs.mopidy.com/en/latest/
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost
#### Support multi-utilisateur #### Support multi-utilisateur
* L'authentification LDAP et HTTP est-elle prise en charge ? Non * L'authentification LDAP et HTTP est-elle prise en charge ? **Non**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? * L'application peut-elle être utilisée par plusieurs utilisateurs ?
#### Architectures supportées #### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
## Limitations ## Limitations
@ -59,12 +59,9 @@ Cette installation est livrée avec différentes extensions:
## Informations additionnelles ## Informations additionnelles
* Pour lister les paramètres actuels, entrez `sudo mopidyctl config` * Pour lister les paramètres actuels, entrez `sudo mopidyctl config`
* Modifiez le fichier /opt/yunohost/mopidy/mopidy.conf pour ajuster la configuration de mopidy * Modifiez le fichier `/opt/yunohost/mopidy/mopidy.conf` pour ajuster la configuration de mopidy
* Pour reconstruire la base de données de votre collection de musique locale, entrez `sudo mopidyctl local scan` * Pour reconstruire la base de données de votre collection de musique locale, entrez `sudo mopidyctl local scan`
**Plus d'informations sur la page de documentation :**
https://yunohost.org/packaging_apps
## Liens ## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/mopidy_ynh/issues * Signaler un bug : https://github.com/YunoHost-Apps/mopidy_ynh/issues
@ -75,7 +72,6 @@ https://yunohost.org/packaging_apps
## Informations pour les développeurs ## Informations pour les développeurs
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.

View file

@ -17,7 +17,7 @@
"email": "cyp@rouquin.me" "email": "cyp@rouquin.me"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.0.8" "yunohost": ">= 4.1.7"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -28,29 +28,21 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Mopidy"
},
"example": "example.com" "example": "example.com"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Mopidy"
},
"example": "/example", "example": "/example",
"default": "/mopidy" "default": "/mopidy"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": { "help": {
"en": "Is it a public application?" "en": "Public app can be used by anonymous visitors",
"fr": "L'application publique peut être utilisée par des visiteurs anonymes "
}, },
"help": {
"en": "public app can be used by anonymous visitors"
},
"default": false "default": false
} }
] ]

View file

@ -66,7 +66,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=30 ynh_script_progression --message="Installing dependencies..." --weight=30
ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -151,7 +152,7 @@ chown $app: $final_path
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log_type systemd --description "this is mopidy, a music server" yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -188,9 +189,9 @@ ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Provide additional shell comand..." ynh_script_progression --message="Provide additional shell comand..."
cp -a ../sources/extra_files/mopidyctl "$cmd_file" cp -a ../sources/extra_files/mopidyctl "$cmd_file"
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file" ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file"
ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file" ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file"
chmod +x "$cmd_file" chmod +x "$cmd_file"

View file

@ -89,7 +89,7 @@ ynh_restore_file --origin_path="$final_path" # /opt/yunohost/mopidy
ynh_script_progression --message="Reinstalling dependencies..." --weight=50 ynh_script_progression --message="Reinstalling dependencies..." --weight=50
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
@ -104,7 +104,7 @@ systemctl enable $app.service --quiet
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --log_type systemd --description "this is mopidy, a music server" yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# RESTORE VARIOUS FILES # RESTORE VARIOUS FILES

View file

@ -102,7 +102,7 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=11 ynh_script_progression --message="Upgrading dependencies..." --weight=11
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -162,7 +162,7 @@ chown $app: $final_path
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --log_type systemd --description "this is mopidy, a music server" yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE