[banshee] [Fixup] Update tracks' updated stamp when fixing
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Fixup] Update tracks' updated stamp when fixing
- Date: Fri, 16 Jul 2010 17:45:51 +0000 (UTC)
commit 6fb96569e2f1dc8589f6cb4c98fe56bc920acef4
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Jul 16 10:44:06 2010 -0700
[Fixup] Update tracks' updated stamp when fixing
So if user has write-metadata or organize-filesystem prefs set, they'll
get triggered.
data/addin-xml-strings.cs | 4 ++--
.../Banshee.Fixup/AlbumDuplicateSolver.cs | 4 ++--
.../Banshee.Fixup/ArtistDuplicateSolver.cs | 8 ++++++--
3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/data/addin-xml-strings.cs b/data/addin-xml-strings.cs
index 22a9cc2..a45414a 100644
--- a/data/addin-xml-strings.cs
+++ b/data/addin-xml-strings.cs
@@ -113,8 +113,8 @@ internal static class AddinXmlStringCatalog
// ../src/Extensions/Banshee.Fixup/Banshee.Fixup.addin.xml
Catalog.GetString (@"Metadata Fixup");
- Catalog.GetString (@"Fix up metadata using bulk operations");
- Catalog.GetString (@"User Interface");
+ Catalog.GetString (@"Fix broken and missing metadata using bulk operations");
+ Catalog.GetString (@"Utilities");
// ../src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive.addin.xml
Catalog.GetString (@"Internet Archive");
diff --git a/src/Extensions/Banshee.Fixup/Banshee.Fixup/AlbumDuplicateSolver.cs b/src/Extensions/Banshee.Fixup/Banshee.Fixup/AlbumDuplicateSolver.cs
index 32bec74..92d25c1 100644
--- a/src/Extensions/Banshee.Fixup/Banshee.Fixup/AlbumDuplicateSolver.cs
+++ b/src/Extensions/Banshee.Fixup/Banshee.Fixup/AlbumDuplicateSolver.cs
@@ -96,8 +96,8 @@ namespace Banshee.Fixup
var losers = problem.ObjectIds.Where (id => id != winner_id).ToArray ();
ServiceManager.DbConnection.Execute (
- "UPDATE CoreTracks SET AlbumID = ? WHERE AlbumID IN (?)",
- winner_id, losers
+ "UPDATE CoreTracks SET AlbumID = ?, DateUpdatedStamp = ? WHERE AlbumID IN (?)",
+ winner_id, DateTime.Now, losers
);
}
}
diff --git a/src/Extensions/Banshee.Fixup/Banshee.Fixup/ArtistDuplicateSolver.cs b/src/Extensions/Banshee.Fixup/Banshee.Fixup/ArtistDuplicateSolver.cs
index 12a73d9..ca5925e 100644
--- a/src/Extensions/Banshee.Fixup/Banshee.Fixup/ArtistDuplicateSolver.cs
+++ b/src/Extensions/Banshee.Fixup/Banshee.Fixup/ArtistDuplicateSolver.cs
@@ -100,8 +100,12 @@ namespace Banshee.Fixup
ServiceManager.DbConnection.Execute (
@"UPDATE CoreAlbums SET ArtistID = ? WHERE ArtistID IN (?);
- UPDATE CoreTracks SET ArtistID = ? WHERE ArtistID IN (?)",
- winner_id, losers, winner_id, losers
+ UPDATE CoreTracks SET ArtistID = ? WHERE ArtistID IN (?);
+ UPDATE CoreTracks SET DateUpdatedStamp = ? WHERE
+ ArtistID = ? OR AlbumID IN (SELECT AlbumID FROM CoreAlbums WHERE ArtistID = ?)",
+ winner_id, losers,
+ winner_id, losers,
+ DateTime.Now, winner_id, winner_id
);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]