banshee r5058 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base src/Core/Banshee.Core/Banshee.Configuration.Schema



Author: blorentz
Date: Sun Feb 22 23:32:01 2009
New Revision: 5058
URL: http://svn.gnome.org/viewvc/banshee?rev=5058&view=rev

Log:
2009-02-23  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs:
	* src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs: Add support
	for %album_artist_initial% as a variable for file/folder name patterns.
	Initial patch from aquavitae69, improved by Alexander Kojevnikov and me
	(BGO #562786).



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs
   trunk/banshee/src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs

Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs	Sun Feb 22 23:32:01 2009
@@ -97,7 +97,11 @@
                     return Escape (t == null ? (string)r : t.DisplayAlbumArtistName);
             });
 
-                        
+            AddConversion ("album_artist_initial", Catalog.GetString("Album Artist Initial"),
+                delegate (ITrackInfo t, object r) {
+                    return Escape (t == null ? (string)r : t.DisplayAlbumArtistName.Substring(0, 1));
+            });
+
             AddConversion ("genre", Catalog.GetString ("Genre"),  
                 delegate (ITrackInfo t, object r) {
                     return Escape (t == null ? (string)r : t.DisplayGenre);

Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs	Sun Feb 22 23:32:01 2009
@@ -47,7 +47,7 @@
             "Format for creating a track folder inside the library. Do not create an absolute path. " +
                 "Location here is relative to the Banshee music directory. See LibraryLocation. Legal tokens: " +
                 "%album_artist%, %track_artist%, %album%, %genre%, %title%, %track_number%, %track_count%, " +
-                "%track_number_nz% (No prefixed zero), %track_count_nz% (No prefixed zero), " +
+                "%track_number_nz% (No prefixed zero), %track_count_nz% (No prefixed zero), %album_artist_initial%," +
                 "%path_sep% (portable directory separator (/)), %artist% (deprecated, use %album_artist%)."
         );
 
@@ -58,7 +58,7 @@
             "Format for creating a track filename inside the library. Do not use path tokens/characters here. " +
                 "See LibraryFolderPattern. Legal tokens: %album_artist%, %track_artist%, %album%, %genre%, %title%, %track_number%, " +
                 "%track_count%, %track_number_nz% (No prefixed zero), %track_count_nz% (No prefixed zero), " +
-                "%artist% (deprecated, use %album_artist%)."
+                "%album_artist_initial%, %artist% (deprecated, use %album_artist%)."
         );
 
         public static readonly SchemaEntry<int> SortColumn = new SchemaEntry<int>(



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