[banshee] Metadata: remove obsolete comparison against Unknown strings



commit 896af90924d6803ef5197b6da1ed4f2f174c143d
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Thu Sep 5 13:52:23 2013 +0200

    Metadata: remove obsolete comparison against Unknown strings
    
    Once upon a time, TrackInfo objects used to gather Unknown-like strings
    ("Unknown Album", "Unknown Artist", ...) when the tracks had these fields
    blank, so then other Banshee services had to adapt to this strategy in
    order to avoid dealing with these blank fields, so then this string
    comparisons were hardcoded in them.
    
    However, since 2009, this situation changed [1], so these Unknown strings
    were only present in the Display* properties (DisplayAlbumTitle,
    DisplayArtistName), therefore there is no need anymore for MetadataService
    and CoverArtJob classes to do these string comparisons, and they will
    just call String.IsNullOrEmpty().
    
    [1] https://git.gnome.org/browse/banshee/commit/?id=7b201dd668ff833f8ebc61a75d4d1a020e5a724a

 .../Banshee.Metadata/MetadataService.cs            |    3 +--
 .../Banshee.CoverArt/CoverArtJob.cs                |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Metadata/MetadataService.cs 
b/src/Core/Banshee.Services/Banshee.Metadata/MetadataService.cs
index 23e4721..76c0d64 100644
--- a/src/Core/Banshee.Services/Banshee.Metadata/MetadataService.cs
+++ b/src/Core/Banshee.Services/Banshee.Metadata/MetadataService.cs
@@ -84,8 +84,7 @@ namespace Banshee.Metadata
                 return;
             }
 
-            if (String.IsNullOrEmpty (track.AlbumTitle) || track.AlbumTitle == AlbumInfo.UnknownAlbumTitle ||
-                String.IsNullOrEmpty (track.ArtistName) || track.ArtistName == ArtistInfo.UnknownArtistName) 
{
+            if (String.IsNullOrEmpty (track.AlbumTitle) || String.IsNullOrEmpty (track.ArtistName)) {
                 // Do not try to fetch album art for these
                 return;
             }
diff --git a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs 
b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs
index a579ea6..63d2367 100644
--- a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs
+++ b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtJob.cs
@@ -134,8 +134,7 @@ namespace Banshee.CoverArt
         {
             bool save = true;
             try {
-                if (String.IsNullOrEmpty (track.AlbumTitle) || track.AlbumTitle == Catalog.GetString 
("Unknown Album") ||
-                    String.IsNullOrEmpty (track.ArtistName) || track.ArtistName == Catalog.GetString 
("Unknown Artist")) {
+                if (String.IsNullOrEmpty (track.AlbumTitle) || String.IsNullOrEmpty (track.ArtistName)) {
                     // Do not try to fetch album art for these
                 } else {
                     IMetadataLookupJob job = MetadataService.Instance.CreateJob (track);


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