Merge lp:~submarine/ubuntu-scopes/guayadeque-extra-metadata into lp:~submarine/ubuntu-scopes/guayadeque

Proposed by Mark Tully
Status: Merged
Approved by: James Henstridge
Approved revision: 20
Merged at revision: 17
Proposed branch: lp:~submarine/ubuntu-scopes/guayadeque-extra-metadata
Merge into: lp:~submarine/ubuntu-scopes/guayadeque
Diff against target: 90 lines (+30/-6)
3 files modified
.bzrignore (+1/-0)
debian/control (+1/-0)
src/unity_guayadeque_daemon.py (+28/-6)
To merge this branch: bzr merge lp:~submarine/ubuntu-scopes/guayadeque-extra-metadata
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
James Henstridge Approve
Review via email: mp+154133@code.launchpad.net

Commit message

Added year, genre, artist and album to result's metadata.

Also changing DEFAULT_RESULT_TYPE to PERSONAL & fixing other variables

Description of the change

Added year, genre, artist and album to result's metadata.

Also changing DEFAULT_RESULT_TYPE to PERSONAL & fixing other variables

To post a comment you must log in.
Revision history for this message
David Callé (davidc3) wrote :

+1

Revision history for this message
James Henstridge (jamesh) wrote :

Looks good. You don't need to use the u"" syntax for text strings in Python 3 though, which would be good to keep in mind.

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

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~submarine/ubuntu-scopes/guayadeque-extra-metadata/+merge/154133/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
David Callé (davidc3) wrote :

Fixed commit message.

Revision history for this message
James Henstridge (jamesh) wrote :

On further inspection, I'd like you to update the test suite to show that this new data makes it into the results from the scope.

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

FAILED: Autolanding.
Approved revid is not set in launchpad (maybe a permission problem?).
http://jenkins.qa.ubuntu.com/job/submarine-ubuntu-scopes-guayadeque-autolanding/1/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/submarine-ubuntu-scopes-guayadeque-raring-amd64-autolanding/1/console

review: Needs Fixing (continuous-integration)
Revision history for this message
David Callé (davidc3) wrote :

Extra metadata needs testing, this will be added in another merge to fix https://bugs.launchpad.net/ubuntu-scopes/+bug/1157674

Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2013-03-19 22:08:23 +0000
4@@ -0,0 +1,1 @@
5+./tests/data/Collection/guayadeque-scope-backup.db
6
7=== modified file 'debian/control'
8--- debian/control 2013-03-15 09:12:13 +0000
9+++ debian/control 2013-03-19 22:08:23 +0000
10@@ -29,6 +29,7 @@
11 gir1.2-dee-1.0,
12 unity-scopes-runner,
13 gir1.2-glib-2.0
14+Suggests: guayadeque
15 Description: Guayadeque scope for Unity
16 This package contains the "guayadeque" scope which allows Unity
17 to search for guayadeque content.
18
19=== modified file 'src/unity_guayadeque_daemon.py'
20--- src/unity_guayadeque_daemon.py 2013-03-14 12:28:29 +0000
21+++ src/unity_guayadeque_daemon.py 2013-03-19 22:08:23 +0000
22@@ -39,10 +39,10 @@
23 NO_RESULTS_HINT = _('Sorry, there are no Guayadeque results that match your search.')
24 PROVIDER_CREDITS = _('')
25 SVG_DIR = '/usr/share/icons/unity-icon-theme/places/svg/'
26-PROVIDER_ICON = SVG_DIR + 'service-yelp.svg'
27+PROVIDER_ICON = SVG_DIR + 'service-guayadeque.svg'
28 DEFAULT_RESULT_ICON = SVG_DIR + 'result-guayadeque.svg'
29-DEFAULT_RESULT_MIMETYPE = 'x-scheme-handler/man'
30-DEFAULT_RESULT_TYPE = Unity.ResultType.DEFAULT
31+DEFAULT_RESULT_MIMETYPE = 'taglib/mp3'
32+DEFAULT_RESULT_TYPE = Unity.ResultType.PERSONAL
33 GUAYADEQUE_DBFILE = os.getenv("HOME") + "/.guayadeque/Collections"
34
35 c1 = {'id': 'songs',
36@@ -57,7 +57,19 @@
37
38 FILTERS = []
39
40-EXTRA_METADATA = []
41+m1 = {'id' :'album',
42+ 'type' :'s',
43+ 'field':Unity.SchemaFieldType.OPTIONAL}
44+m2 = {'id' :'artist',
45+ 'type' :'s',
46+ 'field':Unity.SchemaFieldType.OPTIONAL}
47+m3 = {'id' :'genre',
48+ 'type' :'s',
49+ 'field':Unity.SchemaFieldType.OPTIONAL}
50+m4 = {'id' :'year',
51+ 'type' :'i',
52+ 'field':Unity.SchemaFieldType.OPTIONAL}
53+EXTRA_METADATA = [m1, m2, m3, m4]
54
55 REFRESH_TIMEOUT = 300
56 PREVIEW_PLAYER_DBUS_NAME = "com.canonical.Unity.Lens.Music.PreviewPlayer"
57@@ -146,6 +158,8 @@
58 album = u"" if track[3] is None else track[4]
59 mimetype = u"" if track[4] is None else track[5]
60 albumartist = u"" if track[5] is None else track[6]
61+ year = 0 if track[8] is None else track[8]
62+ genre = u"" if track[9] is None else track[9]
63 trackname = title + u" - " + album + u" - " + artist
64 if search.lower() in trackname.lower():
65 try:
66@@ -159,7 +173,11 @@
67 'category': 0,
68 'mimetype': mimetype,
69 'title': title,
70- 'comment': artist})
71+ 'comment': artist,
72+ 'album':GLib.Variant('s', album),
73+ 'artist':GLib.Variant('s', artist),
74+ 'genre':GLib.Variant('s', genre),
75+ 'year':GLib.Variant('i', year)})
76 trackresults.append(track)
77
78 if album not in albumresults:
79@@ -168,7 +186,11 @@
80 'category': 1,
81 'mimetype': mimetype,
82 'title': album,
83- 'comment': artist})
84+ 'comment': artist,
85+ 'album':GLib.Variant('s', album),
86+ 'artist':GLib.Variant('s', artist),
87+ 'genre':GLib.Variant('s', genre),
88+ 'year':GLib.Variant('i', year)})
89 albumresults.append(album)
90 return results
91

Subscribers

People subscribed via source and target branches

to all changes: