daapclient plugin does not play songs from IPv6 servers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exaile |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Exaile 0.3.1.1
installed from Ubuntu Repositories
Expected Behaviour:
Songs on IPv6 connected DAAP servers should be playable
Actual Behaviour:
Trying to play songs on IPv6 connected DAAP servers results in an error message about an invalid URI
Problem:
The IPv6 IP needs to be escaped with [] within an URI. It is not.
e.g.:
* Class DaapConnection is instantiated
* self.server == "2a20:abcd:
* self.port == 3691
then in "DaapConnection
* uri = "http://
the result will be
uri == "http://
Which will _never_ work, because now the port and ip can't be differentiated.
Instead a correct URI would look like this:
http://[2a02:3e0:
Suggestion for a trivial fix follows:
[..]
+ server_uri = self.server
+ if ":" in server_uri:
+ # is IPv6 IP -> add [] for uri
+ server_uri = "[" + server_uri + "]"
[...]
uri = "http://
- (self.server, self.port, self.database.id, tr.id,
+ (server_uri, self.port, self.database.id, tr.id,
Have you checked to see if it actually works?