Skip to content

Conversation

@bvanroll
Copy link

Drop2beets requires more dependencies than can be included by just dropping in the plugin file. It also seems pretty usefull as it allows the container to run more as a daemon (moving all incoming files under /downloads).

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Drop2beets is a plugin that allows beet to scan a folder and automatically move any files that come into it to the library. It's got some requirements (i think the package is called watchdog) that doesn't come normally on the container.

I've fixed this on my local version fine (execing into the container and running a pip install), but it would maybe be beneficial to include this plugin in the main container since i believe it is in the "spirit" of containers/services (not the strongest argument but well. it's all i got :) )

I did my best to implement it as best as i can without any major changes. added 1 extra package to the pip install at the start, also added an extra run command to make /downloads exist at runtime (since that is what i've set drop2beet to scan for by default)

I've modified the startup script to only run the plugin if the env var DROP_ENABLED is set (any value).

Unfortunately i did have to rewrite the config file a bit. Drop2beet works best with move enabled as opposed to copy so i did change that. I didn't want to assume what way the project would prefer to "template"/edit these config files on launch depending on the parameters, but i'm willing to implement it so it works just like it did before my changes.

Also this is the first time i've ever made a pull request. I'm doing my best o7

Benefits of this PR and context:

It does not fix a bug, however it does allow users another capability of running the container as a service by itself, automatically letting it import tracks that are placed under /downloads into it's library which i personally deem as beneficial and assume others will aswell.

How Has This Been Tested?

I build the dockerfile using podman, using some trial and error testing with modifying the startup script under root/etc/s6-overlay/s6-rc.d/svc-beets/run until i got the plugin to start up only when giving the env var and having it not halt any other parts of the script (web service still starts up)

I admit, i don't really understand what s6-notifyoncheck does, but adding it stopped the rest of the stuff from proceeding. so i just used a & sign to start the plugin in the background

Source / References:

the link to the drop2beets project: https://github.com/martinkirch/drop2beets/tree/master

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.3.1-pkg-832e44ee-dev-51dfc41b50c72ea20dc07b3bfc073ce0c45c34c9-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.3.1-pkg-832e44ee-dev-51dfc41b50c72ea20dc07b3bfc073ce0c45c34c9-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.3.1-pkg-832e44ee-dev-51dfc41b50c72ea20dc07b3bfc073ce0c45c34c9-pr-138
arm64v8-2.3.1-pkg-832e44ee-dev-51dfc41b50c72ea20dc07b3bfc073ce0c45c34c9-pr-138

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.3.1-pkg-a51495dd-dev-0bbd0c73205b499ff4cf865186c38ed3ca63d37d-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.3.1-pkg-a51495dd-dev-0bbd0c73205b499ff4cf865186c38ed3ca63d37d-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.3.1-pkg-a51495dd-dev-0bbd0c73205b499ff4cf865186c38ed3ca63d37d-pr-138
arm64v8-2.3.1-pkg-a51495dd-dev-0bbd0c73205b499ff4cf865186c38ed3ca63d37d-pr-138

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.4.0-pkg-aa56b45d-dev-40e12424b31d294ff2fb1c3997c61854cf8a1d14-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.4.0-pkg-aa56b45d-dev-40e12424b31d294ff2fb1c3997c61854cf8a1d14-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.4.0-pkg-aa56b45d-dev-40e12424b31d294ff2fb1c3997c61854cf8a1d14-pr-138
arm64v8-2.4.0-pkg-aa56b45d-dev-40e12424b31d294ff2fb1c3997c61854cf8a1d14-pr-138

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-504efe8b-dev-0e38b0cbda139dfd4e760cf57160b63afd2dee17-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-504efe8b-dev-0e38b0cbda139dfd4e760cf57160b63afd2dee17-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.5.1-pkg-504efe8b-dev-0e38b0cbda139dfd4e760cf57160b63afd2dee17-pr-138
arm64v8-2.5.1-pkg-504efe8b-dev-0e38b0cbda139dfd4e760cf57160b63afd2dee17-pr-138

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-9b0a8e6d-dev-968d8df5cccedd1783c2e7bd2688e9428a0b42b8-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-9b0a8e6d-dev-968d8df5cccedd1783c2e7bd2688e9428a0b42b8-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.5.1-pkg-9b0a8e6d-dev-968d8df5cccedd1783c2e7bd2688e9428a0b42b8-pr-138
arm64v8-2.5.1-pkg-9b0a8e6d-dev-968d8df5cccedd1783c2e7bd2688e9428a0b42b8-pr-138

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-9406504f-dev-892e7f13da34779c0d2e544272f2865cba09ed62-pr-138/index.html
https://ci-tests.linuxserver.io/lspipepr/beets/2.5.1-pkg-9406504f-dev-892e7f13da34779c0d2e544272f2865cba09ed62-pr-138/shellcheck-result.xml

Tag Passed
amd64-2.5.1-pkg-9406504f-dev-892e7f13da34779c0d2e544272f2865cba09ed62-pr-138
arm64v8-2.5.1-pkg-9406504f-dev-892e7f13da34779c0d2e544272f2865cba09ed62-pr-138

# shellcheck shell=bash

if [[ -v DROP_ENABLED ]]; then
echo "dropbox is enabled"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the echo statement, drop2beets is already logging properly. There's no need for that.


if [[ -v DROP_ENABLED ]]; then
echo "dropbox is enabled"
beet dropbox &
Copy link

@dtrunk90 dtrunk90 Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this line to:

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
    exec \
        s6-setuidgid abc beet dropbox &
else
    exec \
        beet dropbox &
fi

Or move it to its own s6 overlay and get rid of the & at the end of the command.

#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ -v DROP_ENABLED ]]; then
Copy link

@dtrunk90 dtrunk90 Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if an ENV var is better than parsing beet config to see if the plugin is enabled, like I did in ebffeef#diff-3cda36eef1a7876daa6d7d37a13f13b35786f37d0c9db349583eac408013f5ac

@drizuid
Copy link
Member

drizuid commented Dec 30, 2025

is there a reason you can't simply use https://github.com/linuxserver/docker-mods/tree/universal-package-install to install drop2beets like other users have? I'm not sure why we need to force new packages on users that may not want it

@dtrunk90
Copy link

dtrunk90 commented Dec 30, 2025

is there a reason you can't simply use https://github.com/linuxserver/docker-mods/tree/universal-package-install to install drop2beets like other users have? I'm not sure why we need to force new packages on users that may not want it

I didn't knew this was a thing. I've changed my PR #142. If you want to merge this one instead let me know so I'll drop it in my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants