Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think rather than having a single URI attribute and other identifiers, you ought to allow multiple URIs, and make all other identifiers just be URIs (since, after all, a URI is a Uniform Resource Identifier, and music files are resources).

You can represent hashes using the named-information URI scheme (https://tools.ietf.org/html/rfc6920), e.g. ni:///sha-256;u88lYWn4xAlto-6Bs79KHHYDAu28US71ui5Be6C-ZVw.

Your filepath could be file:///Anciients/Following%20the%20Voice.mp3; your mbtrackid could be musicbrainz:b00a2b97-53f1-485a-9121-1fe76b55e651 (since I don't think an authority makes sense in this case).

This would also permit multiple entries for certain types of identifier, which doesn't make so much sense for hashes (although it's possible for the same recording to have two different MP3 encodings, so … maybe it's not crazy), but would be nice when e.g. a song is found in multiple places in the filesystem, or can be retrieved from multiple locations.



This isn't too different from the current format, except the URI method is pushing the type into the URI, rather than into the name of the key.

I do wonder about what you said, though: Would it be useful to be able to specify two different file paths or URIs for the same item? I'm leaning towards no, because, when clicking on an entry, you want it to start playing, so the choice is made when adding the file, rather than when playing it. The problem with multiple file paths is that both have the same weight, so how do you choose?

I guess you'd choose the same way you choose between the formats already, based on whatever is available/found.


> This isn't too different from the current format, except the URI method is pushing the type into the URI, rather than into the name of the key.

Yup, which I think is good, since URI schemes already exist for many identifiers, and more can be added.

> Would it be useful to be able to specify two different file paths or URIs for the same item?

I think so. Maybe one is one removable medium and the other is on another.

> The problem with multiple file paths is that both have the same weight, so how do you choose?

If they have equal weight, does it matter which you choose?


You're right, I have updated the spec to make each item a list. Since the URIs can be anything (including files), this is pretty much equivalent to your proposal.


That is exactly the approach taken in XSPF: http://www.xspf.org/xspf-v1.html#rfc.section.4.1.1.2.14.1.1....

Notice that the cardinality is "zero or more."


You have swayed me, I have updated the spec, thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: