vagalume (0.8.3-2) 01-fall-back-old-api.diff

Summary

 src/lastfm-ws.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Index: vagalume/src/lastfm-ws.c
===================================================================
--- vagalume.orig/src/lastfm-ws.c	2010-05-04 13:41:38.000000000 +0100
+++ vagalume/src/lastfm-ws.c	2010-05-04 13:42:03.000000000 +0100
@@ -445,7 +445,7 @@ lastfm_ws_radio_tune                    
         } else {
                 /* Fall back to the old streaming API if the new one
                  * doesn't work */
-                if (session->v1sess) {
+                if (session->v1sess && !session->subscriber) {
                         session->srv->old_str_api = TRUE;
                         return lastfm_ws_radio_tune (session, radio_url, lang);
                 }
@@ -494,6 +494,14 @@ lastfm_ws_radio_get_playlist            
                                              session->srv->free_streams);
                 g_mutex_unlock (session->mutex);
                 xmlFreeDoc (doc);
+        } else {
+                /* Fall back to the old streaming API if the new one
+                 * doesn't work */
+                if (session->v1sess && !session->subscriber) {
+                        session->srv->old_str_api = TRUE;
+                        return lastfm_ws_radio_get_playlist (
+                                session, discovery, scrobbling);
+                }
         }
 
         return pls;