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

Import playlists from directory #2

Open
ReIaxo opened this issue Aug 22, 2024 · 5 comments
Open

Import playlists from directory #2

ReIaxo opened this issue Aug 22, 2024 · 5 comments

Comments

@ReIaxo
Copy link

ReIaxo commented Aug 22, 2024

Hi, I know it is a little bit out of scope for this project but would it be much work for you to adjust you playlist import script a little to import all playlists from a directory to strawberry (starred)?

I searched the strawberry forum and many people are in search for such a feature, but unfortunately the maintainer has no time for such features. Maybe you can help out?

PS: The other way around, save/export multiple playlists at once is also much wanted. But this is not so ease I think.

@leighsmith
Copy link
Owner

leighsmith commented Aug 22, 2024

Certainly if there are many playlists within the single iTunes XML file exported, all of those will be imported. If I understand you correctly, you want to be able to import multiple iTunes exported XML files, all within a single directory? Each of those could contain multiple playlists. In principle that's fairly straightforward to add, but I wanted to fully comprehend the requirement first?

@ReIaxo
Copy link
Author

ReIaxo commented Aug 22, 2024

Oh sorry, forgot to mention that I have m3u playlists right now. In future I plan to switch to XSPF. So no relation to iTunes. That was what I meant with "out of scope for this project".

@leighsmith
Copy link
Owner

Ahh, ok that clears up some confusion! In principle, it should be fairly straightforward to whip up a different script to do what you want. I'm not familiar with XSPF. Do you want to convert your playlists to Strawberry from m3u or from XSPF?

@ReIaxo
Copy link
Author

ReIaxo commented Aug 22, 2024

I think XSPF is better. Then I convert all m3u playlists I have to it and can then import them.
I don't think you have to go through the whole specification. Strawberry just needs the location of the media file, I think. And XSPF is just XML, so reading it should be simple. There should be a python library?

And for me it only have to work with local files. No streams or such.

@ReIaxo
Copy link
Author

ReIaxo commented Sep 10, 2024

I have implemented the m3u part by myself with a little help from chatgpt. Hope that's ok. For my 100+ playlists with 11k songs in sum it works fine. Should I fork and create a pull request?

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