Merge lp:~submarine/unity-scope-audacious/media_art into lp:unity-scope-audacious

Proposed by Mark Tully
Status: Merged
Approved by: David Callé
Approved revision: 36
Merged at revision: 36
Proposed branch: lp:~submarine/unity-scope-audacious/media_art
Merge into: lp:unity-scope-audacious
Diff against target: 33 lines (+6/-3)
1 file modified
src/unity_audacious_daemon.py (+6/-3)
To merge this branch: bzr merge lp:~submarine/unity-scope-audacious/media_art
Reviewer Review Type Date Requested Status
David Callé Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+185182@code.launchpad.net

Commit message

Improvements in media art matching

Description of the change

Improvements in media art matching:
 - Using media-audio rather than audacious as the icon where no media art is found
 - Fix bug where song title rather than uri was being used to try to determine the album directory
 - Look for album.jpg as well as folder.jpg and cover.jpg for media art

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Callé (davidc3) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/unity_audacious_daemon.py'
--- src/unity_audacious_daemon.py 2013-04-22 15:34:22 +0000
+++ src/unity_audacious_daemon.py 2013-09-11 23:17:41 +0000
@@ -135,12 +135,15 @@
135135
136136
137def get_album_art(track):137def get_album_art(track):
138 dirname = dirname = os.path.dirname(track[0])138 dirname = dirname = os.path.dirname(track[1])
139 if os.path.exists(dirname + "/cover.jpg"):139 if os.path.exists(dirname + "/cover.jpg"):
140 return dirname + "/cover.jpg"140 return dirname + "/cover.jpg"
141141
142 if os.path.exists(dirname + "/folder.jpg"):142 if os.path.exists(dirname + "/folder.jpg"):
143 return dirname + "/folder.jpg"143 return dirname + "/folder.jpg"
144
145 if os.path.exists(dirname + "/album.jpg"):
146 return dirname + "/album.jpg"
144147
145 # Try thumbnailing any embedded album art and use that148 # Try thumbnailing any embedded album art and use that
146 hashname = '%s\t%s' % (unicodedata.normalize("NFKD", track[2]), unicodedata.normalize("NFKD", track[3]))149 hashname = '%s\t%s' % (unicodedata.normalize("NFKD", track[2]), unicodedata.normalize("NFKD", track[3]))
@@ -163,10 +166,10 @@
163 img.write(artwork)166 img.write(artwork)
164 return tb_filename167 return tb_filename
165 else:168 else:
166 return "audacious"169 return "media-audio"
167 except:170 except:
168 # Otherwise, return a generic audio icon171 # Otherwise, return a generic audio icon
169 return "audacious"172 return "media-audio"
170173
171174
172def search(search, filters):175def search(search, filters):

Subscribers

People subscribed via source and target branches

to all changes: