[banshee/stable-1.8] [AppleDevice] Sync the Sort* fields (bgo#587936)



commit f231109d0e3ca811b1f0a3e2ce9922c07da75507
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Sun Nov 7 13:55:41 2010 -0600

    [AppleDevice] Sync the Sort* fields (bgo#587936)

 .../AppleDeviceTrackInfo.cs                        |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
index 15cc0e0..3963613 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
@@ -99,6 +99,11 @@ namespace Banshee.Dap.AppleDevice
             Year = track.Year;
             MediaAttributes = track.MediaAttributes;
 
+            ArtistNameSort = track.ArtistNameSort;
+            AlbumTitleSort = track.AlbumTitleSort;
+            AlbumArtistSort = track.AlbumArtistSort;
+            TrackTitleSort = track.TrackTitleSort;
+
             var podcast_info = track.ExternalObject as IPodcastInfo;
             if (podcast_info != null) {
                 description = podcast_info.Description;
@@ -144,6 +149,10 @@ namespace Banshee.Dap.AppleDevice
             Year = track.Year;
             description = track.Description;
             ReleaseDate = track.TimeReleased;
+            ArtistNameSort = track.SortArtist;
+            AlbumTitleSort = track.SortAlbum;
+            AlbumArtistSort = track.SortAlbumArtist;
+            TrackTitleSort = track.SortTitle;
 
             rating = track.Rating > 5 ? 0 : (int) track.Rating;
 
@@ -221,6 +230,11 @@ namespace Banshee.Dap.AppleDevice
             track.Title = TrackTitle;
             track.Genre = Genre;
 
+            track.SortArtist = ArtistNameSort;
+            track.SortAlbum = AlbumTitleSort;
+            track.SortAlbumArtist = AlbumArtistSort;
+            track.SortTitle = TrackTitleSort;
+
             track.Rating = ((Rating >= 1) && (Rating <= 5)) ? (uint)Rating : 0;
 
             if (HasAttribute (TrackMediaAttributes.Podcast)) {



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