[banshee] CoverArtSpec: remove some more comparisons against Unknown strings
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] CoverArtSpec: remove some more comparisons against Unknown strings
- Date: Wed, 9 Oct 2013 22:29:37 +0000 (UTC)
commit 45c1662e08b8640decdbcf9a12f8c8b789ba07f1
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Thu Oct 10 00:29:26 2013 +0200
CoverArtSpec: remove some more comparisons against Unknown strings
The removal of these deprecated comparisons that was recently committed[1]
missed the CoverArtSpec class, which is done now.
[1] https://git.gnome.org/browse/banshee/commit/?id=896af90924d6803ef5197b6da1ed4f2f174c143d
src/Core/Banshee.Core/Banshee.Base/CoverArtSpec.cs | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/Core/Banshee.Core/Banshee.Base/CoverArtSpec.cs
b/src/Core/Banshee.Core/Banshee.Base/CoverArtSpec.cs
index 16cf854..0d81033 100644
--- a/src/Core/Banshee.Core/Banshee.Base/CoverArtSpec.cs
+++ b/src/Core/Banshee.Core/Banshee.Base/CoverArtSpec.cs
@@ -83,12 +83,12 @@ namespace Banshee.Base
public static string CreateArtistAlbumId (string artist, string album)
{
- if (IsAlbumUnknown (album)) {
+ if (String.IsNullOrEmpty (album)) {
// do not attempt to group unknown album tracks together
return null;
}
- if (IsArtistUnknown (artist)) {
+ if (String.IsNullOrEmpty (artist)) {
return null;
}
@@ -110,16 +110,6 @@ namespace Banshee.Base
Hyena.Log.DebugFormat ("Album artwork path set to {0}", root_path);
}
- static bool IsAlbumUnknown (string album)
- {
- return album == null || album == AlbumInfo.UnknownAlbumTitleUntranslated || album ==
AlbumInfo.UnknownAlbumTitle;
- }
-
- static bool IsArtistUnknown (string artist)
- {
- return artist == null || artist == ArtistInfo.UnknownArtistNameUntranslated || artist ==
ArtistInfo.UnknownArtistName;
- }
-
private static string root_path = Path.Combine (XdgBaseDirectorySpec.GetUserDirectory (
"XDG_CACHE_HOME", ".cache"), "media-art");
@@ -138,7 +128,7 @@ namespace Banshee.Base
public static string CreateLegacyArtistAlbumId (string artist, string album)
{
- if (IsArtistUnknown (artist) || IsAlbumUnknown (album)) {
+ if (String.IsNullOrEmpty (artist) || String.IsNullOrEmpty (album)) {
return null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]