mpd: Remove "Comment" tag type from translator output.

Newer versions of the protocol have removed this tag, so we should as well.
This also works around the issue of #881 which was breaking things with
newlines in comment fields.

The readcomments command seems to replace this, but it seems to only care about
specific extra tagtypes, not the general comment tag we normally collect when
scanning things.
This commit is contained in:
Thomas Adamcik 2014-12-14 14:16:37 +01:00
parent 2c3217685b
commit 08a8d5c43b
2 changed files with 2 additions and 5 deletions

View File

@ -81,9 +81,6 @@ def track_to_mpd_format(track, position=None):
if track.disc_no:
result.append(('Disc', track.disc_no))
if track.comment:
result.append(('Comment', track.comment))
if track.musicbrainz_id is not None:
result.append(('MUSICBRAINZ_TRACKID', track.musicbrainz_id))
return result

View File

@ -73,10 +73,10 @@ class TrackMpdFormatTest(unittest.TestCase):
self.assertIn(('Track', '7/13'), result)
self.assertIn(('Date', datetime.date(1977, 1, 1)), result)
self.assertIn(('Disc', '1'), result)
self.assertIn(('Comment', 'a comment'), result)
self.assertIn(('Pos', 9), result)
self.assertIn(('Id', 122), result)
self.assertEqual(len(result), 15)
self.assertNotIn(('Comment', 'a comment'), result)
self.assertEqual(len(result), 14)
def test_track_to_mpd_format_musicbrainz_trackid(self):
track = self.track.copy(musicbrainz_id='foo')