Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headphones: update to Python 3.10 #5488

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spk/headphones/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
SPK_NAME = headphones
SPK_VERS = $(shell date +%Y%m%d)
SPK_REV = 10
SPK_REV = 11
SPK_ICON = src/headphones.png

DEPENDS =
SPK_DEPENDS = "python>2.7.3-3:git"
SPK_DEPENDS = "python310:git"

MAINTAINER = Diaoul
DESCRIPTION = Headphones is an automatic NZB and torrent downloader for music. Mark albums as wanted and have them downloaded as soon as they are available. Different quality settings are possible, including lossless. With Headphones you can also manage your music library automatically: move, tag, rename and index for your DiskStation.
DESCRIPTION_FRE = Headphones permet le téléchargement automatique de musique via NZB ou torrent. Indiquez les albums que vous désirez et ils seront téléchargés dès que possible. Pous pouvez choisir entre différentes qualités, dont le lossless. Avec Headphones, vous pouvez aussi gérer votre bibliothèque musicale automatiquement: déplacement, tag, renommage et indexation pour votre DiskStation.
DESCRIPTION_SPN = Headphones permite descargar automáticamente música mediante NZB o torrent. Puedes marcar albumes y estos serán descargados en cuanto estén disponibles. Es posible utilizar diferentes calidades, incluido lossless \(sin pedida\). Con Headphones tambien puedes administrar tu libreria: mover, taguear, renombrar e indexar en el DiskStation
DISPLAY_NAME = Headphones
CHANGELOG = "Fix DSM 6 service start."
CHANGELOG = "1. Update to Python 3.10.<br/>2. Add DSM 7 compatibility."

HOMEPAGE = https://github.com/rembo10/headphones
LICENSE = GPLv3
Expand Down
2 changes: 1 addition & 1 deletion spk/headphones/src/config.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[General]
config_version = 2
config_version = 6
launch_browser = 0
folder_permissions = 0777
http_port = 8181
Expand Down
21 changes: 5 additions & 16 deletions spk/headphones/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
PYTHON_DIR="/var/packages/python/target/bin"
PYTHON_DIR="/var/packages/python310/target/bin"
GIT_DIR="/var/packages/git/target/bin"
PATH="${SYNOPKG_PKGDEST}/bin:${SYNOPKG_PKGDEST}/env/bin:${PYTHON_DIR}:${GIT_DIR}:${PATH}"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python"
VIRTUALENV="${PYTHON_DIR}/virtualenv"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python3"
HEADPHONES="${SYNOPKG_PKGDEST}/share/Headphones/Headphones.py"
CFG_FILE="${SYNOPKG_PKGDEST}/var/config.ini"
CFG_FILE="${SYNOPKG_PKGVAR}/config.ini"

SERVICE_COMMAND="${PYTHON} ${HEADPHONES} --daemon --pidfile ${PID_FILE} --config ${CFG_FILE} --datadir ${SYNOPKG_PKGDEST}/var/"
SERVICE_COMMAND="${PYTHON} ${HEADPHONES} --daemon --pidfile ${PID_FILE} --config ${CFG_FILE} --datadir ${SYNOPKG_PKGVAR}/"

GROUP="sc-download"
LEGACY_GROUP="sc-media"

service_postinst ()
{
# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env

# If nessecary, add user also to the old group
syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "${LEGACY_GROUP}"

# Remove legacy user
# Commands of busybox from spk/python
delgroup "${USER}" "users"
deluser "${USER}"
install_python_virtualenv
}

4 changes: 2 additions & 2 deletions spk/headphones/src/wizard/install_uifile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Attention! DSM6 Permissions",
"step_title": "DSM Permissions",
"items": [{
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>The group 'users' is no longer used as of DSM 6.<br>Package user will not appear on most UI settings.<br>Please read <a <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
"desc": "Permissions for download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Internal package user will not appear on most UI settings.<br>Please read <a <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
}]
}]
4 changes: 2 additions & 2 deletions spk/headphones/src/wizard/install_uifile_fre
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Attention! Permissions DSM",
"step_title": "Permissions DSM",
"items": [{
"desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM.<br>Le groupe 'users' n'est plus utilisé depuis DSM 6.<br>L'utilisateur spécifique à l'application n'apparaît plus dans la plupart des interfaces de configuration.<br>Merci de lire <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> pour plus de détails."
"desc": "Les permissions des applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM.<br>L'utilisateur spécifique à l'application n'apparaît plus dans la plupart des interfaces de configuration.<br>Merci de lire <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> pour plus de détails."
}]
}]
4 changes: 2 additions & 2 deletions spk/headphones/src/wizard/upgrade_uifile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Attention! DSM6 Permissions",
"step_title": "DSM Permissions",
"items": [{
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>The group 'users' is no longer used as of DSM 6.<br>Package user will not appear on most UI settings.<br>Please read <a <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
"desc": "Permissions for download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Internal package user will not appear on most UI settings.<br>Please read <a <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
}]
}]
4 changes: 2 additions & 2 deletions spk/headphones/src/wizard/upgrade_uifile_fre
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Attention! Permissions DSM",
"step_title": "Permissions DSM",
"items": [{
"desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM.<br>Le groupe 'users' n'est plus utilisé depuis DSM 6.<br>L'utilisateur spécifique à l'application n'apparaît plus dans la plupart des interfaces de configuration.<br>Merci de lire <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> pour plus de détails."
"desc": "Les permissions des applications de téléchargement sont gérées par le groupe <b>'sc-download'</b> dans DSM.<br>L'utilisateur spécifique à l'application n'apparaît plus dans la plupart des interfaces de configuration.<br>Merci de lire <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> pour plus de détails."
}]
}]