From 009a2dd65727590150c80245fdcda25d49bbb558 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Thu, 1 Oct 2009 18:36:16 +0200 Subject: [PATCH] Write both TRACKTOTAL and DISCTOTAL to vorbis comments. Still write the old TOTALTRACKS and TOTALDISCS for compatibility reasons. --- picard/formats/vorbis.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/picard/formats/vorbis.py b/picard/formats/vorbis.py index 0170a531e..d4d2774b4 100644 --- a/picard/formats/vorbis.py +++ b/picard/formats/vorbis.py @@ -113,6 +113,12 @@ class VCommentFile(File): name = "fingerprint" value = "MusicMagic Fingerprint%s" % value tags.setdefault(name.upper().encode('utf-8'), []).append(value) + + if "totaltracks" in metadata: + tags.setdefault(u"TRACKTOTAL", []).append(metadata["totaltracks"]) + if "totaldiscs" in metadata: + tags.setdefault(u"DISCTOTAL", []).append(metadata["totaldiscs"]) + if settings['save_images_to_tags']: for mime, data in metadata.images: if self._File == mutagen.flac.FLAC: