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
1=== modified file 'src/unity_audacious_daemon.py'
2--- src/unity_audacious_daemon.py 2013-04-22 15:34:22 +0000
3+++ src/unity_audacious_daemon.py 2013-09-11 23:17:41 +0000
4@@ -135,12 +135,15 @@
5
6
7 def get_album_art(track):
8- dirname = dirname = os.path.dirname(track[0])
9+ dirname = dirname = os.path.dirname(track[1])
10 if os.path.exists(dirname + "/cover.jpg"):
11 return dirname + "/cover.jpg"
12
13 if os.path.exists(dirname + "/folder.jpg"):
14 return dirname + "/folder.jpg"
15+
16+ if os.path.exists(dirname + "/album.jpg"):
17+ return dirname + "/album.jpg"
18
19 # Try thumbnailing any embedded album art and use that
20 hashname = '%s\t%s' % (unicodedata.normalize("NFKD", track[2]), unicodedata.normalize("NFKD", track[3]))
21@@ -163,10 +166,10 @@
22 img.write(artwork)
23 return tb_filename
24 else:
25- return "audacious"
26+ return "media-audio"
27 except:
28 # Otherwise, return a generic audio icon
29- return "audacious"
30+ return "media-audio"
31
32
33 def search(search, filters):

Subscribers

People subscribed via source and target branches

to all changes: