Chocobo1/foo_xspf_1

Add UPL support?

Closed this issue · 5 comments

Hello,

Would it be possible to add UPL support to this plugin? It's a format I wrote that aims to do what XSPF does, but is more modern and standardizes more features.

I've been trying to write editor plugins, but my C++ isn't great, so any help would be appreciated.

Would it be possible to add UPL support to this plugin?

XSPF is based on XML, so in short, not here.
I'll open a new repo if I'm going to do it.

I do have interest seeing how your new format works out, is it close to a stable release/version?


Another thought here, I read:

3.2.7. ids
Clients SHOULD ignore unknown identifier types, but MUST NOT strip them from the file, and MUST include them in case the file is written again.

Does it mean, if I imported some songs via UPL format to fb2k, and now I export them to another UPL playlist/file, I must include all the ids fields?
If yes, I foresee I'll have trouble on this, AFAIK fb2k has it's own db schema which is closely related to ID3 format and so fb2k doesn't record md5/sha* hashes in it's db, I'll have to calculate multiple hashes for every exported file and the harddisk could be slow.
It would be nice if the sentence can be relaxed as follow:

Clients SHOULD ignore unknown identifier types, but MUST NOT strip them from the file, and SHOULD include them in case the file is written again.

I do have interest seeing how your new format works out, is it close to a stable release/version?

It's stable enough to implement, as in nothing should change backwards-incompatibly. However, there's a chicken-and-egg problem in that people don't want to implement it until others have implemented it.

Half the purpose for an implementation is to see what needs people will have and adjust features accordingly. Otherwise, I've been using it in a beets plugin I wrote and it works quite well, so I think it's safe enough for implementation.

Does it mean, if I imported some songs via UPL format to fb2k, and now I export them to another UPL playlist/file, I must include all the ids fields?

Not if you import the files and then export them later. It means that, if your application is loading a specific playlist for modification and then writing it back out, you shouldn't strip unknown identifiers.

If you're loading a playlist in foobar2000, and then exporting that list again, it doesn't count as the same playlist any more. You've imported a playlist and are now writing out a new playlist. I will clarify the spec there, thank you.

I've given it some more thought and I have changed it to a SHOULD. You're right, it's fairly hard to specify exactly when people should and shouldn't keep metadata, it's better to just trust client developers to do the right thing. Hopefully Foobar2000 allows people to add custom fields, but, if not, dropping the identifiers is good as a last resort.

Thanks for the clarification!
Cannot make promise about when I'll have time to create the plugin, but certainly it is on my todo list.