Merge lp:~stolowski/unity-lens-music/artwork-for-files-only into lp:unity-lens-music

Proposed by Paweł Stołowski
Status: Merged
Approved by: Jussi Pakkanen
Approved revision: 110
Merged at revision: 109
Proposed branch: lp:~stolowski/unity-lens-music/artwork-for-files-only
Merge into: lp:unity-lens-music
Diff against target: 47 lines (+10/-4)
2 files modified
src/rhythmbox-collection.vala (+7/-4)
tests/unit/test-rhythmbox-parser.vala (+3/-0)
To merge this branch: bzr merge lp:~stolowski/unity-lens-music/artwork-for-files-only
Reviewer Review Type Date Requested Status
Omer Akram (community) functional Approve
Jussi Pakkanen (community) Approve
Review via email: mp+125520@code.launchpad.net

Commit message

Ignore iradio tag (radio stations) when parsing Rhythmbox database; check if track uri is a local file, this prevents unexpected network queries when radio stations are enabled back in the future.

Description of the change

Ignore iradio tag (radio stations) when parsing Rhythmbox database; check if track uri is a local file, this prevents unexpected network queries when radio stations are enabled back in the future.

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Please don't approve globally until Omer (originator of the bug) verifies it fixes the problem for him!

Revision history for this message
Omer Akram (om26er) wrote :

I created a new user account and the issue is 100% reproducible there for me and this branch actually fixes the problem but now songs without coverart look like this: http://ubuntuone.com/4e6tlFE5HKBAsmZZu5EV6W

review: Needs Fixing
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Looks sensible to me. Approving with the assumption that the coverart issue above is either fixed or deemed not to be serious enough.

review: Approve
Revision history for this message
Paweł Stołowski (stolowski) wrote :

@Omer: two questions:
- did you compile music lens with --prefix=/usr ?
- do you have /usr/share/unity/6/album_missing.png (from unity-common package) on your system?

Revision history for this message
Omer Akram (om26er) wrote :

Its installed in /usr/local and /usr/share/unity/6/album_missing.png does exist.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

> Its installed in /usr/local and /usr/share/unity/6/album_missing.png does
> exist.

You need to compile it with --prefix=/usr, otherwise it won't find album_missing.png (this icon is a recent addition); I think that's why you have broken icon if covert art is missing.

Revision history for this message
Omer Akram (om26er) wrote :

Then I guess we should merge this in as it clearly fixes the issue for me without any apparent regression.

Revision history for this message
Omer Akram (om26er) :
review: Approve (functional)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/rhythmbox-collection.vala'
2--- src/rhythmbox-collection.vala 2012-09-18 13:10:34 +0000
3+++ src/rhythmbox-collection.vala 2012-09-20 16:19:22 +0000
4@@ -114,7 +114,7 @@
5 for (int i = 0; attr_names[i] != null; i++)
6 {
7 if (attr_names[i] == "type" && (attr_values[i] == "song"
8- || attr_values[i] == "iradio"))
9+ /*|| attr_values[i] == "iradio"*/)) // disable radio stations
10 accepted_element_name = attr_values[i];
11 }
12 if (accepted_element_name == null) return;
13@@ -336,14 +336,17 @@
14 ChecksumType.MD5, combined)));
15 if (FileUtils.test (filename, FileTest.EXISTS)) return filename;
16
17- // Try Nautilus thumbnails
18- try
19+ if (track.uri.has_prefix ("file://"))
20 {
21+ // Try Nautilus thumbnails
22+ try
23+ {
24 File artwork_file = File.new_for_uri (track.uri);
25 var info = artwork_file.query_info (FILE_ATTRIBUTE_THUMBNAIL_PATH, 0, null);
26 var thumbnail_path = info.get_attribute_string (FILE_ATTRIBUTE_THUMBNAIL_PATH);
27 if (thumbnail_path != null) return thumbnail_path;
28- } catch {}
29+ } catch {}
30+ }
31
32 // Try covers folder
33 string artwork = Path.build_filename (
34
35=== modified file 'tests/unit/test-rhythmbox-parser.vala'
36--- tests/unit/test-rhythmbox-parser.vala 2012-08-13 10:36:17 +0000
37+++ tests/unit/test-rhythmbox-parser.vala 2012-09-20 16:19:22 +0000
38@@ -36,6 +36,9 @@
39 return 0;
40 }
41
42+ /* FIXME: this test is broken - it passes if iradio tag is not parsed
43+ * because all checks are done in a callback that's never called in such case.
44+ */
45 private static void test_radios ()
46 {
47 var parser = new RhythmboxCollection.XmlParser ();

Subscribers

People subscribed via source and target branches

to all changes: