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

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 805
Merged at revision: 807
Proposed branch: lp:~vthompson/music-app/fix-1413451
Merge into: lp:music-app/remix
Diff against target: 23 lines (+6/-0)
1 file modified
music-app.qml (+6/-0)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-1413451
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+247253@code.launchpad.net

Commit message

Stop queueLoaderWorker when a track is clicked.

Description of the change

Stop queueLoaderWorker when a track is clicked.

There may be other cases where the loading of the queue steps on a new queue entry. I wasn't able to reproduce this when the "Queue all" button was hit, or when a list item action to add to the queue was taken. Testing should be done to verify this.

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 :

I think there is also potential from the urlhandler could you add the same canLoad=false to process() [0] as that is hit by all urlhandler and argument calls. I'll continue looking for further potentials...

0 - http://bazaar.launchpad.net/~music-app-dev/music-app/remix/view/head:/music-app.qml#L226

review: Needs Fixing
Revision history for this message
Victor Thompson (vthompson) wrote :

The "album://" handler goes through trackClicked() already. I wasn't able to reproduce for the "file://" handler. I'll look into it more, but I believe we are already mitigating this somehow.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Note that processFile() does not hit trackClicked() and this is used by cmdline arguments and urihandler, personally I think it would be preferred to put the canLoad=false in process just to enforce prevention of the queueWorkerLoader.

review: Needs Information
lp:~vthompson/music-app/fix-1413451 updated
805. By Victor Thompson

* Add the fix to processFile() as well.

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, thanks for the extra canLoad=false :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'music-app.qml'
2--- music-app.qml 2015-01-21 13:31:57 +0000
3+++ music-app.qml 2015-01-23 13:22:44 +0000
4@@ -199,6 +199,9 @@
5 }
6
7 function processFile(uri, play) {
8+ // Stop queue loading in the background
9+ queueLoaderWorker.canLoad = false
10+
11 uri = decodeURIComponent(uri);
12
13 // Lookup track in songs model
14@@ -653,6 +656,9 @@
15 }
16
17 function trackClicked(model, index, play, clear) {
18+ // Stop queue loading in the background
19+ queueLoaderWorker.canLoad = false
20+
21 // TODO: remove once playlists uses U1DB
22 if (model.hasOwnProperty("linkLibraryListModel")) {
23 model = model.linkLibraryListModel;

Subscribers

People subscribed via source and target branches