Merge lp:~vthompson/music-app/remix-fix-1388428 into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 724
Merged at revision: 724
Proposed branch: lp:~vthompson/music-app/remix-fix-1388428
Merge into: lp:music-app/remix
Diff against target: 14 lines (+3/-1)
1 file modified
meta-database.js (+3/-1)
To merge this branch: bzr merge lp:~vthompson/music-app/remix-fix-1388428
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+240362@code.launchpad.net

Commit message

* Only push found items onto the queue.

Description of the change

Fix loading missing files into the queue upon startup. This simply ignores the missing files, as removing any from the temporary queue is fairly slow and the queue is likely to be cleared by the user fairly soon.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'meta-database.js'
2--- meta-database.js 2014-10-29 01:38:59 +0000
3+++ meta-database.js 2014-11-01 19:21:43 +0000
4@@ -127,7 +127,9 @@
5 db.transaction( function(tx) {
6 var rs = tx.executeSql("SELECT * FROM queue ORDER BY ind ASC");
7 for(var i = 0; i < rs.rows.length; i++) {
8- res.push(makeDict(musicStore.lookup(rs.rows.item(i).filename)));
9+ if (musicStore.lookup(rs.rows.item(i).filename) != undefined) {
10+ res.push(makeDict(musicStore.lookup(rs.rows.item(i).filename)));
11+ }
12 }
13 });
14 return res;

Subscribers

People subscribed via source and target branches