Merge lp:~ahayzen/music-app/autopilot-fixes-001 into lp:music-app/trusty

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 81
Merged at revision: 80
Proposed branch: lp:~ahayzen/music-app/autopilot-fixes-001
Merge into: lp:music-app/trusty
Diff against target: 33 lines (+2/-3)
2 files modified
music-app.qml (+0/-1)
playlists.js (+2/-2)
To merge this branch: bzr merge lp:~ahayzen/music-app/autopilot-fixes-001
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Daniel Holm Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+178136@code.launchpad.net

Commit message

- Fixes for autopilot

Description of the change

This fixes the autopilot issues.

In our initialize code, if there was no database, it would run 'Playlists.addPlaylist("Testing")'. However this was run before initializing the Playlists databases so it wouldn't work.

For now I have commented the line out as I thought the playlists are now working and you can create your own ones, but if it is required I can move it below the initialization phase.

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
Victor Thompson (vthompson) wrote :

Check with Daniel as that line is part of the added playlist capability--but I assume we can just remove it rather than commenting it out or moving it elsewhere. I'll test this when I get home. Good work!

81. By Andrew Hayzen

- Code cleanup

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

Spoke with Daniel, he said it is not required anymore, so I have removed the code.

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
Daniel Holm (danielholm) wrote :

Good work!

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

Tests pass. Great fix!

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 2013-07-29 19:23:50 +0000
3+++ music-app.qml 2013-08-01 19:25:34 +0000
4@@ -54,7 +54,6 @@
5 //Settings.setSetting("scrobble", "0") // default state of shuffle
6 //Settings.setSetting("scrobble", "0") // default state of scrobble
7 Settings.setSetting("currentfolder", folderModel.homePath() + "/Music")
8- Playlists.addPlaylist("Testing") // for now, but remove when toolbar works again.
9 }
10 Library.reset()
11 Library.initialize()
12
13=== modified file 'playlists.js'
14--- playlists.js 2013-07-26 22:19:02 +0000
15+++ playlists.js 2013-08-01 19:25:34 +0000
16@@ -35,7 +35,7 @@
17 }
18 // same thing for individal playlists
19 function initializePlaylist() {
20- var db = LocalStorage.openDatabaseSync("music-app-playlist", "", "StorageDatabase", 1000000);
21+ var db = getPlaylistDatabase();
22
23 // does the user have the latest db scheme?
24 if (db.version === "1.0") {
25@@ -131,7 +131,7 @@
26 }
27 })
28 } catch(e) {
29- return "";
30+ return [];
31 }
32 return res
33 }

Subscribers

People subscribed via source and target branches

to status/vote changes: