banshee r5013 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Core/Banshee.Configuration.Schema
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r5013 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base src/Core/Banshee.Core/Banshee.Collection src/Core/Banshee.Core/Banshee.Configuration.Schema
- Date: Wed, 4 Feb 2009 23:39:42 +0000 (UTC)
Author: gburt
Date: Wed Feb 4 23:39:42 2009
New Revision: 5013
URL: http://svn.gnome.org/viewvc/banshee?rev=5013&view=rev
Log:
2009-02-04 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs:
* src/Core/Banshee.Core/Banshee.Collection/ITrackInfo.cs:
* src/Core/Banshee.Core/Banshee.Configuration.Schema/LibrarySchema.cs:
* src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs: Patch from John
Millikin adding support for %album_artist% as a variable for file/folder
name patterns. This also changes the existing pattern code to treat
%artist% as album_artist, so that compilation albums will be stored in a
single directory now (BGO #570298)
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs
trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/ITrackInfo.cs
trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.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 Wed Feb 4 23:39:42 2009
@@ -84,10 +84,22 @@
{
conversion_table = new SortedList<string, Conversion> ();
- AddConversion ("artist", Catalog.GetString ("Artist"),
+ AddConversion ("track_artist", Catalog.GetString ("Track Artist"),
delegate (ITrackInfo t, object r) {
return Escape (t == null ? (string)r : t.DisplayArtistName);
});
+
+ AddConversion ("album_artist", Catalog.GetString ("Album Artist"),
+ delegate (ITrackInfo t, object r) {
+ return Escape (t == null ? (string)r : t.DisplayAlbumArtistName);
+ });
+
+ // Alias for %album_artist%
+ AddConversion ("artist", Catalog.GetString ("Album Artist"),
+ delegate (ITrackInfo t, object r) {
+ return Escape (t == null ? (string)r : t.DisplayAlbumArtistName);
+ });
+
AddConversion ("genre", Catalog.GetString ("Genre"),
delegate (ITrackInfo t, object r) {
@@ -140,7 +152,7 @@
}
public static string DefaultFolder {
- get { return "%artist%%path_sep%%album%"; }
+ get { return "%album_artist%%path_sep%%album%"; }
}
public static string DefaultFile {
@@ -153,11 +165,11 @@
private static string [] suggested_folders = new string [] {
DefaultFolder,
- "%artist%%path_sep%%artist% - %album%",
- "%artist%%path_sep%%album% (%year%)",
- "%artist% - %album%",
+ "%album_artist%%path_sep%%album_artist% - %album%",
+ "%album_artist%%path_sep%%album% (%year%)",
+ "%album_artist% - %album%",
"%album%",
- "%artist%"
+ "%album_artist%"
};
public static string [] SuggestedFolders {
@@ -166,10 +178,10 @@
private static string [] suggested_files = new string [] {
DefaultFile,
- "%track_number%. %artist% - %title%",
- "%artist% - %title%",
- "%artist% - %track_number% - %title%",
- "%artist% (%album%) - %track_number% - %title%",
+ "%track_number%. %track_artist% - %title%",
+ "%track_artist% - %title%",
+ "%track_artist% - %track_number% - %title%",
+ "%track_artist% (%album%) - %track_number% - %title%",
"%title%"
};
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/ITrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/ITrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/ITrackInfo.cs Wed Feb 4 23:39:42 2009
@@ -34,6 +34,7 @@
public interface ITrackInfo : IBasicTrackInfo
{
string DisplayArtistName { get; }
+ string DisplayAlbumArtistName { get; }
string DisplayAlbumTitle { get; }
string DisplayTrackTitle { get; }
string DisplayGenre { get; }
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Collection/TrackInfo.cs Wed Feb 4 23:39:42 2009
@@ -263,6 +263,15 @@
}
}
+ public string DisplayAlbumArtistName {
+ get {
+ string name = AlbumArtist == null ? null : AlbumArtist.Trim ();
+ return String.IsNullOrEmpty (name)
+ ? DisplayArtistName
+ : name;
+ }
+ }
+
public string DisplayAlbumTitle {
get {
string title = AlbumTitle == null ? null : AlbumTitle.Trim ();
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 Wed Feb 4 23:39:42 2009
@@ -46,9 +46,9 @@
"Library Folder Pattern",
"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: " +
- "%artist%, %album%, %genre%, %title%, %track_number%, %track_count%, " +
+ "%album_artist%, %track_artist%, %album%, %genre%, %title%, %track_number%, %track_count%, " +
"%track_number_nz% (No prefixed zero), %track_count_nz% (No prefixed zero), " +
- "%path_sep% (portable directory separator (/))."
+ "%path_sep% (portable directory separator (/)), %artist% (deprecated, use %album_artist%)."
);
public static readonly SchemaEntry<string> FilePattern = new SchemaEntry<string>(
@@ -56,8 +56,9 @@
Banshee.Base.FileNamePattern.DefaultFile,
"Library File Pattern",
"Format for creating a track filename inside the library. Do not use path tokens/characters here. " +
- "See LibraryFolderPattern. Legal tokens: %artist%, %album%, %genre%, %title%, %track_number%, " +
- "%track_count%, %track_number_nz% (No prefixed zero), %track_count_nz% (No prefixed zero)."
+ "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%)."
);
public static readonly SchemaEntry<int> SortColumn = new SchemaEntry<int>(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]