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
=== modified file 'src/unity_soundcloud_daemon.py'
--- src/unity_soundcloud_daemon.py 2013-09-24 22:21:02 +0000
+++ src/unity_soundcloud_daemon.py 2013-10-03 14:23:55 +0000
@@ -70,7 +70,10 @@
70m7 = {'id' :'duration',70m7 = {'id' :'duration',
71 'type' :'s',71 'type' :'s',
72 'field':Unity.SchemaFieldType.OPTIONAL}72 'field':Unity.SchemaFieldType.OPTIONAL}
73EXTRA_METADATA = [m1, m2, m3, m4, m5, m6, m7]73m8 = {'id' :'description',
74 'type' :'s',
75 'field':Unity.SchemaFieldType.OPTIONAL}
76EXTRA_METADATA = [m1, m2, m3, m4, m5, m6, m7, m8]
7477
75logger = logging.getLogger("unity.scope.soundcloud")78logger = logging.getLogger("unity.scope.soundcloud")
7679
@@ -119,7 +122,8 @@
119 results.append({'uri':r['permalink_url'],122 results.append({'uri':r['permalink_url'],
120 'icon':r['artwork_url'],123 'icon':r['artwork_url'],
121 'title':r['title'],124 'title':r['title'],
122 'comment':r['description'],125 'comment':r['user']['username'],
126 'description':r['description'],
123 'album':GLib.Variant('s',''),127 'album':GLib.Variant('s',''),
124 'artist':GLib.Variant('s',r['user']['username']),128 'artist':GLib.Variant('s',r['user']['username']),
125 'genre':GLib.Variant('s',r['genre']),129 'genre':GLib.Variant('s',r['genre']),
@@ -174,7 +178,7 @@
174 stream = self.result.metadata['stream'].get_string()178 stream = self.result.metadata['stream'].get_string()
175 duration = int(self.result.metadata['duration'].get_string())179 duration = int(self.result.metadata['duration'].get_string())
176 author = self.result.metadata['artist'].get_string()180 author = self.result.metadata['artist'].get_string()
177 description = self.result.comment.strip()181 description = self.result.metadata['description'].get_string()
178 image = self.result.icon_hint.replace('large.jpg', 'original.jpg')182 image = self.result.icon_hint.replace('large.jpg', 'original.jpg')
179 preview = Unity.MusicPreview.new(title, description, None)183 preview = Unity.MusicPreview.new(title, description, None)
180 if stream != '':184 if stream != '':

Subscribers

People subscribed via source and target branches

to all changes: