ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #01812
[Merge] lp:~ahayzen/music-app/refactor-improve-current-file-restore into lp:music-app/refactor
Andrew Hayzen has proposed merging lp:~ahayzen/music-app/refactor-improve-current-file-restore into lp:music-app/refactor.
Commit message:
* Improve the way the currentIndex is restored so that there is less/no delay
Requested reviews:
Music App Developers (music-app-dev)
For more details, see:
https://code.launchpad.net/~ahayzen/music-app/refactor-improve-current-file-restore/+merge/257679
* Improve the way the currentIndex is restored so that there is less/no delay
This will be useful for the restore stack [0] branch as there will be less of a delay as the now playing is loaded.
0 - lp:~ahayzen/music-app/refactor-store-full-tab-path
--
Your team Music App Developers is requested to review the proposed merge of lp:~ahayzen/music-app/refactor-improve-current-file-restore into lp:music-app/refactor.
=== modified file 'app/components/Player.qml'
--- app/components/Player.qml 2015-02-03 23:00:14 +0000
+++ app/components/Player.qml 2015-04-28 17:13:13 +0000
@@ -201,7 +201,14 @@
player.stop()
}
else {
- var obj = trackQueue.model.get(player.currentIndex);
+ var obj;
+
+ if (source.toString().indexOf("file://") === 0) {
+ obj = musicStore.lookup(source.toString().substring(7))
+ } else {
+ obj = musicStore.lookup(source.toString())
+ }
+
player.currentMetaAlbum = obj.album;
if (obj.art !== undefined) { // FIXME: protect against no art property in playlists
=== modified file 'app/music-app.qml'
--- app/music-app.qml 2015-04-06 17:06:50 +0000
+++ app/music-app.qml 2015-04-28 17:13:13 +0000
@@ -210,8 +210,8 @@
model: trackQueue.model
syncFactor: 10
- onCompletedChanged: {
- if (completed) {
+ onPreLoadCompleteChanged: {
+ if (preLoadComplete) {
player.currentIndex = queueIndex
player.setSource(list[queueIndex].filename)
}
Follow ups