banshee r4322 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Metadata.FileSystem
- From: blorentz svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4322 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Metadata.FileSystem
- Date: Mon, 4 Aug 2008 20:40:27 +0000 (UTC)
Author: blorentz
Date: Mon Aug 4 20:40:27 2008
New Revision: 4322
URL: http://svn.gnome.org/viewvc/banshee?rev=4322&view=rev
Log:
2008-08-04 Bertrand Lorentz <bertrand lorentz gmail com>
* src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs:
Patch from BenjamÃn Valero Espinosa that adds preferential filenames when
looking for cover art file (BGO #545911).
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Metadata.FileSystem/FileSystemQueryJob.cs Mon Aug 4 20:40:27 2008
@@ -58,6 +58,7 @@
}
private static string [] extensions = new string [] { ".jpg", ".jpeg" };
+ private static string [] filenames = new string [] { "cover", "folder", "front" };
protected void Fetch ()
{
@@ -80,6 +81,12 @@
string extension = System.IO.Path.GetExtension (file).ToLower ();
if (Array.IndexOf (extensions, extension) != -1) {
+ string filename = System.IO.Path.GetFileNameWithoutExtension (file).ToLower ();
+ if (Array.IndexOf (filenames, filename) != -1) {
+ best_file = file;
+ break;
+ }
+
long size = Banshee.IO.File.GetSize (new SafeUri (file));
if (size > max_size) {
max_size = size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]