[banshee] LastfmStreaming: Delete the Loved stations from the database



commit aa86f5c86ae7d1de5740efea8bfcb7844340222d
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Wed Jan 12 20:59:23 2011 +0100

    LastfmStreaming: Delete the Loved stations from the database
    
    The Loved station was discontinued by Last.fm, so it was removed from
    the code in a previous commit. Having a station of that type still
    present in the database causes an exception to be logged on startup.
    
    Remove any existing stations of that type from the LastfmStations table,
    as those stations would be unusable and not visible anyway. Fixes
    bgo#639032.

 .../Banshee.LastfmStreaming/StationSource.cs       |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming/StationSource.cs b/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming/StationSource.cs
index 05c867c..3d1dcf6 100644
--- a/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming/StationSource.cs
+++ b/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming/StationSource.cs
@@ -612,6 +612,9 @@ namespace Banshee.LastfmStreaming.Radio
                     ServiceManager.DbConnection.Execute ("ALTER TABLE LastfmStations ADD PlayCount INTEGER");
                     ServiceManager.DbConnection.Execute ("UPDATE LastfmStations SET PlayCount = 0");
                 }
+
+                // Last.fm has discontinued the Loved station : http://www.last.fm/stationchanges2010
+                ServiceManager.DbConnection.Execute ("DELETE FROM LastfmStations WHERE Type = 'Loved'");
             }
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]