Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mopidy-MPD retains line feeds in tags in MPD response #43

Closed
ohrenkram opened this issue May 10, 2021 · 1 comment · Fixed by #54
Closed

Mopidy-MPD retains line feeds in tags in MPD response #43

ohrenkram opened this issue May 10, 2021 · 1 comment · Fixed by #54

Comments

@ohrenkram
Copy link

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

@ohrenkram
Copy link
Author

ohrenkram commented May 10, 2021

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).

@jodal jodal transferred this issue from mopidy/mopidy May 10, 2021
@jodal jodal closed this as completed in #54 Jan 30, 2022
@jodal jodal added this to the New bugfix release milestone Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants