Merge lp:~ahayzen/music-app/remix-perf-001 into lp:music-app/remix
- remix-perf-001
- Merge into remix
Status: | Merged |
---|---|
Approved by: | Victor Thompson |
Approved revision: | 691 |
Merged at revision: | 690 |
Proposed branch: | lp:~ahayzen/music-app/remix-perf-001 |
Merge into: | lp:music-app/remix |
Diff against target: |
1223 lines (+27/-971) 11 files modified
LoginLastFM.qml (+0/-132) MusicNowPlaying.qml (+2/-4) MusicSearch.qml (+0/-236) MusicSettings.qml (+0/-227) MusicToolbar.qml (+4/-8) common/BlurredBackground.qml (+5/-2) common/Card.qml (+3/-6) common/CoverGrid.qml (+1/-2) common/SwipeDelete.qml (+0/-107) music-app.qml (+12/-120) scrobble.js (+0/-127) |
To merge this branch: | bzr merge lp:~ahayzen/music-app/remix-perf-001 |
Related bugs: | |
Related blueprints: |
Music Remix for RTM
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Victor Thompson | Approve | ||
Review via email:
|
Commit message
* Remove lastfm, search and settings
Description of the change
* Remove lastfm, search and settings
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Victor Thompson (vthompson) wrote : | # |
LGTM! Thanks for the cleanup!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:690
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Autolanding.
Unapproved changes made after approval.
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) : | # |
Preview Diff
1 | === removed file 'LoginLastFM.qml' |
2 | --- LoginLastFM.qml 2014-09-20 10:50:45 +0000 |
3 | +++ LoginLastFM.qml 1970-01-01 00:00:00 +0000 |
4 | @@ -1,132 +0,0 @@ |
5 | -/* |
6 | - * Copyright (C) 2013 Victor Thompson <victor.thompson@gmail.com> |
7 | - * Daniel Holm <d.holmen@gmail.com> |
8 | - * |
9 | - * This program is free software; you can redistribute it and/or modify |
10 | - * it under the terms of the GNU General Public License as published by |
11 | - * the Free Software Foundation; version 3. |
12 | - * |
13 | - * This program is distributed in the hope that it will be useful, |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | - * GNU General Public License for more details. |
17 | - * |
18 | - * You should have received a copy of the GNU General Public License |
19 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | - */ |
21 | - |
22 | -import QtQuick 2.3 |
23 | -import Ubuntu.Components 1.1 |
24 | -import Ubuntu.Components.Popups 1.0 |
25 | -import Ubuntu.Components.ListItems 1.0 as ListItem |
26 | -import QtMultimedia 5.0 |
27 | -import QtQuick.LocalStorage 2.0 |
28 | -import QtQuick.XmlListModel 2.0 |
29 | -import "settings.js" as Settings |
30 | -import "scrobble.js" as Scrobble |
31 | - |
32 | -// Last.fm login dialog |
33 | -DefaultSheet { |
34 | - id: lastfmroot |
35 | - contentsHeight: parent.height; |
36 | - |
37 | - onDoneClicked: { |
38 | - customdebug("Close lastfm sheet.") |
39 | - PopupUtils.close(lastfmroot) |
40 | - } |
41 | - |
42 | - onVisibleChanged: { |
43 | - if (visible) { |
44 | - musicToolbar.setSheet(lastfmroot) |
45 | - } |
46 | - else { |
47 | - musicToolbar.removeSheet(lastfmroot) |
48 | - } |
49 | - } |
50 | - |
51 | - // Dialog data |
52 | - title: i18n.tr("Last.fm") |
53 | - |
54 | - Column { |
55 | - spacing: units.gu(2) |
56 | - |
57 | - Label { |
58 | - text: i18n.tr("Login to be able to scrobble.") |
59 | - } |
60 | - |
61 | - // Username field |
62 | - TextField { |
63 | - id: usernameField |
64 | - KeyNavigation.tab: passField |
65 | - hasClearButton: true |
66 | - placeholderText: i18n.tr("Username") |
67 | - text: lastfmusername |
68 | - width: units.gu(48) |
69 | - } |
70 | - |
71 | - // add password field |
72 | - TextField { |
73 | - id: passField |
74 | - KeyNavigation.backtab: usernameField |
75 | - hasClearButton: true |
76 | - placeholderText: i18n.tr("Password") |
77 | - text: lastfmpassword |
78 | - echoMode: TextInput.Password |
79 | - width: units.gu(48) |
80 | - } |
81 | - |
82 | - // indicate progress of login |
83 | - ActivityIndicator { |
84 | - id: activity |
85 | - visible: false |
86 | - } |
87 | - |
88 | - // item to present login result |
89 | - ListItem.Standard { |
90 | - id: loginstatetext |
91 | - visible: false |
92 | - } |
93 | - |
94 | - // Login button |
95 | - Button { |
96 | - id: loginButton |
97 | - width: units.gu(48) |
98 | - text: i18n.tr("Login") |
99 | - enabled: false |
100 | - |
101 | - onClicked: { |
102 | - activity.visible = true |
103 | - activity.running = !activity.running // change the activity indicator state |
104 | - loginstatetext.visible = true |
105 | - loginstatetext.text = i18n.tr("Trying to login...") |
106 | - Settings.initialize() |
107 | - console.debug("Debug: Login to Last.fm clicked.") |
108 | - // try to login |
109 | - Settings.setSetting("lastfmusername", usernameField.text) // save lastfm username |
110 | - Settings.setSetting("lastfmpassword", passField.text) // save lastfm password (should be passed by ha hash function) |
111 | - lastfmusername = Settings.getSetting("lastfmusername") // get username again |
112 | - lastfmpassword = Settings.getSetting("lastfmpassword") // get password again, for use during the rest of the session |
113 | - if (usernameField.text.length > 0 && passField.text.length > 0) { // make sure something is acually inputed |
114 | - console.debug("Debug: Sending credentials to authentication function"); |
115 | - var answer = Scrobble.authenticate(usernameField.text, passField.text) // pass credentials to login function |
116 | - |
117 | - // Print result to user |
118 | - if (answer == "ok") { |
119 | - loginstatetext.text = i18n.tr("Login Successful") |
120 | - activity.running = !activity.running // change the activity indicator state |
121 | - //loginButton.text = "Log out" // later |
122 | - Settings.setSetting("lastfmsessionkey",Scrobble.session_key) |
123 | - } |
124 | - else { |
125 | - loginstatetext.text = i18n.tr("Login Failed") |
126 | - activity.running = !activity.running // change the activity indicator state |
127 | - } |
128 | - |
129 | - } |
130 | - else { |
131 | - loginstatetext.text = i18n.tr("You forgot to set your username and/or password") |
132 | - } |
133 | - } |
134 | - } |
135 | - } |
136 | -} |
137 | |
138 | === modified file 'MusicNowPlaying.qml' |
139 | --- MusicNowPlaying.qml 2014-10-21 21:49:49 +0000 |
140 | +++ MusicNowPlaying.qml 2014-10-22 14:55:14 +0000 |
141 | @@ -146,10 +146,9 @@ |
142 | } |
143 | ] |
144 | |
145 | - Rectangle { |
146 | + Item { |
147 | id: fullview |
148 | anchors.fill: parent |
149 | - color: "transparent" |
150 | visible: !isListView |
151 | |
152 | BlurredBackground { |
153 | @@ -555,12 +554,11 @@ |
154 | } |
155 | } |
156 | |
157 | - Rectangle { |
158 | + Item { |
159 | id: trackContainer; |
160 | anchors { |
161 | fill: parent |
162 | } |
163 | - color: "transparent" |
164 | |
165 | NumberAnimation { |
166 | id: trackContainerReorderAnimation |
167 | |
168 | === removed file 'MusicSearch.qml' |
169 | --- MusicSearch.qml 2014-10-21 16:03:44 +0000 |
170 | +++ MusicSearch.qml 1970-01-01 00:00:00 +0000 |
171 | @@ -1,236 +0,0 @@ |
172 | -/* |
173 | - * Copyright (C) 2013, 2014 |
174 | - * Andrew Hayzen <ahayzen@gmail.com> |
175 | - * Daniel Holm <d.holmen@gmail.com> |
176 | - * Victor Thompson <victor.thompson@gmail.com> |
177 | - * |
178 | - * This program is free software; you can redistribute it and/or modify |
179 | - * it under the terms of the GNU General Public License as published by |
180 | - * the Free Software Foundation; version 3. |
181 | - * |
182 | - * This program is distributed in the hope that it will be useful, |
183 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
184 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
185 | - * GNU General Public License for more details. |
186 | - * |
187 | - * You should have received a copy of the GNU General Public License |
188 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
189 | - */ |
190 | - |
191 | -import QtMultimedia 5.0 |
192 | -import QtQuick 2.3 |
193 | -import Ubuntu.Components 1.1 |
194 | -import Ubuntu.Components.ListItems 1.0 as ListItem |
195 | -import Ubuntu.Components.Popups 1.0 |
196 | -import Ubuntu.MediaScanner 0.1 |
197 | -import Ubuntu.Thumbnailer 0.1 |
198 | -import QtQuick.LocalStorage 2.0 |
199 | -import "playlists.js" as Playlists |
200 | -import "common" |
201 | -import "common/ListItemActions" |
202 | - |
203 | -Item { |
204 | - id: sheetItem |
205 | - |
206 | - property alias sheet: sheetComponent |
207 | - property bool sheetVisible: false |
208 | - |
209 | - Component { |
210 | - id: sheetComponent |
211 | - |
212 | - // Sheet to search for music tracks |
213 | - DefaultSheet { |
214 | - id: searchTrack |
215 | - title: i18n.tr("Search") |
216 | - contentsHeight: units.gu(80) |
217 | - |
218 | - onDoneClicked: PopupUtils.close(searchTrack) |
219 | - |
220 | - Component.onCompleted: { |
221 | - searchField.forceActiveFocus() |
222 | - } |
223 | - |
224 | - onVisibleChanged: { |
225 | - if (visible) { |
226 | - musicToolbar.setSheet(searchTrack) |
227 | - sheetVisible = true |
228 | - } |
229 | - else { |
230 | - musicToolbar.removeSheet(searchTrack) |
231 | - sheetVisible = false |
232 | - } |
233 | - } |
234 | - |
235 | - TextField { |
236 | - id: searchField |
237 | - anchors { |
238 | - left: parent.left; |
239 | - leftMargin: units.gu(2); |
240 | - top: parent.top; |
241 | - right: parent.right; |
242 | - rightMargin: units.gu(2); |
243 | - } |
244 | - |
245 | - width: parent.width/1.5 |
246 | - placeholderText: i18n.tr("Search") |
247 | - hasClearButton: true |
248 | - highlighted: true |
249 | - focus: true |
250 | - inputMethodHints: Qt.ImhNoPredictiveText |
251 | - //canPaste: true // why work, you do not, hrm? |
252 | - |
253 | - // search icon |
254 | - primaryItem: Image { |
255 | - height: parent.height*0.5 |
256 | - width: parent.height*0.5 |
257 | - anchors.verticalCenter: parent.verticalCenter |
258 | - anchors.verticalCenterOffset: -units.gu(0.2) |
259 | - source: Qt.resolvedUrl("images/search.svg") |
260 | - } |
261 | - |
262 | - onTextChanged: { |
263 | - searchTimer.start() // start the countdown, baby! |
264 | - } |
265 | - |
266 | - // Provide a small pause before search |
267 | - Timer { |
268 | - id: searchTimer |
269 | - interval: 500 |
270 | - repeat: false |
271 | - onTriggered: { |
272 | - songsSearchModel.query = searchField.text; |
273 | - searchActivity.running = true // start the activity indicator |
274 | - |
275 | - indicatorTimer.start() |
276 | - } |
277 | - } |
278 | - // and onother one for the indicator |
279 | - Timer { |
280 | - id: indicatorTimer |
281 | - interval: 500 |
282 | - repeat: false |
283 | - onTriggered: { |
284 | - searchActivity.running = false |
285 | - } |
286 | - } |
287 | - |
288 | - // Indicator to show search activity |
289 | - ActivityIndicator { |
290 | - id: searchActivity |
291 | - anchors { |
292 | - verticalCenter: searchField.verticalCenter; |
293 | - right: searchField.right; |
294 | - rightMargin: units.gu(1) |
295 | - } |
296 | - running: false |
297 | - } |
298 | - } |
299 | - |
300 | - Rectangle { |
301 | - width: parent.width |
302 | - height: parent.height |
303 | - color: "transparent" |
304 | - visible: searchField.text |
305 | - clip: true |
306 | - anchors { |
307 | - top: searchField.bottom |
308 | - bottom: parent.bottom |
309 | - left: parent.left |
310 | - right: parent.right |
311 | - } |
312 | - |
313 | - // show each playlist and make them chosable |
314 | - ListView { |
315 | - id: searchTrackView |
316 | - objectName: "searchtrackview" |
317 | - width: parent.width |
318 | - height: parent.width |
319 | - model: SongsSearchModel { |
320 | - id: songsSearchModel |
321 | - store: musicStore |
322 | - } |
323 | - |
324 | - onMovementStarted: { |
325 | - searchTrackView.forceActiveFocus() |
326 | - } |
327 | - |
328 | - // Requirements for ListItemWithActions |
329 | - property var selectedItems: [] |
330 | - |
331 | - signal clearSelection(bool closeSelection) |
332 | - signal selectAll() |
333 | - |
334 | - onClearSelection: { |
335 | - selectedItems = [] |
336 | - |
337 | - if (closeSelection || closeSelection === undefined) { |
338 | - state = "normal" |
339 | - } |
340 | - } |
341 | - onSelectAll: { |
342 | - for (var i=0; i < model.count; i++) { |
343 | - if (selectedItems.indexOf(i) === -1) { |
344 | - selectedItems.push(i) |
345 | - } |
346 | - } |
347 | - } |
348 | - onVisibleChanged: { |
349 | - if (!visible) { |
350 | - clearSelection(true) |
351 | - } |
352 | - } |
353 | - delegate: ListItemWithActions { |
354 | - id: search |
355 | - color: "transparent" |
356 | - objectName: "playlist" |
357 | - width: parent.width |
358 | - height: styleMusic.common.itemHeight |
359 | - |
360 | - rightSideActions: [ |
361 | - AddToQueue { |
362 | - |
363 | - }, |
364 | - AddToPlaylist { |
365 | - |
366 | - } |
367 | - ] |
368 | - |
369 | - onItemClicked: { |
370 | - console.debug("Debug: "+title+" added to queue") |
371 | - // now play this track, but keep current queue |
372 | - trackQueue.append(model) |
373 | - trackQueueClick(trackQueue.model.count - 1); |
374 | - onDoneClicked: PopupUtils.close(searchTrack) |
375 | - } |
376 | - |
377 | - MusicRow { |
378 | - covers: [{art: model.art}] |
379 | - column: Column { |
380 | - spacing: units.gu(1) |
381 | - Label { |
382 | - id: trackArtist |
383 | - color: styleMusic.common.subtitle |
384 | - fontSize: "x-small" |
385 | - text: model.author |
386 | - } |
387 | - Label { |
388 | - id: trackTitle |
389 | - color: styleMusic.common.music |
390 | - fontSize: "small" |
391 | - objectName: "tracktitle" |
392 | - text: model.title |
393 | - } |
394 | - Label { |
395 | - id: trackAlbum |
396 | - color: styleMusic.common.subtitle |
397 | - fontSize: "xx-small" |
398 | - text: model.album |
399 | - } |
400 | - } |
401 | - } |
402 | - } |
403 | - } |
404 | - } |
405 | - } |
406 | - } |
407 | -} |
408 | |
409 | === removed file 'MusicSettings.qml' |
410 | --- MusicSettings.qml 2014-09-30 15:18:25 +0000 |
411 | +++ MusicSettings.qml 1970-01-01 00:00:00 +0000 |
412 | @@ -1,227 +0,0 @@ |
413 | -/* |
414 | - * Copyright (C) 2013 Andrew Hayzen <ahayzen@gmail.com> |
415 | - * Daniel Holm <d.holmen@gmail.com> |
416 | - * Victor Thompson <victor.thompson@gmail.com> |
417 | - * |
418 | - * This program is free software; you can redistribute it and/or modify |
419 | - * it under the terms of the GNU General Public License as published by |
420 | - * the Free Software Foundation; version 3. |
421 | - * |
422 | - * This program is distributed in the hope that it will be useful, |
423 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
424 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
425 | - * GNU General Public License for more details. |
426 | - * |
427 | - * You should have received a copy of the GNU General Public License |
428 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
429 | - */ |
430 | - |
431 | -import QtQuick 2.3 |
432 | -import Ubuntu.Components 1.1 |
433 | -import Ubuntu.Components.ListItems 1.0 as ListItem |
434 | -import Ubuntu.Components.Popups 1.0 |
435 | -import QtQuick.LocalStorage 2.0 |
436 | -import "settings.js" as Settings |
437 | -import "scrobble.js" as Scrobble |
438 | -import "playlists.js" as Playlists |
439 | - |
440 | -ComposerSheet { |
441 | - id: musicSettings |
442 | - title: i18n.tr("Settings") |
443 | - contentsHeight: parent.height; |
444 | - |
445 | - onCancelClicked: PopupUtils.close(musicSettings) |
446 | - onConfirmClicked: { |
447 | - PopupUtils.close(musicSettings) |
448 | - console.debug("Debug: Save settings") |
449 | - Settings.initialize() |
450 | - |
451 | - // Equaliser |
452 | - // ACTIVATE IN 1.+ Settings.setSetting("eqialiser",equaliser.index) |
453 | - |
454 | - // snap track |
455 | - Settings.setSetting("snaptrack",snapSwitch.checked) |
456 | - |
457 | - // ACCOUNTS |
458 | - // Last.fm |
459 | - |
460 | - // MUSIC STREAMING |
461 | - // Ubuntu one |
462 | - /* READY THIS LATER IN 1.+ |
463 | - if (ubuntuaccount === activated) { |
464 | - Settings.setSetting("wifiswitch",wifiSwitch.checked) |
465 | - }*/ |
466 | - |
467 | - // -- random = shuffleSwitch.checked // set shuffle state variable |
468 | - //console.debug("Debug: Shuffle: "+ shuffleSwitch.checked) |
469 | - |
470 | - // MOVE TO scrobble Settings.setSetting("scrobble", scrobbleSwitch.checked) // save shuffle state |
471 | - //scrobble = scrobbleSwitch.checked // set scrobble state variable |
472 | - //console.debug("Debug: Scrobble: "+ scrobbleSwitch.checked) |
473 | - } |
474 | - |
475 | - // Activate in 1.+ |
476 | - ListItem.ItemSelector { |
477 | - id: equaliser |
478 | - anchors.top: parent.top |
479 | - anchors.left: parent.left |
480 | - anchors.right: parent.right |
481 | - enabled: false |
482 | - text: i18n.tr("Equaliser") |
483 | - model: [i18n.tr("Default"), |
484 | - i18n.tr("Acoustic"), |
485 | - i18n.tr("Classical"), |
486 | - i18n.tr("Electronic"), |
487 | - i18n.tr("Flat"), |
488 | - i18n.tr("Hip Hop"), |
489 | - i18n.tr("Jazz"), |
490 | - i18n.tr("Metal"), |
491 | - i18n.tr("Pop"), |
492 | - i18n.tr("Rock"), |
493 | - i18n.tr("Custom")] |
494 | - onDelegateClicked: { |
495 | - customdebug("Value changed to "+index) |
496 | - //equaliserChange(index) |
497 | - } |
498 | - } |
499 | - |
500 | - // Snap to current track |
501 | - Rectangle { |
502 | - id: snapRow |
503 | - color: "transparent" |
504 | - width: parent.width |
505 | - anchors.top: equaliser.bottom |
506 | - anchors.topMargin: units.gu(2) |
507 | - anchors.left: parent.left |
508 | - anchors.right: parent.right |
509 | - anchors.leftMargin: units.gu(2) |
510 | - Label { |
511 | - id: snapLabel |
512 | - anchors.verticalCenter: snapSwitch.verticalCenter |
513 | - text: i18n.tr("Snap to current song \nwhen opening toolbar") |
514 | - } |
515 | - Switch { |
516 | - id: snapSwitch |
517 | - checked: Settings.getSetting("snaptrack") === "1" |
518 | - anchors.right: parent.right |
519 | - } |
520 | - } |
521 | - // Accounts |
522 | - Rectangle { |
523 | - id: accounts |
524 | - anchors.top: equaliser.bottom |
525 | - anchors.topMargin: units.gu(12) |
526 | - anchors.bottom: streaming.top |
527 | - anchors.bottomMargin: units.gu(2) |
528 | - color: "transparent" |
529 | - width: parent.width |
530 | - |
531 | - Label { |
532 | - id: accountLabel |
533 | - text: i18n.tr("Accounts") |
534 | - anchors.top: parent.top |
535 | - anchors.topMargin: units.gu(2) |
536 | - } |
537 | - |
538 | - // lastfm |
539 | - ListItem.Subtitled { |
540 | - id: lastfmProg |
541 | - anchors.top: parent.top |
542 | - anchors.topMargin: units.gu(5) |
543 | - anchors.left: parent.left |
544 | - anchors.right: parent.right |
545 | - anchors.bottomMargin: units.gu(8) |
546 | - text: i18n.tr("Last.fm") |
547 | - subText: i18n.tr("Login to scrobble and import playlists") |
548 | - width: parent.width |
549 | - progression: true |
550 | - enabled: false |
551 | - onClicked: { |
552 | - PopupUtils.open(Qt.resolvedUrl("LoginLastFM.qml"), mainView, |
553 | - { |
554 | - title: i18n.tr("Last.fm") |
555 | - } ) |
556 | - PopupUtils.close(musicSettings) |
557 | - } |
558 | - } |
559 | - } |
560 | - |
561 | - // Music Streaming |
562 | - // Activate in 1.+ |
563 | - Rectangle { |
564 | - id: streaming |
565 | - anchors.top: equaliser.bottom |
566 | - anchors.topMargin: units.gu(24) |
567 | - color: "transparent" |
568 | - width: parent.width |
569 | - Label { |
570 | - text: i18n.tr("Music Streaming") |
571 | - visible: true |
572 | - } |
573 | - // Ubuntu One |
574 | - ListItem.Subtitled { |
575 | - id: musicStreamProg |
576 | - anchors.top: parent.bottom |
577 | - anchors.topMargin: units.gu(2) |
578 | - anchors.left: parent.left |
579 | - anchors.right: parent.right |
580 | - text: i18n.tr("Ubuntu One") |
581 | - subText: i18n.tr("Sign in to stream your cloud music") |
582 | - enabled: false |
583 | - progression: true |
584 | - onClicked: { |
585 | - customdebug("I'm Ron Burgendy...?") |
586 | - } |
587 | - } |
588 | - |
589 | - Rectangle { |
590 | - id: wifiRow |
591 | - anchors.top: parent.top |
592 | - anchors.topMargin: units.gu(10) |
593 | - color: "transparent" |
594 | - width: parent.width |
595 | - Label { |
596 | - id: streamwifiLabel |
597 | - text: i18n.tr("Stream only on Wi-Fi") |
598 | - enabled: false // check if account is connected |
599 | - anchors.left: parent.left |
600 | - anchors.leftMargin: units.gu(2) |
601 | - anchors.verticalCenter: wifiSwitch.verticalCenter |
602 | - } |
603 | - Switch { |
604 | - id: wifiSwitch |
605 | - checked: Settings.getSetting("wifiswitch") === "1" |
606 | - enabled: false // check if account is connected |
607 | - anchors.right: parent.right |
608 | - } |
609 | - } |
610 | - } |
611 | - |
612 | - /* MOVE THIS STUFF |
613 | - // import playlists from lastfm |
614 | - Row { |
615 | - spacing: units.gu(2) |
616 | - Button { |
617 | - id: lastfmPlaylists |
618 | - text: i18n.tr("Import playlists from last.fm") |
619 | - width: units.gu(30) |
620 | - color: "#c94212" |
621 | - enabled: Settings.getSetting("scrobble") === "1" // only if scrobble is activated. |
622 | - onClicked: { |
623 | - console.debug("Debug: import playlists from last.fm") |
624 | - Scrobble.getPlaylists(Settings.getSetting("lastfmusername")) |
625 | - } |
626 | - } |
627 | - } */ |
628 | - |
629 | - // developer button - KILLS YOUR CAT! |
630 | - Button { |
631 | - text: i18n.tr("Clean everything!") |
632 | - color: "red" |
633 | - visible: args.values.debug |
634 | - onClicked: { |
635 | - Settings.reset() |
636 | - Playlists.reset() |
637 | - } |
638 | - } |
639 | -} |
640 | |
641 | === modified file 'MusicToolbar.qml' |
642 | --- MusicToolbar.qml 2014-10-20 14:52:22 +0000 |
643 | +++ MusicToolbar.qml 2014-10-22 14:55:14 +0000 |
644 | @@ -88,12 +88,11 @@ |
645 | opened: true |
646 | |
647 | /* Expanded toolbar */ |
648 | - Rectangle { |
649 | + Item { |
650 | id: musicToolbarExpandedContainer |
651 | anchors { |
652 | fill: parent |
653 | } |
654 | - color: "transparent" |
655 | |
656 | Rectangle { |
657 | id: musicToolbarPlayerControls |
658 | @@ -128,7 +127,7 @@ |
659 | ] |
660 | |
661 | /* Disabled (empty state) controls */ |
662 | - Rectangle { |
663 | + Item { |
664 | id: disabledPlayerControlsGroup |
665 | anchors { |
666 | bottom: playerControlsProgressBar.top |
667 | @@ -136,7 +135,6 @@ |
668 | right: parent.right |
669 | top: parent.top |
670 | } |
671 | - color: "transparent" |
672 | |
673 | Label { |
674 | id: noSongsInQueueLabel |
675 | @@ -191,7 +189,7 @@ |
676 | } |
677 | |
678 | /* Enabled (queue > 0) controls */ |
679 | - Rectangle { |
680 | + Item { |
681 | id: enabledPlayerControlsGroup |
682 | anchors { |
683 | bottom: playerControlsProgressBar.top |
684 | @@ -199,7 +197,6 @@ |
685 | right: parent.right |
686 | top: parent.top |
687 | } |
688 | - color: "transparent" |
689 | |
690 | /* Album art in player controls */ |
691 | CoverGrid { |
692 | @@ -295,14 +292,13 @@ |
693 | } |
694 | |
695 | /* Mouse area to jump to now playing */ |
696 | - Rectangle { |
697 | + Item { |
698 | anchors { |
699 | bottom: parent.bottom |
700 | left: parent.left |
701 | right: playerControlsLabels.right |
702 | top: parent.top |
703 | } |
704 | - color: "transparent" |
705 | objectName: "jumpNowPlaying" |
706 | function trigger() { |
707 | tabs.pushNowPlaying(); |
708 | |
709 | === modified file 'common/BlurredBackground.qml' |
710 | --- common/BlurredBackground.qml 2014-10-21 03:14:38 +0000 |
711 | +++ common/BlurredBackground.qml 2014-10-22 14:55:14 +0000 |
712 | @@ -22,13 +22,16 @@ |
713 | import QtGraphicalEffects 1.0 |
714 | |
715 | // Blurred background |
716 | -Rectangle { |
717 | +Item { |
718 | width: parent.width |
719 | + |
720 | property string art // : player.currentMetaFile === "" ? Qt.resolvedUrl("../images/music-app-cover@30.png") : player.currentMetaArt |
721 | |
722 | // dark layer |
723 | Rectangle { |
724 | - anchors.fill: parent |
725 | + anchors { |
726 | + fill: parent |
727 | + } |
728 | color: "black" |
729 | } |
730 | |
731 | |
732 | === modified file 'common/Card.qml' |
733 | --- common/Card.qml 2014-10-13 14:18:01 +0000 |
734 | +++ common/Card.qml 2014-10-22 14:55:14 +0000 |
735 | @@ -19,9 +19,8 @@ |
736 | import Ubuntu.Components 1.1 |
737 | |
738 | |
739 | -Rectangle { |
740 | +Item { |
741 | id: card |
742 | - color: "transparent" |
743 | height: cardColumn.childrenRect.height + 2 * bg.anchors.margins |
744 | |
745 | property alias coverSources: coverGrid.covers |
746 | @@ -80,8 +79,7 @@ |
747 | size: parent.width |
748 | } |
749 | |
750 | - Rectangle { |
751 | - color: "transparent" |
752 | + Item { |
753 | height: units.gu(1) |
754 | width: units.gu(1) |
755 | } |
756 | @@ -116,8 +114,7 @@ |
757 | wrapMode: Text.WordWrap |
758 | } |
759 | |
760 | - Rectangle { |
761 | - color: "transparent" |
762 | + Item { |
763 | height: units.gu(1.5) |
764 | width: units.gu(1) |
765 | } |
766 | |
767 | === modified file 'common/CoverGrid.qml' |
768 | --- common/CoverGrid.qml 2014-10-21 18:08:12 +0000 |
769 | +++ common/CoverGrid.qml 2014-10-22 14:55:14 +0000 |
770 | @@ -20,9 +20,8 @@ |
771 | import QtQuick 2.3 |
772 | import Ubuntu.Components 1.1 |
773 | |
774 | -Rectangle { |
775 | +Item { |
776 | id: coverGrid |
777 | - color: "transparent" |
778 | height: size |
779 | width: size |
780 | |
781 | |
782 | === removed file 'common/SwipeDelete.qml' |
783 | --- common/SwipeDelete.qml 2014-09-20 10:50:45 +0000 |
784 | +++ common/SwipeDelete.qml 1970-01-01 00:00:00 +0000 |
785 | @@ -1,107 +0,0 @@ |
786 | -/* |
787 | - * Copyright (C) 2013 Andrew Hayzen <ahayzen@gmail.com> |
788 | - * Daniel Holm <d.holmen@gmail.com> |
789 | - * Victor Thompson <victor.thompson@gmail.com> |
790 | - * |
791 | - * This program is free software; you can redistribute it and/or modify |
792 | - * it under the terms of the GNU General Public License as published by |
793 | - * the Free Software Foundation; version 3. |
794 | - * |
795 | - * This program is distributed in the hope that it will be useful, |
796 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
797 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
798 | - * GNU General Public License for more details. |
799 | - * |
800 | - * You should have received a copy of the GNU General Public License |
801 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
802 | - */ |
803 | - |
804 | -import QtQuick 2.3 |
805 | -import Ubuntu.Components 1.1 |
806 | - |
807 | -/* SwipeDelete object */ |
808 | -Rectangle { |
809 | - id: swipeBackground |
810 | - color: "transparent" |
811 | - height: parent.height |
812 | - state: "normal" |
813 | - width: parent.width * 3 |
814 | - x: 0 - parent.width // start out of view |
815 | - |
816 | - property string direction: "" |
817 | - property int duration: 0 |
818 | - property bool deleteState: false |
819 | - property bool primed: false |
820 | - |
821 | - Rectangle { |
822 | - id: swipeBackgroundLeft |
823 | - anchors.left: parent.left |
824 | - color: styleMusic.common.black |
825 | - opacity: 0.7 |
826 | - height: parent.height |
827 | - width: parent.width / 3 |
828 | - Label { |
829 | - id: swipeBackgroundLeftText |
830 | - objectName: "leftDelete" |
831 | - anchors.margins: units.gu(2) |
832 | - anchors.right: parent.right |
833 | - anchors.verticalCenter: parent.verticalCenter |
834 | - color: styleMusic.common.white |
835 | - fontSize: "large" |
836 | - horizontalAlignment: Text.AlignRight |
837 | - text: i18n.tr("Clear") |
838 | - verticalAlignment: Text.AlignVCenter |
839 | - } |
840 | - Icon { |
841 | - id: swipeBackgroundLeftImage |
842 | - anchors.margins: units.gu(2) |
843 | - anchors.right: swipeBackgroundLeftText.left |
844 | - anchors.verticalCenter: parent.verticalCenter |
845 | - name: "delete" |
846 | - height: units.gu(6) |
847 | - width: height |
848 | - } |
849 | - MouseArea { |
850 | - anchors.fill: parent |
851 | - onClicked: { |
852 | - deleteState = true; |
853 | - } |
854 | - } |
855 | - } |
856 | - |
857 | - Rectangle { |
858 | - id: swipeBackgroundRight |
859 | - anchors.right: parent.right |
860 | - color: styleMusic.common.black |
861 | - opacity: 0.7 |
862 | - height: parent.height |
863 | - width: parent.width / 3 |
864 | - Label { |
865 | - id: swipeBackgroundRightText |
866 | - objectName: "rightDelete" |
867 | - anchors.left: parent.left |
868 | - anchors.margins: units.gu(2) |
869 | - anchors.verticalCenter: parent.verticalCenter |
870 | - color: styleMusic.common.white |
871 | - fontSize: "large" |
872 | - horizontalAlignment: Text.AlignLeft |
873 | - text: i18n.tr("Clear") |
874 | - verticalAlignment: Text.AlignVCenter |
875 | - } |
876 | - Icon { |
877 | - id: swipeBackgroundRightImage |
878 | - anchors.left: swipeBackgroundRightText.right |
879 | - anchors.margins: units.gu(2) |
880 | - anchors.verticalCenter: parent.verticalCenter |
881 | - name: "delete" |
882 | - height: units.gu(6) |
883 | - width: height |
884 | - } |
885 | - MouseArea { |
886 | - anchors.fill: parent |
887 | - onClicked: { |
888 | - deleteState = true; |
889 | - } |
890 | - } |
891 | - } |
892 | -} |
893 | |
894 | === modified file 'music-app.qml' |
895 | --- music-app.qml 2014-10-22 14:50:41 +0000 |
896 | +++ music-app.qml 2014-10-22 14:55:14 +0000 |
897 | @@ -30,7 +30,6 @@ |
898 | import UserMetrics 0.1 |
899 | import "settings.js" as Settings |
900 | import "meta-database.js" as Library |
901 | -import "scrobble.js" as Scrobble |
902 | import "playlists.js" as Playlists |
903 | import "common" |
904 | |
905 | @@ -554,7 +553,6 @@ |
906 | Settings.setSetting("snaptrack", "1") // default state of snaptrack |
907 | Settings.setSetting("shuffle", "0") // default state of shuffle |
908 | Settings.setSetting("repeat", "0") // default state of repeat |
909 | - //Settings.setSetting("scrobble", "0") // default state of scrobble |
910 | } |
911 | Library.initialize(); |
912 | |
913 | @@ -563,9 +561,6 @@ |
914 | |
915 | // everything else |
916 | loading.visible = true |
917 | - scrobble = Settings.getSetting("scrobble") == "1" // scrobble state |
918 | - lastfmusername = Settings.getSetting("lastfmusername") // lastfm username |
919 | - lastfmpassword = Settings.getSetting("lastfmpassword") // lastfm password |
920 | |
921 | // push the page to view |
922 | mainPageStack.push(tabs) |
923 | @@ -590,10 +585,6 @@ |
924 | // VARIABLES |
925 | property string musicName: i18n.tr("Music") |
926 | property string appVersion: '1.2' |
927 | - property bool scrobble: false |
928 | - property string lastfmusername |
929 | - property string lastfmpassword |
930 | - property string timestamp // used to scrobble |
931 | property var chosenElements: [] |
932 | property bool toolbarShown: musicToolbar.visible |
933 | property bool selectedAlbum: false |
934 | @@ -760,58 +751,6 @@ |
935 | id: player |
936 | } |
937 | |
938 | - // Model to send the data |
939 | - XmlListModel { |
940 | - id: scrobblemodel |
941 | - query: "/" |
942 | - |
943 | - function rpcRequest(request,handler) { |
944 | - var http = new XMLHttpRequest() |
945 | - |
946 | - http.open("POST",scrobble_url,true) |
947 | - http.setRequestHeader("User-Agent", "Music-App/"+appVersion) |
948 | - http.setRequestHeader("Content-type", "text/xml") |
949 | - http.setRequestHeader("Content-length", request.length) |
950 | - if (root.authenticate) { |
951 | - http.setRequestHeader("Authorization", "Basic " + Qt.btoa(lastfmusername+":"+lastfmusername)) |
952 | - } |
953 | - http.setRequestHeader("Connection", "close") |
954 | - http.onreadystatechange = function() { |
955 | - if(http.readyState == 4 && http.status == 200) { |
956 | - console.debug("Debug: XmlRpc::rpcRequest.onreadystatechange()") |
957 | - handler(http.responseText) |
958 | - } |
959 | - } |
960 | - http.send(request) |
961 | - } |
962 | - |
963 | - function callHandler(response) { |
964 | - xml = response |
965 | - } |
966 | - |
967 | - function call(cmd,params) { |
968 | - console.debug("Debug: XmlRpc.call(",cmd,params,")") |
969 | - var request = "" |
970 | - request += "<?xml version='1.0'?>" |
971 | - request += "<methodCall>" |
972 | - request += "<methodName>" + cmd + "</methodName>" |
973 | - request += "<params>" |
974 | - for (var i=0; i<params.length; i++) { |
975 | - request += "<param><value>" |
976 | - if (typeof(params[i])=="string") { |
977 | - request += "<string>" + params[i] + "</string>" |
978 | - } |
979 | - if (typeof(params[i])=="number") { |
980 | - request += "<int>" + params[i] + "</int>" |
981 | - } |
982 | - request += "</value></param>" |
983 | - } |
984 | - request += "</params>" |
985 | - request += "</methodCall>" |
986 | - rpcRequest(request,callHandler) |
987 | - } |
988 | - } |
989 | - |
990 | // TODO: Used by playlisttracks move to U1DB |
991 | LibraryListModel { |
992 | id: albumTracksModel |
993 | @@ -869,59 +808,6 @@ |
994 | } |
995 | } |
996 | |
997 | - // load sheets (after model) |
998 | - MusicSearch { |
999 | - id: searchSheet |
1000 | - } |
1001 | - |
1002 | - // Popover for tracks, queue and add to playlist, for example |
1003 | - Component { // TODO: needed anymore? remove? |
1004 | - id: trackPopoverComponent |
1005 | - Popover { |
1006 | - id: trackPopover |
1007 | - Column { |
1008 | - id: containerLayout |
1009 | - anchors { |
1010 | - left: parent.left |
1011 | - top: parent.top |
1012 | - right: parent.right |
1013 | - } |
1014 | - ListItem.Standard { |
1015 | - Label { |
1016 | - text: i18n.tr("Add to queue") |
1017 | - color: styleMusic.popover.labelColor |
1018 | - fontSize: "large" |
1019 | - anchors.horizontalCenter: parent.horizontalCenter |
1020 | - anchors.verticalCenter: parent.verticalCenter |
1021 | - } |
1022 | - onClicked: { |
1023 | - console.debug("Debug: Add track to queue: " + JSON.stringify(chosenElements)) |
1024 | - PopupUtils.close(trackPopover) |
1025 | - |
1026 | - for (var i=0; i < chosenElements.length; i++) { |
1027 | - trackQueue.append(chosenElements[i]) |
1028 | - } |
1029 | - } |
1030 | - } |
1031 | - ListItem.Standard { |
1032 | - Label { |
1033 | - text: i18n.tr("Add to playlist") |
1034 | - color: styleMusic.popover.labelColor |
1035 | - fontSize: "large" |
1036 | - anchors.horizontalCenter: parent.horizontalCenter |
1037 | - anchors.verticalCenter: parent.verticalCenter |
1038 | - } |
1039 | - onClicked: { |
1040 | - console.debug("Debug: Add track to playlist") |
1041 | - PopupUtils.close(trackPopover) |
1042 | - |
1043 | - mainPageStack.push(addtoPlaylist) |
1044 | - } |
1045 | - } |
1046 | - } |
1047 | - } |
1048 | - } |
1049 | - |
1050 | // New playlist dialog |
1051 | Component { |
1052 | id: newPlaylistDialog |
1053 | @@ -1187,8 +1073,10 @@ |
1054 | // Overlay to show when no tracks detected on the device |
1055 | Rectangle { |
1056 | id: libraryEmpty |
1057 | - anchors.fill: parent |
1058 | - anchors.topMargin: -emptyPage.header.height |
1059 | + anchors { |
1060 | + fill: parent |
1061 | + topMargin: -emptyPage.header.height |
1062 | + } |
1063 | color: mainView.backgroundColor |
1064 | visible: emptyPage.noMusic |
1065 | |
1066 | @@ -1215,8 +1103,10 @@ |
1067 | // Overlay to show when no playlists are on the device |
1068 | Rectangle { |
1069 | id: playlistsEmpty |
1070 | - anchors.fill: parent |
1071 | - anchors.topMargin: -emptyPage.header.height |
1072 | + anchors { |
1073 | + fill: parent |
1074 | + topMargin: -emptyPage.header.height |
1075 | + } |
1076 | color: mainView.backgroundColor |
1077 | visible: emptyPage.noPlaylists && !emptyPage.noMusic && tabs.selectedTab.index === 4 |
1078 | |
1079 | @@ -1243,8 +1133,10 @@ |
1080 | // Overlay to show when no recent items are on the device |
1081 | Rectangle { |
1082 | id: recentEmpty |
1083 | - anchors.fill: parent |
1084 | - anchors.topMargin: -emptyPage.header.height |
1085 | + anchors { |
1086 | + fill: parent |
1087 | + topMargin: -emptyPage.header.height |
1088 | + } |
1089 | color: mainView.backgroundColor |
1090 | visible: emptyPage.noRecent && !emptyPage.noMusic && tabs.selectedTab.index === 0 |
1091 | |
1092 | |
1093 | === removed file 'scrobble.js' |
1094 | --- scrobble.js 2013-06-18 12:38:49 +0000 |
1095 | +++ scrobble.js 1970-01-01 00:00:00 +0000 |
1096 | @@ -1,127 +0,0 @@ |
1097 | -/* |
1098 | - * Copyright (C) 2013 Daniel Holm <d.holmen@gmail.com> |
1099 | - * Victor Thompson <victor.thompson@gmail.com> |
1100 | - * |
1101 | - * This program is free software; you can redistribute it and/or modify |
1102 | - * it under the terms of the GNU General Public License as published by |
1103 | - * the Free Software Foundation; version 3. |
1104 | - * |
1105 | - * This program is distributed in the hope that it will be useful, |
1106 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1107 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1108 | - * GNU General Public License for more details. |
1109 | - * |
1110 | - * You should have received a copy of the GNU General Public License |
1111 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1112 | - */ |
1113 | - |
1114 | -// VARIABLES |
1115 | -var api_key = "07c14de06e622165b5b4d55deb85f4da" |
1116 | -var secret_key = "14125657da06bcb14919e23e2f09de32" |
1117 | -var scrobble_url = "http://ws.audioscrobbler.com/2.0/" |
1118 | -var session_key = "" |
1119 | - |
1120 | -// FUNCTIONS |
1121 | -// get settings database (later, use settings.js and meta-database.js |
1122 | -function getDatabase() { |
1123 | - return LocalStorage.openDatabaseSync("music-app-metadata", "1.0", "StorageDatabase", 1000000); |
1124 | -} |
1125 | -// This function is used to retrieve meta data from the database |
1126 | -function getMetadata(file,type) { |
1127 | - var db = getDatabase(); |
1128 | - var res=""; |
1129 | - |
1130 | - try { |
1131 | - db.transaction(function(tx) { |
1132 | - //var rs = tx.executeSql('SELECT type=?;',[type],' FROM metadata WHERE file=?;', [file]); // tries to get the title of track |
1133 | - var rs = tx.executeSql('SELECT ? FROM metadata WHERE file=?;', [type,file]); // tries to get the title of track |
1134 | - |
1135 | - if (rs.rows.length > 0) { |
1136 | - res = rs.rows.item(0).value; |
1137 | - } else { |
1138 | - res = "Unknown"; |
1139 | - } |
1140 | - }) |
1141 | - } catch(e) { |
1142 | - return ""; |
1143 | - } |
1144 | - |
1145 | - // The function returns “Unknown” if the setting was not found in the database |
1146 | - // For more advanced projects, this should probably be handled through error codes |
1147 | - return res |
1148 | -} |
1149 | - |
1150 | -// get playlist of user |
1151 | -function getPlaylists(username) { |
1152 | - var getPlaylistsURL = scrobble_url+"?method=user.getplaylists&user="+username+"&api_key="+api_key |
1153 | - console.debug("Debug: url of call: "+getPlaylistsURL) |
1154 | - |
1155 | - // send request |
1156 | - // not ready yetrequest(getPlaylistsURL) |
1157 | -} |
1158 | - |
1159 | -// scrobble track |
1160 | -function scrobble(track,timestamp) { |
1161 | - var artist = getMetadata(track,artist) |
1162 | - var title = getMetadata(track,title) |
1163 | - var scrobbleURL = scrobble_url+"?method=track.scrobble&artist[0]="+artist+"&track[0]="+title+"×tamp="+timestamp+"&api_key="+api_key+"&api_sig="+secret_key+"&sk="+session_key |
1164 | - console.debug("Debug: Scrobble "+title+" "+artist+" "+timestamp) |
1165 | - // login first |
1166 | - //authenticate(username,password) |
1167 | - // send request |
1168 | - // not ready yetrequest(scrobbleURL) // send the request |
1169 | -} |
1170 | - |
1171 | -function now_playing(track,timestamp) { |
1172 | - var artist = getMetadata(track,artist) |
1173 | - var title = getMetadata(track,title) |
1174 | - var nowPlayingURL = scrobble_url+"?method=track.updateNowPlaying&artist[0]="+artist+"&track[0]="+title+"×tamp="+timestamp+"&api_key="+api_key+"&api_sig="+secret_key+"&sk="+session_key |
1175 | - console.debug("Debug: Send Now Playing "+title+" "+artist+" "+timestamp) |
1176 | - // login first |
1177 | - // lastfmlogin() |
1178 | - // send request |
1179 | - // not ready yetrequest(nowPlayingURL) |
1180 | -} |
1181 | - |
1182 | -function listner () { |
1183 | - console.debug("Debug: I dont know... "+this.responseText) |
1184 | -} |
1185 | - |
1186 | -function request(URL) { |
1187 | - console.debug("Debug: "+URL) |
1188 | - var https = new XMLHttpRequest(); // create new XMLHttpRequest |
1189 | - https.onload = listner; // send data over to debugger |
1190 | - |
1191 | - https.open("POST",URL,true); // use post to send to the API URL sync |
1192 | - https.setRequestHeader("User-Agent", "Music-App/"+appVersion) |
1193 | - https.send(); // now send the data |
1194 | - var xmlDoc = https.responseXML; |
1195 | - console.debug("Debug: answer of call is "+xmlDoc) |
1196 | -} |
1197 | - |
1198 | -function authenticate(username,password) { |
1199 | - // send to scrobble_url |
1200 | - var params = "?method=auth.getMobileSession&api_key="+api_key+"&api_sig="+secret_key+"&password="+password+"&username="+username |
1201 | - var signature = auth_signature(username,password) |
1202 | - var lastfmURL = scrobble_url+params |
1203 | - |
1204 | - // not ready yetrequest(lastfmURL) |
1205 | - |
1206 | - // get response |
1207 | - //var status = xmlDoc.getElementsByTagName("status")[0].childNodes[0].nodeValue |
1208 | - //var code = xmlDoc.getElementsByTagName("code")[0].childNodes[0].nodeValue |
1209 | - // get the token key and save it in variable (is only used once, so new on for each scrobble) |
1210 | - // get the session key and save in Settings database |
1211 | - |
1212 | - // if correct, print logged in |
1213 | - console.debug("Debug: Last FM is now authenticated: "+xmlDoc+ "NOT! It's not done yet, stupid ;)") |
1214 | - //console.debug("Debug: Server said "+status+" and "+code) |
1215 | - |
1216 | - // else print error and tell user to try again |
1217 | -} |
1218 | - |
1219 | -// mobile authentication |
1220 | -function auth_signature(username,password) { |
1221 | - var signature = Qt.md5("api_key"+api_key+"methodauth.getMobileSessionpassword"+password+"username"+username+secret_key) |
1222 | - return signature |
1223 | -} |
PASSED: Continuous integration, rev:689 91.189. 93.70:8080/ job/music- app-remix- ci/136/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1132 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1132/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/music- app-remix- utopic- amd64-ci/ 136
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/music- app-remix- ci/136/ rebuild
http://