When an audio file contains a line feed (hex 0a) in a tag this is retained in the MPD response for this file which is then correctly identified as an invalid response by clients.
The example below is for a FLAC file containing a line feed in the Title tag, between "Presto ma non assai -" and "Tempo I".
MPD response extracted from mopidy debug log:
May 10 06:47:41 beta mopidy[5617]: file: local:track:purchased/a/brahms-symphony-2/track03.flac
May 10 06:47:41 beta mopidy[5617]: Time: 293
May 10 06:47:41 beta mopidy[5617]: Artist: Brahms, Johannes
May 10 06:47:41 beta mopidy[5617]: Album: Sinfonie 2 D op. 73
May 10 06:47:41 beta mopidy[5617]: Title: 3. Allegretto grazioso (quasi andantino) - Presto ma non assai -
May 10 06:47:41 beta mopidy[5617]: Tempo I
May 10 06:47:41 beta mopidy[5617]: Date: 2016
May 10 06:47:41 beta mopidy[5617]: Track: 3/4
May 10 06:47:41 beta mopidy[5617]: AlbumArtist: Thomas Dausgaard, Swedish Chamber Orchestra, Thomas Dausgaard
May 10 06:47:41 beta mopidy[5617]: Composer: Swedish Chamber O, Dausgaard
May 10 06:47:41 beta mopidy[5617]: Genre: AO/Romantic
May 10 06:47:41 beta mopidy[5617]: Disc: 1
May 10 06:47:41 beta mopidy[5617]: Last-Modified: 2019-08-02T08:43:22Z
May 10 06:47:41 beta mopidy[5617]: X-AlbumUri: local:album:md5:cfd3d8c0c2d8bef03e0d6d4c2d7c25d5
May 10 06:47:41 beta mopidy[5617]: OK
I realise that the FLAC file should not contain this line feed in the first place, however it would be helpful and good practice if mopidy could compensate this problem by removing the line feed before constructing the MPD response.
My apologies - this issue should have been raised in mopidy-mpd, not mopidy. Can it be transferred?
mopidy-mpd issue 7 is related (but limited to comments tags, so this is not a duplicate).
When an audio file contains a line feed (hex 0a) in a tag this is retained in the MPD response for this file which is then correctly identified as an invalid response by clients.
The example below is for a FLAC file containing a line feed in the Title tag, between "Presto ma non assai -" and "Tempo I". MPD response extracted from mopidy debug log:
May 10 06:47:41 beta mopidy[5617]: file: local:track:purchased/a/brahms-symphony-2/track03.flac May 10 06:47:41 beta mopidy[5617]: Time: 293 May 10 06:47:41 beta mopidy[5617]: Artist: Brahms, Johannes May 10 06:47:41 beta mopidy[5617]: Album: Sinfonie 2 D op. 73 May 10 06:47:41 beta mopidy[5617]: Title: 3. Allegretto grazioso (quasi andantino) - Presto ma non assai - May 10 06:47:41 beta mopidy[5617]: Tempo I May 10 06:47:41 beta mopidy[5617]: Date: 2016 May 10 06:47:41 beta mopidy[5617]: Track: 3/4 May 10 06:47:41 beta mopidy[5617]: AlbumArtist: Thomas Dausgaard, Swedish Chamber Orchestra, Thomas Dausgaard May 10 06:47:41 beta mopidy[5617]: Composer: Swedish Chamber O, Dausgaard May 10 06:47:41 beta mopidy[5617]: Genre: AO/Romantic May 10 06:47:41 beta mopidy[5617]: Disc: 1 May 10 06:47:41 beta mopidy[5617]: Last-Modified: 2019-08-02T08:43:22Z May 10 06:47:41 beta mopidy[5617]: X-AlbumUri: local:album:md5:cfd3d8c0c2d8bef03e0d6d4c2d7c25d5 May 10 06:47:41 beta mopidy[5617]: OK
I realise that the FLAC file should not contain this line feed in the first place, however it would be helpful and good practice if mopidy could compensate this problem by removing the line feed before constructing the MPD response.
Environment: Raspberry Pi 3 Raspbian GNU/Linux 10 (buster) mopidy 3.1.1 ncmpcpp 0.9.2