summaryrefslogtreecommitdiffstats
path: root/source/kde/patch/amarok/amarok-liblastfm1.patch
blob: 4349931213ea6b50d9bc3c055cbc924f117cf985 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/CMakeLists.txt amarok-2.5.96/CMakeLists.txt
--- amarok-2.5.96.orig/CMakeLists.txt	2012-07-31 12:17:20.000000000 +0200
+++ amarok-2.5.96/CMakeLists.txt	2012-08-02 16:34:08.465503197 +0200
@@ -129,7 +129,7 @@
     # macro_log_feature( STRIGI_FOUND "strigi" "Index metadata of files" "http://strigi.sourceforge.net" FALSE "" "" )
 
     macro_optional_find_package(LibLastFm)
-    macro_log_feature( LIBLASTFM_FOUND "liblastfm" "Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists" "http://cdn.last.fm/src/liblastfm-0.3.0.tar.bz2" FALSE "" "version 0.3.x (versions 1.0 or higher are incompatible)" )
+    macro_log_feature( LIBLASTFM_FOUND "liblastfm" "Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists" "http://cdn.last.fm/src/liblastfm-1.0.0.tar.gz" FALSE "1.0.0" "" )
     macro_bool_to_01( LIBLASTFM_FOUND HAVE_LIBLASTFM )
 
     macro_optional_find_package( FFmpeg )
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/cmake/modules/FindLibLastFm.cmake amarok-2.5.96/cmake/modules/FindLibLastFm.cmake
--- amarok-2.5.96.orig/cmake/modules/FindLibLastFm.cmake	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/cmake/modules/FindLibLastFm.cmake	2012-08-02 16:32:36.418653940 +0200
@@ -6,7 +6,7 @@
 # LIBLASTFM_FOUND, whether liblastfm was found
 
 
-find_path(LIBLASTFM_INCLUDE_DIR NAMES Audioscrobbler
+find_path(LIBLASTFM_INCLUDE_DIR NAMES lastfm
    HINTS
    ~/usr/include
    /opt/local/include
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/LastfmReadLabelCapability.cpp amarok-2.5.96/src/LastfmReadLabelCapability.cpp
--- amarok-2.5.96.orig/src/LastfmReadLabelCapability.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/LastfmReadLabelCapability.cpp	2012-08-02 16:32:36.419653927 +0200
@@ -22,8 +22,7 @@
 #include <QMap>
 #include <QNetworkReply>
 
-#include <lastfm/XmlQuery>
-#include <ws.h>
+#include <lastfm/XmlQuery.h>
 #include "core/support/Amarok.h"
 
 namespace Capabilities
@@ -72,7 +71,8 @@
     {
         case QNetworkReply::NoError:
         {
-            lastfm::XmlQuery lfm = m_job->readAll();
+            lastfm::XmlQuery lfm;
+            lfm.parse(m_job->readAll());
             QList<lastfm::XmlQuery> tags = lfm.children( "tag" );
             QStringList ret;
             foreach( const lastfm::XmlQuery &child, tags )
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/context/engines/upcomingevents/UpcomingEventsEngine.cpp amarok-2.5.96/src/context/engines/upcomingevents/UpcomingEventsEngine.cpp
--- amarok-2.5.96.orig/src/context/engines/upcomingevents/UpcomingEventsEngine.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/context/engines/upcomingevents/UpcomingEventsEngine.cpp	2012-08-02 16:32:35.962659642 +0200
@@ -27,10 +27,6 @@
 #include "EngineController.h"
 #include "LastFmEventXmlParser.h"
 
-// LastFm
-#include <lastfm/XmlQuery>
-#include <lastfm/ws.h>
-
 // KDE
 #include <KDateTime>
 
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/core/support/Amarok.h amarok-2.5.96/src/core/support/Amarok.h
--- amarok-2.5.96.orig/src/core/support/Amarok.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/core/support/Amarok.h	2012-08-02 16:32:35.962659642 +0200
@@ -203,6 +203,7 @@
 
     inline const char* discogsApiKey() { return "91734dd989"; }
     inline const char* lastfmApiKey() { return "402d3ca8e9bc9d3cf9b85e1202944ca5"; }
+    inline const char* lastfmApiSharedSecret() { return "fe0dcde9fcd14c2d1d50665b646335e9"; }
     inline const char* yahooBossApiKey() { return "oQepTNrV34G9Satb1dgRZ8hdl1uhJvguDSU5Knl2Xd4ALK85knYt6ylr.FTA57XMRBA-"; }
     inline const char* flickrApiKey() { return "9c5a288116c34c17ecee37877397fe31"; }
 }
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/ampache/LastfmInfoParser.cpp amarok-2.5.96/src/services/ampache/LastfmInfoParser.cpp
--- amarok-2.5.96.orig/src/services/ampache/LastfmInfoParser.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/ampache/LastfmInfoParser.cpp	2012-08-02 16:32:35.954659742 +0200
@@ -20,8 +20,7 @@
 #include "core/support/Amarok.h"
 #include "core/support/Debug.h"
 
-#include <lastfm/XmlQuery>
-#include <lastfm/ws.h>
+#include <lastfm/XmlQuery.h>
 
 #include <KLocale>
 
@@ -55,7 +54,8 @@
     {
         case QNetworkReply::NoError:
         {
-            lastfm::XmlQuery lfm = m_jobs[ "getTrackInfo" ]->readAll();
+            lastfm::XmlQuery lfm;
+            lfm.parse( m_jobs[ "getTrackInfo" ]->readAll() );
             lastfm::XmlQuery wiki = lfm["track"]["wiki"];
             const QString contentText = wiki["content"].text();
             const QString publishedDate = wiki["published"].text();
@@ -103,7 +103,8 @@
     {
         case QNetworkReply::NoError:
         {
-            lastfm::XmlQuery lfm = m_jobs[ "getAlbumInfo" ]->readAll();
+            lastfm::XmlQuery lfm;
+            lfm.parse( m_jobs[ "getAlbumInfo" ]->readAll() );
             lastfm::XmlQuery wiki = lfm["album"]["wiki"];
             const QString summaryText = wiki["summary"].text();
             const QString contentText = wiki["content"].text();
@@ -155,7 +156,8 @@
     {
         case QNetworkReply::NoError:
         {
-            lastfm::XmlQuery lfm = m_jobs[ "getArtistInfo" ]->readAll();
+            lastfm::XmlQuery lfm;
+            lfm.parse( m_jobs[ "getArtistInfo" ]->readAll() );
             debug() << lfm.text();
             lastfm::XmlQuery bio = lfm["artist"]["bio"];
             const QString summaryText = bio["summary"].text();
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/LastFmService.cpp amarok-2.5.96/src/services/lastfm/LastFmService.cpp
--- amarok-2.5.96.orig/src/services/lastfm/LastFmService.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/LastFmService.cpp	2012-08-02 16:32:35.955659729 +0200
@@ -46,8 +46,8 @@
 #include "widgets/SearchWidget.h"
 #include "NetworkAccessManagerProxy.h"
 
-#include <lastfm/Audioscrobbler> // from liblastfm
-#include <lastfm/XmlQuery>
+#include <lastfm/Audioscrobbler.h> // from liblastfm
+#include <lastfm/XmlQuery.h>
 
 #include <KLocale>
 #include <KPasswordDialog>
@@ -224,10 +224,7 @@
 {
     // set the global static Lastfm::Ws stuff
     lastfm::ws::ApiKey = Amarok::lastfmApiKey();
-    lastfm::ws::SharedSecret = "fe0dcde9fcd14c2d1d50665b646335e9";
-    // testing w/ official keys
-    //Ws::SharedSecret = "73582dfc9e556d307aead069af110ab8";
-    //Ws::ApiKey = "c8c7b163b11f92ef2d33ba6cd3c2c3c3";
+    lastfm::ws::SharedSecret = Amarok::lastfmApiSharedSecret();
     m_userNameArray = qstrdup( m_userName.toLatin1().data() );
     lastfm::ws::Username = m_userNameArray;
     if( lastfm::nam() != The::networkAccessManager() )
@@ -309,7 +306,8 @@
         case QNetworkReply::NoError:
         {
 
-            lastfm::XmlQuery lfm = lastfm::XmlQuery( m_jobs[ "auth" ]->readAll() );
+            lastfm::XmlQuery lfm;
+            lfm.parse( m_jobs[ "auth" ]->readAll() );
             LastFmServiceConfig config;
 
             if( lfm.children( "error" ).size() > 0 )
@@ -359,10 +357,8 @@
     {
         case QNetworkReply::NoError:
         {
-            try
-            {
-                lastfm::XmlQuery lfm( m_jobs[ "getUserInfo" ]->readAll() );
-
+            lastfm::XmlQuery lfm;
+            if( lfm.parse( m_jobs[ "getUserInfo" ]->readAll() ) ) {
                 m_country = lfm["user"]["country"].text();
                 m_age = lfm["user"]["age"].text();
                 m_gender = lfm["user"]["gender"].text();
@@ -381,9 +377,10 @@
                 }
                 updateProfileInfo();
 
-            } catch( lastfm::ws::ParseError& e )
+            }
+            else
             {
-                debug() << "Got exception in parsing from last.fm:" << e.what();
+                debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
             }
             break;
         } case QNetworkReply::AuthenticationRequiredError:
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/LastFmServiceCollection.cpp amarok-2.5.96/src/services/lastfm/LastFmServiceCollection.cpp
--- amarok-2.5.96.orig/src/services/lastfm/LastFmServiceCollection.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/LastFmServiceCollection.cpp	2012-08-02 16:32:35.956659716 +0200
@@ -26,7 +26,7 @@
 #include "core-impl/collections/support/MemoryQueryMaker.h"
 
 #include <lastfm/ws.h>
-#include <lastfm/XmlQuery>
+#include <lastfm/XmlQuery.h>
 
 #include <QNetworkReply>
 
@@ -154,10 +154,9 @@
         case QNetworkReply::NoError:
         {
             // iterate through each neighbour
-            try
+            lastfm::XmlQuery lfm;
+            if( lfm.parse( m_jobs[ "user.getNeighbours" ]->readAll() ) )
             {
-                lastfm::XmlQuery lfm( m_jobs[ "user.getNeighbours" ]->readAll() );
-
                 foreach( const lastfm::XmlQuery &e, lfm[ "neighbours" ].children( "user" ) )
                 {
                     const QString name = e[ "name" ].text();
@@ -168,9 +167,10 @@
                     addTrack( trackPtr );
                 }
 
-            } catch( lastfm::ws::ParseError& e )
+            }
+            else
             {
-                debug() << "Got exception in parsing from last.fm:" << e.what();
+                debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
             }
             break;
         }
@@ -195,15 +195,14 @@
         case QNetworkReply::NoError:
         {
             // iterate through each neighbour
-            try
+            if( !m_jobs[ "user.getNeighbours" ] )
+            {
+                debug() << "BAD! got no result object";
+                return;
+            }
+            lastfm::XmlQuery lfm;
+            if( lfm.parse( m_jobs[ "user.getNeighbours" ]->readAll() ) )
             {
-                if( !m_jobs[ "user.getNeighbours" ] )
-                {
-                    debug() << "BAD! got no result object";
-                    return;
-                }
-                lastfm::XmlQuery lfm( m_jobs[ "user.getNeighbours" ]->readAll() );
-
                 // iterate through each neighbour
                 foreach( const lastfm::XmlQuery &e, lfm[ "neighbours" ].children( "user" ) )
                 {
@@ -218,9 +217,10 @@
 
                 // should be safe, as both slots SHOULD get called before we return to the event loop...
                 m_jobs[ "user.getNeighbours" ]->deleteLater();
-            } catch( lastfm::ws::ParseError& e )
+            }
+            else
             {
-                debug() << "Got exception in parsing from last.fm:" << e.what();
+                debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
             }
             break;
         }
@@ -248,10 +248,9 @@
     {
         case QNetworkReply::NoError:
         {
-            try
+            lastfm::XmlQuery lfm;
+            if( lfm.parse( m_jobs[ "user.getFriends" ]->readAll() ) )
             {
-                lastfm::XmlQuery lfm( m_jobs[ "user.getFriends" ]->readAll() );
-
                 foreach( const lastfm::XmlQuery &e, lfm[ "friends" ].children( "user" ) )
                 {
                     const QString name = e[ "name" ].text();
@@ -261,9 +260,10 @@
                     addTrack( trackPtr );
                 }
 
-            } catch( lastfm::ws::ParseError& e )
+            }
+            else
             {
-                debug() << "Got exception in parsing from last.fm:" << e.what();
+                debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
             }
             break;
         }
@@ -293,10 +293,9 @@
     {
         case QNetworkReply::NoError:
         {
-            try
+            lastfm::XmlQuery lfm;
+            if( lfm.parse( m_jobs[ "user.getFriends" ]->readAll() ) )
             {
-                lastfm::XmlQuery lfm( m_jobs[ "user.getFriends" ]->readAll() );
-
                 foreach( const lastfm::XmlQuery &e, lfm[ "friends" ].children( "user" ) )
                 {
                     const QString name = e[ "name" ].text();
@@ -306,9 +305,10 @@
                     addTrack( trackPtr );
                 }
 
-            } catch( lastfm::ws::ParseError& e )
+            }
+            else
             {
-                debug() << "Got exception in parsing from last.fm:" << e.what();
+                debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
             }
             break;
         }
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/LastFmServiceSettings.cpp amarok-2.5.96/src/services/lastfm/LastFmServiceSettings.cpp
--- amarok-2.5.96.orig/src/services/lastfm/LastFmServiceSettings.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/LastFmServiceSettings.cpp	2012-08-02 16:32:35.957659703 +0200
@@ -23,9 +23,9 @@
 #include "NetworkAccessManagerProxy.h"
 #include "ui_LastFmConfigWidget.h"
 
-#include <lastfm/Audioscrobbler> // from liblastfm
+#include <lastfm/Audioscrobbler.h> // from liblastfm
 #include <lastfm/ws.h>
-#include <lastfm/XmlQuery>
+#include <lastfm/XmlQuery.h>
 
 #include <QCryptographicHash>
 #include <QNetworkAccessManager>
@@ -100,7 +100,7 @@
     m_configDialog->testLogin->setText( i18n( "Testing..." ) );
     // set the global static Lastfm::Ws stuff
     lastfm::ws::ApiKey = Amarok::lastfmApiKey();
-    lastfm::ws::SharedSecret = "fe0dcde9fcd14c2d1d50665b646335e9";
+    lastfm::ws::SharedSecret = Amarok::lastfmApiSharedSecret();
     lastfm::ws::Username = qstrdup( m_configDialog->kcfg_ScrobblerUsername->text().toLatin1().data() );
     if( lastfm::nam() != The::networkAccessManager() )
         lastfm::setNetworkAccessManager( The::networkAccessManager() );
@@ -126,7 +126,8 @@
 {
     DEBUG_BLOCK
 
-    lastfm::XmlQuery lfm = lastfm::XmlQuery( m_authQuery->readAll() );
+    lastfm::XmlQuery lfm;
+    lfm.parse( m_authQuery->readAll() );
 
     switch( m_authQuery->error() )
     {
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/LastFmTreeModel.cpp amarok-2.5.96/src/services/lastfm/LastFmTreeModel.cpp
--- amarok-2.5.96.orig/src/services/lastfm/LastFmTreeModel.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/LastFmTreeModel.cpp	2012-08-02 16:32:35.958659691 +0200
@@ -26,8 +26,8 @@
 #include "AmarokMimeData.h"
 
 #include <lastfm/ws.h>
-#include <lastfm/Tag>
-#include <lastfm/XmlQuery>
+#include <lastfm/Tag.h>
+#include <lastfm/XmlQuery.h>
 
 #include <KIcon>
 #include <KLocale>
@@ -68,11 +68,12 @@
 {
     DEBUG_BLOCK
 
-    try
-    {
         // Iterate over each neighbor, in two passes: 1) Get data 2) Sort data, store in model
 
-        lastfm::XmlQuery lfm( m_jobs[ "getNeighbours" ]->readAll() );
+    lastfm::XmlQuery lfm;
+    lfm.parse( m_jobs[ "getNeighbours" ]->readAll() );
+    if( lfm.parseError().enumValue() == lastfm::ws::NoError )
+    {
         foreach( const lastfm::XmlQuery &e, lfm[ "neighbours" ].children ( "user" ) )
         {
             const QString name = e[ "name" ].text();
@@ -88,11 +89,11 @@
             appendUserStations( neighbor, name );
         }
         m_neighbors.sort();
+    } else {
+        debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
+        return;
     }
-    catch( lastfm::ws::ParseError e )
-    {
-        debug() << "Got exception in parsing from last.fm:" << e.what();
-    }
+
     emitRowChanged(LastFm::Neighbors);
     m_jobs[ "getNeighbours" ]->deleteLater();
 }
@@ -102,11 +103,11 @@
 {
     DEBUG_BLOCK
 
-    try
-    {
-        // Iterate over each friend, in two passes: 1) Get data 2) Sort data, store in model
+    // Iterate over each friend, in two passes: 1) Get data 2) Sort data, store in model
 
-        lastfm::XmlQuery lfm( m_jobs[ "getFriends" ]->readAll() );
+    lastfm::XmlQuery lfm;
+    if( lfm.parse( m_jobs[ "getFriends" ]->readAll() ) )
+    {
         foreach( const lastfm::XmlQuery &e, lfm[ "friends" ].children ( "user" ) )
         {
             const QString name = e[ "name" ].text();
@@ -123,11 +124,11 @@
             appendUserStations( afriend, name );
         }
         m_friends.sort();
+    } else {
+        debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
+        return;
     }
-    catch( lastfm::ws::ParseError e )
-    {
-        debug() << "Got exception in parsing from last.fm:" << e.what();
-    }
+
     emitRowChanged(LastFm::Friends);
     m_jobs[ "getFriends" ]->deleteLater();
 }
@@ -137,10 +138,9 @@
 {
     DEBUG_BLOCK
     WeightedStringList list;
-    try
+    lastfm::XmlQuery lfm;
+    if( lfm.parse( m_jobs[ "getTopArtists" ]->readAll() ) )
     {
-        lastfm::XmlQuery lfm( m_jobs[ "getTopArtists" ]->readAll() );
-
         foreach( const lastfm::XmlQuery &e, lfm[ "topartists" ].children ( "artist" ) )
         {
             const QString name = e[ "name" ].text();
@@ -158,9 +158,10 @@
             m_myTopArtists->appendChild ( artist );
         }
 
-    } catch( lastfm::ws::ParseError e )
+    }
+    else
     {
-        debug() << "Got exception in parsing from last.fm:" << e.what();
+        debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
     }
     emitRowChanged(LastFm::TopArtists);
     m_jobs[ "getTopArtists" ]->deleteLater();
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/LastFmTreeModel.h amarok-2.5.96/src/services/lastfm/LastFmTreeModel.h
--- amarok-2.5.96.orig/src/services/lastfm/LastFmTreeModel.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/LastFmTreeModel.h	2012-08-02 16:32:35.957659703 +0200
@@ -22,7 +22,7 @@
 #include "core/meta/Meta.h"
 #include "WeightedStringList.h"
 
-#include <lastfm/User>
+#include <lastfm/User.h>
 
 #include <QAbstractItemModel>
 #include <QHash>
@@ -136,7 +136,7 @@
     LastFmTreeItem *m_myTopArtists;
 
     QString m_userName;
-    lastfm::AuthenticatedUser m_user;
+    lastfm::User m_user;
 
     QStringList m_friends;
     QStringList m_neighbors;
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/ScrobblerAdapter.h amarok-2.5.96/src/services/lastfm/ScrobblerAdapter.h
--- amarok-2.5.96.orig/src/services/lastfm/ScrobblerAdapter.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/ScrobblerAdapter.h	2012-08-02 16:32:35.958659691 +0200
@@ -20,8 +20,8 @@
 
 #include "core/meta/Meta.h"
 
-#include <lastfm/Audioscrobbler>
-#include <lastfm/Track>
+#include <lastfm/Audioscrobbler.h>
+#include <lastfm/Track.h>
 
 #include <QVariant>
 
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/biases/LastFmBias.cpp amarok-2.5.96/src/services/lastfm/biases/LastFmBias.cpp
--- amarok-2.5.96.orig/src/services/lastfm/biases/LastFmBias.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/biases/LastFmBias.cpp	2012-08-02 16:32:35.958659691 +0200
@@ -34,9 +34,8 @@
 #include "core/collections/QueryMaker.h"
 #include "core-impl/collections/support/CollectionManager.h"
 
-#include "lastfm/Artist"
-#include "lastfm/ws.h"
-#include "lastfm/XmlQuery"
+#include <lastfm/Artist.h>
+#include <lastfm/ws.h>
 
 #include <QLabel>
 #include <QComboBox>
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/biases/WeeklyTopBias.cpp amarok-2.5.96/src/services/lastfm/biases/WeeklyTopBias.cpp
--- amarok-2.5.96.orig/src/services/lastfm/biases/WeeklyTopBias.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/biases/WeeklyTopBias.cpp	2012-08-02 16:32:35.960659667 +0200
@@ -34,9 +34,9 @@
 #include "core/collections/QueryMaker.h"
 #include "core-impl/collections/support/CollectionManager.h"
 
-#include "lastfm/Artist"
-#include "lastfm/ws.h"
-#include "lastfm/XmlQuery"
+#include <lastfm/Artist.h>
+#include <lastfm/ws.h>
+#include <lastfm/XmlQuery.h>
 
 #include <QNetworkReply>
 
@@ -371,10 +371,9 @@
     }
 
 
-    try
+    lastfm::XmlQuery lfm;
+    if( lfm.parse( reply->readAll() ) )
     {
-        lastfm::XmlQuery lfm( reply->readAll() );
-
         // debug() << "got response:" << lfm;
         QStringList artists;
         for( int i = 0; i < lfm[ "weeklyartistchart" ].children( "artist" ).size(); i++ )
@@ -398,10 +397,10 @@
             warning() << "Got a reply for a week"<<week<<"that was not requested.";
             return;
         }
-
-    } catch( lastfm::ws::ParseError& e )
+    }
+    else
     {
-        debug() << "caught exception parsing weekly artist chart.";
+        debug() << "failed to parse weekly artist chart.";
     }
 
     reply->deleteLater();
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta.cpp amarok-2.5.96/src/services/lastfm/meta/LastFmMeta.cpp
--- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta.cpp	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/meta/LastFmMeta.cpp	2012-08-02 16:32:35.961659655 +0200
@@ -41,7 +41,7 @@
 #include <QWeakPointer>
 #include <QUrl>
 
-#include <lastfm/Track>
+#include <lastfm/Track.h>
 
 namespace LastFm {
 
@@ -451,8 +451,7 @@
     DEBUG_BLOCK
 
     debug() << "info:" << d->lastFmTrack.artist() << d->lastFmTrack.title();
-    d->wsReply = lastfm::MutableTrack( d->lastFmTrack ).love();
-    connect( d->wsReply, SIGNAL( finished() ), this, SLOT( slotWsReply() ) );
+    lastfm::MutableTrack( d->lastFmTrack ).love();
 }
 
 void
@@ -477,9 +476,9 @@
 {
     if( d->trackFetch->error() == QNetworkReply::NoError )
     {
-        try
+        lastfm::XmlQuery lfm;
+        if( lfm.parse( d->trackFetch->readAll() ) )
         {
-            lastfm::XmlQuery lfm( d->trackFetch->readAll() );
             QString id = lfm[ "track" ][ "id" ].text();
             QString streamable = lfm[ "track" ][ "streamable" ].text();
             if( streamable.toInt() == 1 )
@@ -487,9 +486,10 @@
             else
                 init();
 
-        } catch( lastfm::ws::ParseError& e )
+        }
+        else
         {
-            debug() << "Got exception in parsing from last.fm:" << e.what();
+            debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
         }
     } else
     {
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta.h amarok-2.5.96/src/services/lastfm/meta/LastFmMeta.h
--- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/meta/LastFmMeta.h	2012-08-02 16:32:35.960659667 +0200
@@ -24,7 +24,7 @@
 #include "ServiceMetaBase.h" // for the SourceInfoProvider
 
 
-#include <lastfm/Track>
+#include <lastfm/Track.h>
 
 
 #include <QObject>
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta_p.h amarok-2.5.96/src/services/lastfm/meta/LastFmMeta_p.h
--- amarok-2.5.96.orig/src/services/lastfm/meta/LastFmMeta_p.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/meta/LastFmMeta_p.h	2012-08-02 16:32:35.961659655 +0200
@@ -26,10 +26,10 @@
 #include "core/statistics/StatisticsProvider.h"
 #include "core-impl/statistics/providers/tag/TagStatisticsProvider.h"
 
-#include <lastfm/Track>
+#include <lastfm/Track.h>
 #include <lastfm/ws.h>
-#include <lastfm/RadioTuner>
-#include <lastfm/XmlQuery>
+#include <lastfm/RadioTuner.h>
+#include <lastfm/XmlQuery.h>
 
 #include <kio/job.h>
 #include <kio/jobclasses.h>
@@ -144,26 +144,24 @@
                 return;
             if( m_userFetch->error() == QNetworkReply::NoError )
             {
-                try
+                lastfm::XmlQuery lfm;
+                if( !lfm.parse( m_userFetch->readAll() ) )
                 {
-                    lastfm::XmlQuery lfm( m_userFetch->readAll() );
-                    albumUrl = lfm[ "track" ][ "album" ][ "url" ].text();
-                    trackUrl = lfm[ "track" ][ "url" ].text();
-                    artistUrl = lfm[ "track" ][ "artist" ][ "url" ].text();
-
-                    notifyObservers();
+                    debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message();
+                    return;
+                }
+                albumUrl = lfm[ "track" ][ "album" ][ "url" ].text();
+                trackUrl = lfm[ "track" ][ "url" ].text();
+                artistUrl = lfm[ "track" ][ "artist" ][ "url" ].text();
 
-                    imageUrl = lfm[ "track" ][ "album" ][ "image size=large" ].text();
+                notifyObservers();
 
-                    if( !imageUrl.isEmpty() )
-                    {
-                        KIO::Job* job = KIO::storedGet( KUrl( imageUrl ), KIO::Reload, KIO::HideProgressInfo );
-                        connect( job, SIGNAL( result( KJob* ) ), this, SLOT( fetchImageFinished( KJob* ) ) );
-                    }
+                imageUrl = lfm[ "track" ][ "album" ][ "image size=large" ].text();
 
-                } catch( lastfm::ws::ParseError& e )
+                if( !imageUrl.isEmpty() )
                 {
-                    debug() << "Got exception in parsing from last.fm:" << e.what();
+                    KIO::Job* job = KIO::storedGet( KUrl( imageUrl ), KIO::Reload, KIO::HideProgressInfo );
+                    connect( job, SIGNAL( result( KJob* ) ), this, SLOT( fetchImageFinished( KJob* ) ) );
                 }
             }
 
diff -U 3 -H -d -r -N -- amarok-2.5.96.orig/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h amarok-2.5.96/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h
--- amarok-2.5.96.orig/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h	2012-07-31 12:10:56.000000000 +0200
+++ amarok-2.5.96/src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h	2012-08-02 16:32:35.962659642 +0200
@@ -25,8 +25,9 @@
 #include "core/meta/Meta.h"
 #include "core/capabilities/MultiPlayableCapability.h"
 
-#include <lastfm/Track>
-#include <lastfm/RadioTuner>
+#include <lastfm/Track.h>
+#include <lastfm/RadioStation.h>
+#include <lastfm/RadioTuner.h>
 #include <lastfm/ws.h>
 
 #include <KLocale>
@@ -55,24 +56,23 @@
         {
             DEBUG_BLOCK
             m_tuner = new lastfm::RadioTuner( lastfm::RadioStation( m_track->uidUrl() ) );
-            
+
             connect( m_tuner, SIGNAL( trackAvailable() ), this, SLOT( slotNewTrackAvailable() ) );
-            connect( m_tuner, SIGNAL( error( lastfm::ws::Error ) ), this, SLOT( error( lastfm::ws::Error ) ) );
+            connect( m_tuner, SIGNAL( error(lastfm::ws::Error,QString) ), this, SLOT( error( lastfm::ws::Error ) ) );
         }
-        
+
         virtual void fetchNext()
         {
             DEBUG_BLOCK
             m_currentTrack = m_tuner->takeNextTrack();
             m_track->setTrackInfo( m_currentTrack );
-
         }
-        
+
         using Observer::metadataChanged;
         virtual void metadataChanged( Meta::TrackPtr track )
         {
             const LastFm::TrackPtr ltrack = LastFm::TrackPtr::dynamicCast( track );
-            
+
             if( ltrack.isNull() )
                 return;
 
@@ -94,7 +94,7 @@
                 m_track->setTrackInfo( m_currentTrack );
             }
         }
-        
+
         virtual void skip()
         {
             fetchNext();