[banshee/1.5.1-fixes: 22/56] Tweak folder.jpg heuristic for multi-disc albums



commit 460856390cc1fc8144c2beb4e922f30443204ae6
Author: Benjamín Valero Espinosa <benjavalero gmail com>
Date:   Thu Nov 5 20:46:27 2009 -0800

    Tweak folder.jpg heuristic for multi-disc albums
    
    Fixes BGO #591982
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../FileSystemQueryJob.cs                          |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs b/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs
index 0cc5fcf..5287ae3 100644
--- a/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs
+++ b/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs
@@ -74,7 +74,11 @@ namespace Banshee.Metadata.FileSystem
             string best_file = null;
             int items_in_directory = 0;
             bool found_definite_best = false;
-            int max_acceptable_items = Math.Max (30, track.TrackCount + 8);
+            int track_count = track.TrackCount;
+            if (track.DiscCount > 0) {
+                track_count = track.TrackCount * track.DiscCount;
+            }
+            int max_acceptable_items = Math.Max (30, track_count + 8);
             foreach (string file in Banshee.IO.Directory.GetFiles (directory)) {
                 // Ignore directories with tons of songs in them; this lookup is only intended for when the
                 // music file is in a directory specific to its album.



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