Merge lp:~vthompson/music-app/use-model-art-property into lp:music-app/trusty
- use-model-art-property
- Merge into trusty
Status: | Merged |
---|---|
Approved by: | Andrew Hayzen |
Approved revision: | 617 |
Merged at revision: | 630 |
Proposed branch: | lp:~vthompson/music-app/use-model-art-property |
Merge into: | lp:music-app/trusty |
Diff against target: |
252 lines (+25/-22) 13 files modified
MusicAlbums.qml (+2/-2) MusicArtists.qml (+2/-3) MusicNowPlaying.qml (+1/-1) MusicSearch.qml (+1/-1) MusicStart.qml (+4/-5) MusicTracks.qml (+1/-1) Player.qml (+2/-0) common/AlbumsPage.qml (+1/-1) common/BlurredBackground.qml (+1/-1) common/CoverRow.qml (+4/-2) common/SongsPage.qml (+2/-2) meta-database.js (+2/-1) music-app.qml (+2/-2) |
To merge this branch: | bzr merge lp:~vthompson/music-app/use-model-art-property |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hayzen | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+233300@code.launchpad.net |
Commit message
Use art property to allow mediascanner2 to determine if embedded art exists
Description of the change
Use art property to allow mediascanner2 to determine if embedded art exists.
Recent changes in the landing silo 14 PPA for mediascanner2 introduce the capability of having mediascanner2 determine if embedded art exists [1]. This change simplifies the code such that the app is not building the image provider URI and allows this determination by mediascanner2 to be made.
[1] https:/
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
- 614. By Victor Thompson
-
A few updates
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:614
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 615. By Victor Thompson
-
Merge of trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:615
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andrew Hayzen (ahayzen) wrote : | # |
Could you add support for playlists and upgrade support to playlists/recent?
Victor Thompson (vthompson) wrote : | # |
I was attempting to add support for recent (and was going to do so for playlists as well), however, I wasn't able to get recent to work using the model's art property when an album is being selected from the Music scope. I might try to get everything working in the next few days.
I reduced the urgency of doing this because the current support thumbnailing via the web seems to have greatly improved. Perhaps something changed on the server to remedy the issues of poor cover art?
James Henstridge (jamesh) wrote : | # |
We don't currently have an API for looking up the additional info for an album in the media scanner (only providing it when you get a list of albums with queryAlbum() or listAlbums()). I guess I can look at adding it in future, but I won't have time to do it right away.
- 616. By Victor Thompson
-
More backwards commpatibility in recent
- 617. By Victor Thompson
-
merge trunk
Victor Thompson (vthompson) wrote : | # |
I added more compatibility to retain the old recent items as well as support for still adding an album played from the scopes using the old method of specifying the cover art.
For the time being I'm going to opt not to convert the current playlists, as w may simply want to rework this schema for the redesign of the app.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:617
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andrew Hayzen (ahayzen) wrote : | # |
Agree with the playlists, looks good to me. I'll report a bug about using Folder.jpg etc
Preview Diff
1 | === modified file 'MusicAlbums.qml' | |||
2 | --- MusicAlbums.qml 2014-08-28 23:33:29 +0000 | |||
3 | +++ MusicAlbums.qml 2014-09-12 03:03:34 +0000 | |||
4 | @@ -69,7 +69,7 @@ | |||
5 | 69 | Item { | 69 | Item { |
6 | 70 | property string artist: model.artist | 70 | property string artist: model.artist |
7 | 71 | property string album: model.title | 71 | property string album: model.title |
9 | 72 | property var covers: [{author: model.artist, album: model.title}] | 72 | property var covers: [{art: model.art}] |
10 | 73 | 73 | ||
11 | 74 | id: albumItem | 74 | id: albumItem |
12 | 75 | height: albumlist.cellHeight - units.gu(1) | 75 | height: albumlist.cellHeight - units.gu(1) |
13 | @@ -144,7 +144,7 @@ | |||
14 | 144 | anchors.fill: parent | 144 | anchors.fill: parent |
15 | 145 | onClicked: { | 145 | onClicked: { |
16 | 146 | songsPage.album = model.title; | 146 | songsPage.album = model.title; |
18 | 147 | songsPage.covers = [{author: model.artist, album: model.title}] | 147 | songsPage.covers = [{art: model.art}] |
19 | 148 | songsPage.genre = undefined | 148 | songsPage.genre = undefined |
20 | 149 | songsPage.isAlbum = true | 149 | songsPage.isAlbum = true |
21 | 150 | songsPage.line1 = model.artist | 150 | songsPage.line1 = model.artist |
22 | 151 | 151 | ||
23 | === modified file 'MusicArtists.qml' | |||
24 | --- MusicArtists.qml 2014-08-28 23:33:29 +0000 | |||
25 | +++ MusicArtists.qml 2014-09-12 03:03:34 +0000 | |||
26 | @@ -66,8 +66,7 @@ | |||
27 | 66 | id: albumArtistModelRepeater | 66 | id: albumArtistModelRepeater |
28 | 67 | model: albumArtistModel | 67 | model: albumArtistModel |
29 | 68 | delegate: Item { | 68 | delegate: Item { |
32 | 69 | property string author: model.artist | 69 | property string art: model.art |
31 | 70 | property string album: model.title | ||
33 | 71 | } | 70 | } |
34 | 72 | property var covers: [] | 71 | property var covers: [] |
35 | 73 | signal finished() | 72 | signal finished() |
36 | @@ -76,7 +75,7 @@ | |||
37 | 76 | musicRow.covers = covers | 75 | musicRow.covers = covers |
38 | 77 | } | 76 | } |
39 | 78 | onItemAdded: { | 77 | onItemAdded: { |
41 | 79 | covers.push({author: item.author, album: item.album}); | 78 | covers.push({art: item.art}); |
42 | 80 | 79 | ||
43 | 81 | if (index === count - 1) { | 80 | if (index === count - 1) { |
44 | 82 | finished(); | 81 | finished(); |
45 | 83 | 82 | ||
46 | === modified file 'MusicNowPlaying.qml' | |||
47 | --- MusicNowPlaying.qml 2014-09-04 22:59:21 +0000 | |||
48 | +++ MusicNowPlaying.qml 2014-09-12 03:03:34 +0000 | |||
49 | @@ -218,7 +218,7 @@ | |||
50 | 218 | ? queuelist.currentHeight | 218 | ? queuelist.currentHeight |
51 | 219 | : mainView.width - (trackImage.anchors.leftMargin * 2)) | 219 | : mainView.width - (trackImage.anchors.leftMargin * 2)) |
52 | 220 | : queuelist.normalHeight) - units.gu(2) | 220 | : queuelist.normalHeight) - units.gu(2) |
54 | 221 | covers: [{author: model.author, album: model.album}] | 221 | covers: [{art: model.art}] |
55 | 222 | 222 | ||
56 | 223 | spacing: units.gu(2) | 223 | spacing: units.gu(2) |
57 | 224 | 224 | ||
58 | 225 | 225 | ||
59 | === modified file 'MusicSearch.qml' | |||
60 | --- MusicSearch.qml 2014-08-21 19:32:12 +0000 | |||
61 | +++ MusicSearch.qml 2014-09-12 03:03:34 +0000 | |||
62 | @@ -179,7 +179,7 @@ | |||
63 | 179 | } | 179 | } |
64 | 180 | 180 | ||
65 | 181 | MusicRow { | 181 | MusicRow { |
67 | 182 | covers: [{author: model.author, album: model.title}] | 182 | covers: [{art: model.art}] |
68 | 183 | column: Column { | 183 | column: Column { |
69 | 184 | spacing: units.gu(1) | 184 | spacing: units.gu(1) |
70 | 185 | Label { | 185 | Label { |
71 | 186 | 186 | ||
72 | === modified file 'MusicStart.qml' | |||
73 | --- MusicStart.qml 2014-09-05 12:20:01 +0000 | |||
74 | +++ MusicStart.qml 2014-09-12 03:03:34 +0000 | |||
75 | @@ -116,7 +116,7 @@ | |||
76 | 116 | Item { | 116 | Item { |
77 | 117 | property string title: model.title | 117 | property string title: model.title |
78 | 118 | property string title2: model.title2 !== "Playlist" ? model.title2 : i18n.tr("Playlist") | 118 | property string title2: model.title2 !== "Playlist" ? model.title2 : i18n.tr("Playlist") |
80 | 119 | property var covers: type === "playlist" ? Playlists.getPlaylistCovers(title) : [{author: model.title2, album: model.title}] | 119 | property var covers: type === "playlist" ? Playlists.getPlaylistCovers(title) : (model.art !== undefined ? [{art: model.art}] : [{author: model.title2, album: model.title}]) |
81 | 120 | property string type: model.type | 120 | property string type: model.type |
82 | 121 | property string time: model.time | 121 | property string time: model.time |
83 | 122 | property string key: model.key | 122 | property string key: model.key |
84 | @@ -270,8 +270,7 @@ | |||
85 | 270 | } | 270 | } |
86 | 271 | 271 | ||
87 | 272 | delegate: Item { | 272 | delegate: Item { |
90 | 273 | property string author: model.artist | 273 | property string art: model.art |
89 | 274 | property string album: model.title | ||
91 | 275 | } | 274 | } |
92 | 276 | property var covers: [] | 275 | property var covers: [] |
93 | 277 | signal finished() | 276 | signal finished() |
94 | @@ -281,7 +280,7 @@ | |||
95 | 281 | genreShape.covers = covers | 280 | genreShape.covers = covers |
96 | 282 | } | 281 | } |
97 | 283 | onItemAdded: { | 282 | onItemAdded: { |
99 | 284 | covers.push({author: item.author, album: item.album}); | 283 | covers.push({art: item.art}); |
100 | 285 | 284 | ||
101 | 286 | if (index === count - 1) { | 285 | if (index === count - 1) { |
102 | 287 | finished(); | 286 | finished(); |
103 | @@ -425,7 +424,7 @@ | |||
104 | 425 | Item { | 424 | Item { |
105 | 426 | property string artist: model.artist | 425 | property string artist: model.artist |
106 | 427 | property string album: model.title | 426 | property string album: model.title |
108 | 428 | property var covers: [{author: model.artist, album: model.title}] | 427 | property var covers: [{art: model.art}] |
109 | 429 | 428 | ||
110 | 430 | id: albumItem | 429 | id: albumItem |
111 | 431 | objectName: "albumItemObject" | 430 | objectName: "albumItemObject" |
112 | 432 | 431 | ||
113 | === modified file 'MusicTracks.qml' | |||
114 | --- MusicTracks.qml 2014-08-28 23:33:29 +0000 | |||
115 | +++ MusicTracks.qml 2014-09-12 03:03:34 +0000 | |||
116 | @@ -77,7 +77,7 @@ | |||
117 | 77 | 77 | ||
118 | 78 | MusicRow { | 78 | MusicRow { |
119 | 79 | id: musicRow | 79 | id: musicRow |
121 | 80 | covers: [{author: model.author, album: model.album}] | 80 | covers: [{art: model.art}] |
122 | 81 | column: Column { | 81 | column: Column { |
123 | 82 | spacing: units.gu(1) | 82 | spacing: units.gu(1) |
124 | 83 | Label { | 83 | Label { |
125 | 84 | 84 | ||
126 | === modified file 'Player.qml' | |||
127 | --- Player.qml 2014-08-22 00:26:30 +0000 | |||
128 | +++ Player.qml 2014-09-12 03:03:34 +0000 | |||
129 | @@ -33,6 +33,7 @@ | |||
130 | 33 | objectName: "player" | 33 | objectName: "player" |
131 | 34 | 34 | ||
132 | 35 | property string currentMetaAlbum: "" | 35 | property string currentMetaAlbum: "" |
133 | 36 | property string currentMetaArt: "" | ||
134 | 36 | property string currentMetaArtist: "" | 37 | property string currentMetaArtist: "" |
135 | 37 | property string currentMetaFile: "" | 38 | property string currentMetaFile: "" |
136 | 38 | property string currentMetaTitle: "" | 39 | property string currentMetaTitle: "" |
137 | @@ -186,6 +187,7 @@ | |||
138 | 186 | else { | 187 | else { |
139 | 187 | var obj = trackQueue.model.get(player.currentIndex); | 188 | var obj = trackQueue.model.get(player.currentIndex); |
140 | 188 | currentMetaAlbum = obj.album; | 189 | currentMetaAlbum = obj.album; |
141 | 190 | currentMetaArt = obj.art; | ||
142 | 189 | currentMetaArtist = obj.author; | 191 | currentMetaArtist = obj.author; |
143 | 190 | currentMetaFile = obj.filename; | 192 | currentMetaFile = obj.filename; |
144 | 191 | currentMetaTitle = obj.title; | 193 | currentMetaTitle = obj.title; |
145 | 192 | 194 | ||
146 | === modified file 'common/AlbumsPage.qml' | |||
147 | --- common/AlbumsPage.qml 2014-09-04 00:13:59 +0000 | |||
148 | +++ common/AlbumsPage.qml 2014-09-12 03:03:34 +0000 | |||
149 | @@ -280,7 +280,7 @@ | |||
150 | 280 | } | 280 | } |
151 | 281 | count: 1 | 281 | count: 1 |
152 | 282 | size: parent.height | 282 | size: parent.height |
154 | 283 | covers: [{author: model.artist, album: model.title}] | 283 | covers: [{art: model.art}] |
155 | 284 | spacing: units.gu(2) | 284 | spacing: units.gu(2) |
156 | 285 | } | 285 | } |
157 | 286 | 286 | ||
158 | 287 | 287 | ||
159 | === modified file 'common/BlurredBackground.qml' | |||
160 | --- common/BlurredBackground.qml 2014-08-20 17:35:52 +0000 | |||
161 | +++ common/BlurredBackground.qml 2014-09-12 03:03:34 +0000 | |||
162 | @@ -24,7 +24,7 @@ | |||
163 | 24 | // Blurred background | 24 | // Blurred background |
164 | 25 | Rectangle { | 25 | Rectangle { |
165 | 26 | anchors.fill: parent | 26 | anchors.fill: parent |
167 | 27 | property string art: player.currentMetaFile === "" ? Qt.resolvedUrl("../images/music-app-cover@30.png") : "image://albumart/artist=" + player.currentMetaArtist + "&album=" + player.currentMetaAlbum | 27 | property string art: player.currentMetaFile === "" ? Qt.resolvedUrl("../images/music-app-cover@30.png") : player.currentMetaArt |
168 | 28 | 28 | ||
169 | 29 | // the album art | 29 | // the album art |
170 | 30 | Image { | 30 | Image { |
171 | 31 | 31 | ||
172 | === modified file 'common/CoverRow.qml' | |||
173 | --- common/CoverRow.qml 2014-08-20 17:35:52 +0000 | |||
174 | +++ common/CoverRow.qml 2014-09-12 03:03:34 +0000 | |||
175 | @@ -59,8 +59,10 @@ | |||
176 | 59 | width: coverRow.size | 59 | width: coverRow.size |
177 | 60 | height: width | 60 | height: width |
178 | 61 | source: coverRow.count !== 0 && coverRow.covers[index] !== "" && coverRow.covers[index] !== undefined | 61 | source: coverRow.count !== 0 && coverRow.covers[index] !== "" && coverRow.covers[index] !== undefined |
181 | 62 | ? "image://albumart/artist=" + coverRow.covers[index].author + "&album=" + coverRow.covers[index].album | 62 | ? (coverRow.covers[index].art !== undefined |
182 | 63 | : Qt.resolvedUrl("../images/music-app-cover@30.png") | 63 | ? coverRow.covers[index].art |
183 | 64 | : "image://albumart/artist=" + coverRow.covers[index].author + "&album=" + coverRow.covers[index].album) | ||
184 | 65 | : Qt.resolvedUrl("../images/music-app-cover@30.png") | ||
185 | 64 | onStatusChanged: { | 66 | onStatusChanged: { |
186 | 65 | if (status === Image.Error) { | 67 | if (status === Image.Error) { |
187 | 66 | source = Qt.resolvedUrl("../images/music-app-cover@30.png") | 68 | source = Qt.resolvedUrl("../images/music-app-cover@30.png") |
188 | 67 | 69 | ||
189 | === modified file 'common/SongsPage.qml' | |||
190 | --- common/SongsPage.qml 2014-08-28 00:22:13 +0000 | |||
191 | +++ common/SongsPage.qml 2014-09-12 03:03:34 +0000 | |||
192 | @@ -238,7 +238,7 @@ | |||
193 | 238 | trackClicked(albumtrackslist.model, index) // play track | 238 | trackClicked(albumtrackslist.model, index) // play track |
194 | 239 | 239 | ||
195 | 240 | if (isAlbum && songStackPage.line1 !== i18n.tr("Genre")) { | 240 | if (isAlbum && songStackPage.line1 !== i18n.tr("Genre")) { |
197 | 241 | Library.addRecent(songStackPage.line2, songStackPage.line1, songStackPage.covers[0], songStackPage.line2, "album") | 241 | Library.addRecent(songStackPage.line2, songStackPage.line1, model.art, songStackPage.line2, "album") |
198 | 242 | mainView.hasRecent = true | 242 | mainView.hasRecent = true |
199 | 243 | recentModel.filterRecent() | 243 | recentModel.filterRecent() |
200 | 244 | } else if (songStackPage.line1 === i18n.tr("Playlist")) { | 244 | } else if (songStackPage.line1 === i18n.tr("Playlist")) { |
201 | @@ -272,7 +272,7 @@ | |||
202 | 272 | 272 | ||
203 | 273 | MusicRow { | 273 | MusicRow { |
204 | 274 | id: musicRow | 274 | id: musicRow |
206 | 275 | covers: [{author: model.author, album: model.album}] | 275 | covers: model.art !== undefined ? [{art: model.art}] : [{author: model.author, album: model.album}] |
207 | 276 | column: Column { | 276 | column: Column { |
208 | 277 | spacing: units.gu(1) | 277 | spacing: units.gu(1) |
209 | 278 | Label { | 278 | Label { |
210 | 279 | 279 | ||
211 | === modified file 'meta-database.js' | |||
212 | --- meta-database.js 2014-05-23 15:00:21 +0000 | |||
213 | +++ meta-database.js 2014-09-12 03:03:34 +0000 | |||
214 | @@ -82,7 +82,7 @@ | |||
215 | 82 | var rs = tx.executeSql("SELECT * FROM recent ORDER BY time DESC LIMIT 15"); | 82 | var rs = tx.executeSql("SELECT * FROM recent ORDER BY time DESC LIMIT 15"); |
216 | 83 | for(var i = 0; i < rs.rows.length; i++) { | 83 | for(var i = 0; i < rs.rows.length; i++) { |
217 | 84 | var dbItem = rs.rows.item(i); | 84 | var dbItem = rs.rows.item(i); |
219 | 85 | console.log("Time:"+ dbItem.time + ", Key:"+dbItem.key + ", Title:"+dbItem.title + ", Title2:"+dbItem.title2 + ", Type:"+dbItem.type); | 85 | console.log("Time:"+ dbItem.time + ", Key:"+dbItem.key + ", Title:"+dbItem.title + ", Title2:"+dbItem.title2 + ", Type:"+dbItem.type + ", Art:"+dbItem.cover); |
220 | 86 | 86 | ||
221 | 87 | if (dbItem.type === "album") | 87 | if (dbItem.type === "album") |
222 | 88 | { | 88 | { |
223 | @@ -90,6 +90,7 @@ | |||
224 | 90 | title:dbItem.title || i18n.tr("Unknown Album"), | 90 | title:dbItem.title || i18n.tr("Unknown Album"), |
225 | 91 | title2:dbItem.title2 || i18n.tr("Unknown Artist"), | 91 | title2:dbItem.title2 || i18n.tr("Unknown Artist"), |
226 | 92 | key:dbItem.key || i18n.tr("Unknown Album"), | 92 | key:dbItem.key || i18n.tr("Unknown Album"), |
227 | 93 | art:dbItem.cover || undefined, | ||
228 | 93 | type:dbItem.type | 94 | type:dbItem.type |
229 | 94 | }); | 95 | }); |
230 | 95 | } | 96 | } |
231 | 96 | 97 | ||
232 | === modified file 'music-app.qml' | |||
233 | --- music-app.qml 2014-09-04 22:59:21 +0000 | |||
234 | +++ music-app.qml 2014-09-12 03:03:34 +0000 | |||
235 | @@ -217,7 +217,7 @@ | |||
236 | 217 | songsAlbumArtistModel.album = decodeURIComponent(split[1]); | 217 | songsAlbumArtistModel.album = decodeURIComponent(split[1]); |
237 | 218 | 218 | ||
238 | 219 | // Add album to recent list | 219 | // Add album to recent list |
240 | 220 | Library.addRecent(songsAlbumArtistModel.album, songsAlbumArtistModel.artist, null, songsAlbumArtistModel.album, "album") | 220 | Library.addRecent(songsAlbumArtistModel.album, songsAlbumArtistModel.artist, songsAlbumArtistModel.art, songsAlbumArtistModel.album, "album") |
241 | 221 | mainView.hasRecent = true | 221 | mainView.hasRecent = true |
242 | 222 | recentModel.filterRecent() | 222 | recentModel.filterRecent() |
243 | 223 | } | 223 | } |
244 | @@ -657,7 +657,7 @@ | |||
245 | 657 | function makeDict(model) { | 657 | function makeDict(model) { |
246 | 658 | return { | 658 | return { |
247 | 659 | album: model.album, | 659 | album: model.album, |
249 | 660 | art: "image://albumart/artist=" + model.author + "&album=" + model.album, | 660 | art: model.art, |
250 | 661 | author: model.author, | 661 | author: model.author, |
251 | 662 | filename: model.filename, | 662 | filename: model.filename, |
252 | 663 | title: model.title | 663 | title: model.title |
FAILED: Continuous integration, rev:613 91.189. 93.70:8080/ job/music- app-ci/ 1092/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 1863 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 1863/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/music- app-utopic- amd64-ci/ 316
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/music- app-ci/ 1092/rebuild
http://