[banshee] ArtworkManager: Clear art fetch info if cache dir missing



commit a2a69d85e4882d23ebe20173d2446f3af57c6432
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Apr 1 18:50:18 2011 -0500

    ArtworkManager: Clear art fetch info if cache dir missing
    
    So if you have your music and db saved but lose your ~/.cache/media-art/
    dirctory, Banshee will start re-fetching your album art.

 .../Banshee.Collection.Gui/ArtworkManager.cs       |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
index cba8ec8..aff1d7e 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
@@ -423,6 +423,13 @@ namespace Banshee.Collection.Gui
                     }
                 }
 
+                if (count == 0) {
+                    try {
+                        ServiceManager.DbConnection.Execute ("DELETE FROM CoverArtDownloads");
+                        Log.InformationFormat ("Reset CoverArtDownloads table so missing artwork will get fetched");
+                    } catch {}
+                }
+
                 Directory.Delete (legacy_root_path, true);
                 Log.InformationFormat ("Migrated {0} files in {1}s", count, DateTime.Now.Subtract(started).TotalSeconds);
             }



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