njh / ruby-playlist

A ruby gem to convert playlists between different formats
https://rubygems.org/gems/playlist
MIT License
7 stars 1 forks source link

support for playlist/track metas #20

Open gordielachance opened 2 years ago

gordielachance commented 2 years ago

Hi, your gem is great because I need to convert playlists between several formats. I've based my whole app on the XSPF/JSPF formats since they are standards. But you don't currently support some of their properties, like playlist and track metas. Would it be possible to include that ?

Thanks !

njh commented 2 years ago

Sorry, not had much time to work on this gem for a while.

Yes, would like to add more properties. If it is a simple addition it shouldn't take very long.

What is your usecase for meta? My only reservation is wether it should be a more specific field on the object, what results in a <meta> being added to the XSPF/JSPF.

gordielachance commented 2 years ago

My usercase for metas is that I retrieve my playlists from a Wordpress database, and I want (among others) to store the post ID of the playlist & tracks as metas. But I use them a lot it the whole app.

Please note that JSPF metas are quite weirdly formatted - an array of objects like

 "meta"          : [
   {"prop1" : "value1"},
   {"prop2" : "value2"}
 ],

Thanks !

lucasgonze commented 1 year ago

Speaking as the maintainer on XSPF, I think it's safe to drop "meta" items. This is because they are an extension mechanism, and if your app doesn't know about the specifics of an extension, it doesn't matter whether you keep the data around.

That said, in this case they are actually needed. Let me think about this a little...

@njh is there some mechanism that would be convenient to support?