-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support creating playlists from m3u playlist files #34
Comments
|
Any interest in having this as a feature? Should I try to clean it up or just continue using it for myself? |
|
It'll be difficult to get something that works. |
|
Indeed, the general scenario does not always work like that. |
|
@andrenam how do you import playlists from a cronjob? i'd love to do that myself... i looked at the database layout and couldn't make head or tails of it. for example, I just created a playlist from an album and supysonic created this in the MySQL database: The first thing that surprised me are the I was hoping I could just sync on-disk m3u playlists I generate from mpd into supysonic as well, so I would really like to see how @andrenam does their cronjob things. :) |
|
Primary keys are all UUIDs. Pony tends to store them as their binary representation, you'll have more luck making sense of them on PostgreSQL since it natively support this type. The I don't know about @andrenam setup, but at that time Supysonic used storm rather than PonyORM, and storm stored UUIDs in a nicer representation than Pony does. |
|
oh wow, weird. binary UUIDs. :) i did not know this was a PostgreSQL thing... it might be worth outlining pgsql as the primary supported database if weird stuff like that happens in MySQL :) But it seems MySQL 8 (?!) has added support for UUIDs according to this post. And there seems to be a BIN_TO_UUID function I can use to do magic stuff with it, so it seems I might be able to get away with this without having to deploy a pgsql cluster. In any case, I think it would be great to have something like what @davidbrenner proposed. His patch has some site-specific stuff embeded and would need a little cleaning up, but otherwise it seems sound to me. Another thing to work on for me, I guess. :) |
|
@anarcat: I can get back to you maybe next weekend, as I'm in the middle of moving houses. |
|
On 2019-04-06 06:48:02, nambot wrote:
@anarcat: I can get back to you maybe next weekend, as I'm in the middle of moving houses.
Back in the day, I didnt touch the database directly but used python, imported the relevant supysonic modules and used that to store/add playlists.
That's fine, take your time. :) This is already very useful
information, and any code sample you can throw at us will help
tremendously!
Thanks!
|
|
hello @andrenam ! how was the move? :) did you have time to look into this again? any code you can share with out would be very helpful... thanks! |
I'd like to be able to create playlists from .m3u files. I've written a very rough patch to do this on my own repo of supysonic here: c13b3ae. I just added a route to upload playlists to the frontend to implement it. The path for the uploads and the upload form are both hardcoded and ugly and the error handling is pretty awful, so it should probably be cleaned up before being pulled in. I can do that if there's interest in it.
One other issue related to error handling - due to the way the database is organized, multiple copies of the same song cannot be in the same playlist. I'm not sure how subsonic itself handles it, maybe that's consistent, but to me it's annoying. I'd like the option to have multiple of the same songs. I may end up changing this as well.
The text was updated successfully, but these errors were encountered: