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

upload functionality? #141

Open
puhoy opened this issue Mar 20, 2019 · 1 comment
Open

upload functionality? #141

puhoy opened this issue Mar 20, 2019 · 1 comment

Comments

@puhoy
Copy link

puhoy commented Mar 20, 2019

i am using supysonic together with beets (to manage the music library) for a few weeks now, to serve music for me and a friend. a feature that i would really like to see is the possibility to upload music via the web frontend.

since this is not really in the scope of subsonic, is this something you would like to merge?

i imagine something like

  • the user drops a song or an album in the web frontend, it gets uploaded
  • beets tries an automatic import, and if thats not working, it throws the album in a separate folder, so the admin could import/delete it later via command line
  • after import, supysonic-watcher detects the new files and updates the db

the pragmatic solution would probably be to upload via sftp, and some file watcher that triggers beets import - but i guess uploads via web frontend would be easier for everybody.

another thought on that: its probably not nice to hardcode the use of beets. maybe it would be better to just specify a command to run after the upload is finished. (maybe thats just a cp to the library as a default?)

so, if this is a wanted feature i would like to work on that - i just thought i ask for other opinions first :)

@spl0k
Copy link
Owner

spl0k commented Mar 30, 2019

I can't decide if an upload feature would be interesting for the project or not, but this isn't something I would work on myself (mostly because laziness). But if this were to be implemented proper specifications should be defined first, such as:

  • user roles, do we only allow admins to upload media or should we define a new user permission? (thus requiring a bit of work on user management)
  • where do files get uploaded to? Since the Subsonic API allows to browse not only by metadata but also via filesystem hierarchy, should we provide some kind of browser to allow the user choosing where to put their files or or should we just define some special folder where all uploads get dumped to?
  • name collision handling
  • invalid files filtering
  • ...

Your beets/watcher workflow feels wrong.
First, as you suggested, harcoding a beets command is a bad idea. Providing a post-upload command setting would be a good way to allow some postprocessing.
Since we would uploading files from Supysonic's web interface we could scan those right away, no need to wait for the watcher to kick in. And that would help filter out invalid files. Plus the watcher being optional, some people don't use it, breaking your proposed flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants