I am trying to continue development of an older UI to MPD and have noticed that as of sometime after 0.21.6 the responses from the MPD daemon on the socket have changed. What I noticed is the existing UI php/js chokes when it tries to parse the playlist as the first line is a blank probably with a new line. I was able to get it to parse the playlist by discarding the first line then rendering. I am not a PHP or JS expert, so I am muddling through. I am trying to get the AlbumArtist to sort and parse correctly. This code used to work with an older version of MPD, 0.20.x, and I am trying to update it all. Has there been a change in the output format?
Regards,
Keith
Response change between 0.21.6 and current
Re: Response change between 0.21.6 and current
Be more specific. What has changed in your opinion?
Re: Response change between 0.21.6 and current
Well, what I see is that some responses have a space as the first line. My install is on Arch on a RPi
The installed version of MPD is 0.21.18:
yet on the cli is reports 0.21.11 (strange) and I get no space on "playlist":
when I list albums, though, I get a space (first response is blank) which is that the idtag is missing an artist:
Same for AlbumArtist
...
This is via telnet to the port and it looks fine. When I try it with 0.20.20, I get the same thing. My code, though, is using the socket and the javascript is complaining that the first character is a blank. I am re-working the code to deal with this, but it is a change. How can I query the port the same way?
The installed version of MPD is 0.21.18:
Code: Select all
# pacman -Q | grep mpd
libmpdclient 2.17-1
mpd 0.21.18-1
And the response from MPD is:
root@livingrune(rw):~# mpd -V
Music Player Daemon 0.21.18 (0.21.18)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
...
Code: Select all
# telnet 127.0.0.1 6600
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
OK MPD 0.21.11
playlist
0:file: http://94.23.201.38:8010/stream
1:file: NAS/Music/Radiohead/Pablo Honey/02 Creep.flac
2:file: NAS/Music/Adrian Belew/Mr. Music Head/01_Oh Daddy.m4a
3:file: NAS/Music/EMF/Schubert Dip/02.Long Summer Days.flac
4:file: NAS/Music/EMF/Schubert Dip/03.When Youre Mine.flac
5:file: NAS/Music/Guadalcanal Diary/Jamboree/13_Jamboree.m4a
OK
playlistinfo
file: http://94.23.201.38:8010/stream
Title: Ludwig van Beethoven - Romance for Violin & Orchestra No. 1 in G Major, Op. 40, [Anne Sophie Mutter]
Name: Audiophile Classical
Pos: 0
Id: 1
file: NAS/Music/Radiohead/Pablo Honey/02 Creep.flac
Last-Modified: 2015-03-15T00:54:05Z
Title: Creep
Label: Capitol Records
MUSICBRAINZ_ALBUMARTISTID: a74b1b7f-71a5-4011-9441-d0b5e4122711
Date: 1993-04-20
Disc: 1
AlbumArtistSort: Radiohead
OriginalDate: 1993-02-22
MUSICBRAINZ_ALBUMID: 241499cc-ab40-40c6-8847-fdecf293857a
AlbumArtist: Radiohead
Album: Pablo Honey
MUSICBRAINZ_ARTISTID: a74b1b7f-71a5-4011-9441-d0b5e4122711
Artist: Radiohead
MUSICBRAINZ_TRACKID: 341f2962-744a-4e4d-b076-57acb8970259
ArtistSort: Radiohead
Track: 2
Time: 236
duration: 235.866
Pos: 1
Id: 2
...
Code: Select all
list "album"
Album:
Album: (The Best Of) New Order
Album: ...Best II
...
Code: Select all
list "albumartist"
AlbumArtist:
AlbumArtist: 'Til Tuesday
AlbumArtist: 2CELLOS
AlbumArtist: Adrian Belew
AlbumArtist: Aimee Mann
This is via telnet to the port and it looks fine. When I try it with 0.20.20, I get the same thing. My code, though, is using the socket and the javascript is complaining that the first character is a blank. I am re-working the code to deal with this, but it is a change. How can I query the port the same way?
Re: Response change between 0.21.6 and current
please ignore this. I just checked against 0.20.20 and it seems to behave identically. It must be some other upgrade that has hosed my UI.