[SCM] morituri/master: patch by: Ross Burton * morituri/common/program.py: On compilation albums the album artist is different to the artist. If this is the case, morituri should write both tags. Fixes #43.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:21 UTC 2014


The following commit has been merged in the master branch:
commit 1216f13598cf6d6e6ec2d66006a9d25202dc2066
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Jan 9 21:15:44 2011 +0000

    	patch by: Ross Burton
    	* morituri/common/program.py:
    	  On compilation albums the album artist is different to the artist.
    	  If this is the case, morituri should write both tags.
    	  Fixes #43.

diff --git a/ChangeLog b/ChangeLog
index 1d0951f..e28194c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-09  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	patch by: Ross Burton
+
+	* morituri/common/program.py:
+	  On compilation albums the album artist is different to the artist.
+	  If this is the case, morituri should write both tags.
+	  Fixes #43.
+
 2011-01-02  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* morituri/common/program.py:
diff --git a/morituri/common/program.py b/morituri/common/program.py
index a52ea24..771afbc 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -354,19 +354,21 @@ class Program(log.Loggable):
 
         @rtype: L{gst.TagList}
         """
-        artist = u'Unknown Artist'
+        trackArtist = u'Unknown Artist'
+        albumArtist = u'Unknown Artist'
         disc = u'Unknown Disc'
         title = u'Unknown Track'
 
         if self.metadata:
-            artist = self.metadata.artist
+            trackArtist = self.metadata.artist
+            albumArtist = self.metadata.artist
             disc = self.metadata.title
             mbidAlbum = self.metadata.mbid
             mbidTrackAlbum = self.metadata.mbidArtist
 
             if number > 0:
                 try:
-                    artist = self.metadata.tracks[number - 1].artist
+                    trackArtist = self.metadata.tracks[number - 1].artist
                     title = self.metadata.tracks[number - 1].title
                     mbidTrack = self.metadata.tracks[number - 1].mbid
                     mbidTrackArtist = self.metadata.tracks[number - 1].mbidArtist
@@ -384,7 +386,9 @@ class Program(log.Loggable):
 
         # gst-python 0.10.15.1 does not handle unicode -> utf8 string conversion
         # see http://bugzilla.gnome.org/show_bug.cgi?id=584445
-        ret[gst.TAG_ARTIST] = artist.encode('utf-8')
+        if self.metadata.various:
+            ret["album-artist"] = albumArtist.encode('utf-8')
+        ret[gst.TAG_ARTIST] = trackArtist.encode('utf-8')
         ret[gst.TAG_TITLE] = title.encode('utf-8')
         ret[gst.TAG_ALBUM] = disc.encode('utf-8')
 

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list