summaryrefslogtreecommitdiff
path: root/debian/patches/26_t_artist_cleanup.patch
blob: c2b78fb26298269e8b47555550aae5666f22a73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Code clean-up: test only _once_ whether it's a multi-artist (VA) CD
(regarding the artist name).

--- a/jack_tag.py	2006-02-05 01:19:49.000000000 +0000
+++ b/jack_tag.py	2006-02-05 01:21:23.000000000 +0000
@@ -76,7 +76,10 @@
             sys.stdout.write(".") ; sys.stdout.flush()
             mp3name = i[NAME] + ext
             wavname = i[NAME] + ".wav"
-            t_artist = track_names[i[NUM]][0]
+            if track_names[i[NUM]][0]:
+                t_artist = track_names[i[NUM]][0]
+            else:
+                t_artist = a_artist
             t_name = track_names[i[NUM]][1]
             t_comm = ""
             if not cf['_only_dae'] and cf['_set_id3tag']:
@@ -105,10 +108,7 @@
                         tag.setTitle(t_name)
                         tag.setTrackNum((i[NUM],len(jack_ripstuff.all_tracks_orig)))
                         tag.setTitle(t_name)
-                        if t_artist:
-                           tag.setArtist(t_artist)
-                        else:
-                            tag.setArtist(a_artist)
+                        tag.setArtist(t_artist)
                         if cf['_id3_genre'] != -1:
                             tag.setGenre("(%d)" % (cf['_id3_genre']))
                         if cf['_id3_year'] != -1:
@@ -130,10 +130,7 @@
                             tag.setTitle(t_name)
                         tag.setTrackNum((i[NUM],len(jack_ripstuff.all_tracks_orig)))
                         tag.setTitle(t_name)
-                        if t_artist:
-                            tag.setArtist(t_artist)
-                        else:
-                            tag.setArtist(a_artist)
+                        tag.setArtist(t_artist)
                         if cf['_id3_genre'] != -1:
                             tag.setGenre("(%d)" % (cf['_id3_genre']))
                         if cf['_id3_year'] != -1:
@@ -162,10 +159,7 @@
                             vc.comments['ALBUM'] = a_title.encode("utf-8")
                             vc.comments['TRACKNUMBER'] = `i[NUM]`
                             vc.comments['TITLE'] = t_name.encode("utf-8")
-                            if t_artist:
-                                vc.comments['ARTIST'] = t_artist.encode("utf-8")
-                            else:
-                                vc.comments['ARTIST'] = a_artist.encode("utf-8")
+                            vc.comments['ARTIST'] = t_artist.encode("utf-8")
                             if cf['_id3_genre'] != -1:
                                 vc.comments['GENRE'] = id3genres[cf['_id3_genre']]
                             if cf['_id3_year'] != -1:
@@ -183,10 +177,7 @@
                     oggi.add_tag('ALBUM', a_title.encode("utf-8"))
                     oggi.add_tag('TRACKNUMBER', `i[NUM]`)
                     oggi.add_tag('TITLE', t_name.encode("utf-8"))
-                    if t_artist:
-                        oggi.add_tag('ARTIST', t_artist.encode("utf-8"))
-                    else:
-                        oggi.add_tag('ARTIST', a_artist.encode("utf-8"))
+                    oggi.add_tag('ARTIST', t_artist.encode("utf-8"))
                     if cf['_id3_genre'] != -1:
                         oggi.add_tag('GENRE', id3genres[cf['_id3_genre']])
                     if cf['_id3_year'] != -1: