URIs without authority

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
jawi
Posts: 5
Joined: August 19th, 2014, 12:27 pm

URIs without authority

Post by jawi » August 19th, 2014, 12:29 pm

Is there a reason why mpd only supports URIs with an authority (like: http://host:port/path/to/music.file), but rejects ones without one (eg: sound:path/to/music.file)?

max
Forum team
Posts: 942
Joined: January 15th, 2013, 3:43 pm

Re: URIs without authority

Post by max » August 19th, 2014, 6:01 pm

That has nothing to do with "authority" but with "protocol". MPD knows the "http" protocol (if you compiled with CURL), but "sound" is a protocol I've never heard of.

jawi
Posts: 5
Joined: August 19th, 2014, 12:27 pm

Re: URIs without authority

Post by jawi » August 20th, 2014, 6:48 am

max wrote:That has nothing to do with "authority" but with "protocol". MPD knows the "http" protocol (if you compiled with CURL), but "sound" is a protocol I've never heard of.
Yes and no: the "//" in "http://" indicates that the URI has an authority where resource in question can be accessed, such as the hostname/IP-address and/or credentials. Since this URI now has location information as well, we normally call these URLs, which is what mpd currently only accepts as form of identifier for a remote entity (music file, playlist, etc.).

Looking at the codebase of mpd, it does not care at all about whether it is dealing with an URL or a URI (without authority) as long as it can dispatch it to a plugin that is willing to handle it. In fact, the only thing that currently seems preventing mpd from accepting URIs is the code found in UriUtil.cxx. So, back to my original question, is there a reason for only accepting URIs with authority (aka URLs) instead of all URIs?

max
Forum team
Posts: 942
Joined: January 15th, 2013, 3:43 pm

Re: URIs without authority

Post by max » August 20th, 2014, 7:23 am

jawi wrote:the "//" in "http://" indicates that the URI has an authority where resource in question can be accessed
Hey, you don't need to teach me about URIs. This is pointless, I know that already, and I told you this has nothing to do with authority!
So, back to my original question, is there a reason for only accepting URIs with authority (aka URLs) instead of all URIs?
By now, you already found out that your question is bogus, but why do you repeat that bogus question?

jawi
Posts: 5
Joined: August 19th, 2014, 12:27 pm

Re: URIs without authority

Post by jawi » August 20th, 2014, 7:38 am

max wrote:
jawi wrote:the "//" in "http://" indicates that the URI has an authority where resource in question can be accessed
Hey, you don't need to teach me about URIs. This is pointless, I know that already, and I told you this has nothing to do with authority!
So, back to my original question, is there a reason for only accepting URIs with authority (aka URLs) instead of all URIs?
By now, you already found out that your question is bogus, but why do you repeat that bogus question?
I do not see how the original question is bogus: it is a simple question from somebody who is developing a Spotify-plugin for mpd. Spotify uses URIs like "spotify:track:XYZ", which are valid URIs, but not accepted by mpd since it has no "://" in it...

max
Forum team
Posts: 942
Joined: January 15th, 2013, 3:43 pm

Re: URIs without authority

Post by max » August 20th, 2014, 7:44 am

jawi wrote:I do not see how the original question is bogus
It is bogus because I explained to you already that it has nothing to do with authority, and that it only has to do with protocols that MPD understands.

So, if you are developing a new protocol plugin that comes without authority, sure that'll require some changes. But your questions were about present MPD, and not about your personal MPD fork.

If you need assistance with developing code for MPD, you should say so and give some context. I rejected your mpd-devel email for that reason: it had nothing to do with MPD development, it was a user support request.

jawi
Posts: 5
Joined: August 19th, 2014, 12:27 pm

Re: URIs without authority

Post by jawi » August 20th, 2014, 7:51 am

max wrote:
jawi wrote:I do not see how the original question is bogus
It is bogus because I explained to you already that it has nothing to do with authority, and that it only has to do with protocols that MPD understands.

So, if you are developing a new protocol plugin that comes without authority, sure that'll require some changes. But your questions were about present MPD, and not about your personal MPD fork.

If you need assistance with developing code for MPD, you should say so and give some context. I rejected your mpd-devel email for that reason: it had nothing to do with MPD development, it was a user support request.
I apologise if my questions regarding mpd-related issues were not worded with enough context to be regarded as valid. I'll sure do my best in the future to provide more context.
That said, is there interest in a patch that allows mpd to accept a broader range of URIs?

max
Forum team
Posts: 942
Joined: January 15th, 2013, 3:43 pm

Re: URIs without authority

Post by max » August 20th, 2014, 8:05 am

jawi wrote:That said, is there interest in a patch that allows mpd to accept a broader range of URIs?
I have no personal interest in that, because I use MPD only to play local files and remote files via NFS (nfs://). But if you wish to submit some useful code that you will continue to maintain, we can talk about merging it.

jawi
Posts: 5
Joined: August 19th, 2014, 12:27 pm

Re: URIs without authority

Post by jawi » August 20th, 2014, 8:22 am

max wrote:But if you wish to submit some useful code that you will continue to maintain, we can talk about merging it.
Ok, cool. What is the preferred way of supplying code/patches? The site talks about PRs, but are patches attached to an issue also accepted?

Post Reply