Comments (7)
That would be a good idea, but since supysonic is a WSGI application and not a standalone one, it will certainly require another process/daemon for the file system watcher.
I'll take a look...
from supysonic.
Oups, wrong buttons. You're right. But right now I use the CLI via cronjob.
I wonder: How is that working when the daemon watches the music directory and you add or remove a new music directory via web interface at runtime?
from supysonic.
Right now I see three solutions:
- restart the daemon each time you edit the music directory list
- write the music directory list to a file (automatically modified each time you add or remove a directory) and have the daemon also monitor this file
- have the daemon query the list on a regular basis and then start or stop watchers accordingly
The first one is the easiest, and I guess if you have administrative rights on the app, you should also have access to the server to create/delete the folders on disk and then the rights to start daemons.
The second solution is ugly, I wouldn't go that way.
Either way, they would require the user to run a scan if a creates a directory that is not empty when the watcher is started.
I came across watchdog for a cross-platform implementation.
from supysonic.
Hi spl0k, sorry for the late feedback. I forgot about it.
I just tested it and it seems to work so far.
I had a little problem with watchdog failing with an exception when I had subfolders that could not be opened due to missing permissions (.Trash-1000 folders, etc.). But other than that, it seems fine. :-)
Great work! 👍
I started the watcher using a systemd service file:
[Unit]
Description=supysonic-watcher monitors music folders for the supysonic webapp
After=local-fs.target
[Service]
Type=simple
ExecStart=/path/to/supysonic-watcher
User=supysonic
Group=supysonic
[Install]
WantedBy=multi-user.target
from supysonic.
Thanks.
There's still a bit of work to do though. I plan on providing some OS-dependent scripts to run it as a real daemon and not just a foreground console command. I am thinking about an init script, systemd (maybe using yours as a starting point), and maybe others.
from supysonic.
Indeed, I googled and found python-daemon but didnt want to change so much since it would be platform-dependent.
from supysonic.
I'll finally won't provide any systemd file and leave it to package maintainers. Yours might need a small update as it not a simple service anymore but a forking one.
I guess the daemon is stable enough (and merged to master) so I'll close this issue, even if I plan on improving it.
from supysonic.
Related Issues (20)
- FR: Reach API level 1.11.0 HOT 6
- supysonic-server command not available HOT 2
- Testsuite failure with Python 3.11 HOT 9
- supysonic-daemon as normal user HOT 2
- supysonic-daemon settings HOT 5
- PostgreSQL error HOT 8
- Ongoing work to extend subsonic API HOT 7
- Error during migration with 7.4 HOT 2
- Intermittent '500 Internal Server Error' (possibly due to postgres query syntax) HOT 3
- Server error when accessing starred albums
- [Enchancement] Gunicorn request size limit HOT 3
- peewee.OperationalError: Server has gone away HOT 3
- Multiple artist albums have only 1 track HOT 4
- ValueError: badly formed hexadecimal UUID string in getAlbum.view HOT 2
- Error message should be logged on login failure
- can't play songs with accented character when using supysonic wsgi HOT 3
- tests/frontend/test_user.py tries to import escape from flask
- More folder management options HOT 2
- flaky test tests.base.test_watcher.AudioWatcherTestCase.test_move_out causes timeouts HOT 3
- Postgresql migration to 0.7.7. fails due to syntax (reserved word)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supysonic.