-
-
Notifications
You must be signed in to change notification settings - Fork 54
drop2beets implementation #138
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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!
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
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).
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/rununtil 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-notifyoncheckdoes, but adding it stopped the rest of the stuff from proceeding. so i just used a&sign to start the plugin in the backgroundSource / References:
the link to the drop2beets project: https://github.com/martinkirch/drop2beets/tree/master