Merge lp:~davidc3/unity-scope-soundcloud/fix-artist-for-unity8 into lp:unity-scope-soundcloud/legacy

Proposed by David Callé
Status: Merged
Approved by: David Callé
Approved revision: 35
Merged at revision: 35
Proposed branch: lp:~davidc3/unity-scope-soundcloud/fix-artist-for-unity8
Merge into: lp:unity-scope-soundcloud/legacy
Diff against target: 34 lines (+7/-3)
1 file modified
src/unity_soundcloud_daemon.py (+7/-3)
To merge this branch: bzr merge lp:~davidc3/unity-scope-soundcloud/fix-artist-for-unity8
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Guillermo Gonzalez Approve
Review via email: mp+189093@code.launchpad.net

Commit message

Put the artist in the comment field

Description of the change

Put the artist in the comment field to be pretty in the Unity8 dash

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

+1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity_soundcloud_daemon.py'
2--- src/unity_soundcloud_daemon.py 2013-09-24 22:21:02 +0000
3+++ src/unity_soundcloud_daemon.py 2013-10-03 14:23:55 +0000
4@@ -70,7 +70,10 @@
5 m7 = {'id' :'duration',
6 'type' :'s',
7 'field':Unity.SchemaFieldType.OPTIONAL}
8-EXTRA_METADATA = [m1, m2, m3, m4, m5, m6, m7]
9+m8 = {'id' :'description',
10+ 'type' :'s',
11+ 'field':Unity.SchemaFieldType.OPTIONAL}
12+EXTRA_METADATA = [m1, m2, m3, m4, m5, m6, m7, m8]
13
14 logger = logging.getLogger("unity.scope.soundcloud")
15
16@@ -119,7 +122,8 @@
17 results.append({'uri':r['permalink_url'],
18 'icon':r['artwork_url'],
19 'title':r['title'],
20- 'comment':r['description'],
21+ 'comment':r['user']['username'],
22+ 'description':r['description'],
23 'album':GLib.Variant('s',''),
24 'artist':GLib.Variant('s',r['user']['username']),
25 'genre':GLib.Variant('s',r['genre']),
26@@ -174,7 +178,7 @@
27 stream = self.result.metadata['stream'].get_string()
28 duration = int(self.result.metadata['duration'].get_string())
29 author = self.result.metadata['artist'].get_string()
30- description = self.result.comment.strip()
31+ description = self.result.metadata['description'].get_string()
32 image = self.result.icon_hint.replace('large.jpg', 'original.jpg')
33 preview = Unity.MusicPreview.new(title, description, None)
34 if stream != '':

Subscribers

People subscribed via source and target branches

to all changes: