=== modified file 'src/TagLib/Id3v2/FrameTypes.cs'
--- src/TagLib/Id3v2/FrameTypes.cs	2007-12-30 01:26:31 +0000
+++ src/TagLib/Id3v2/FrameTypes.cs	2009-01-14 00:14:27 +0000
@@ -71,6 +71,7 @@
 		public static readonly ReadOnlyByteVector TRCK = "TRCK";
 		public static readonly ReadOnlyByteVector TRDA = "TRDA";
 		public static readonly ReadOnlyByteVector TSIZ = "TSIZ";
+		public static readonly ReadOnlyByteVector TSOP = "TSOP";
 		public static readonly ReadOnlyByteVector TXXX = "TXXX";
 		public static readonly ReadOnlyByteVector TYER = "TYER";
 		public static readonly ReadOnlyByteVector UFID = "UFID";

=== modified file 'src/TagLib/Id3v2/Tag.cs'
--- src/TagLib/Id3v2/Tag.cs	2008-12-16 01:41:48 +0000
+++ src/TagLib/Id3v2/Tag.cs	2009-01-14 00:22:34 +0000
@@ -1150,6 +1150,25 @@
 		}
 		
 		/// <summary>
+		///    Gets and sets the sort names of the performers or artists
+		///    who performed in the media described by the current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names for
+		///    the performers or artists who performed in the media
+		///    described by the current instance, or an empty array if
+		///    no value is present. 
+		/// </value>
+		/// <remarks>
+		///    This property is implemented using the "TSOP" Text
+		///    Information Frame.
+		/// </remarks>
+		public override string [] PerformersSort {
+			get {return GetTextAsArray (FrameType.TSOP);}
+			set {SetTextFrame (FrameType.TSOP, value);}
+		}
+		
+		/// <summary>
 		///    Gets and sets the band or artist who is credited in the
 		///    creation of the entire album or collection containing the
 		///    media described by the current instance.

=== modified file 'src/TagLib/Ogg/GroupedComment.cs'
--- src/TagLib/Ogg/GroupedComment.cs	2008-01-03 01:05:18 +0000
+++ src/TagLib/Ogg/GroupedComment.cs	2009-01-14 00:07:58 +0000
@@ -216,6 +216,36 @@
 		}
 
 		/// <summary>
+		///    Gets and sets the sort names of the performers or artists
+		///    who performed in the media described by the current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names for
+		///    the performers or artists who performed in the media
+		///    described by the current instance, or an empty array if
+		///    no value is present. 
+		/// </value>
+		/// <remarks>
+		///    <para>When getting the value, the child comments are
+		///    looped through in order and the first non-empty value is
+		///    returned.</para>
+		///    <para>When setting the value, it is stored in the first
+		///    comment.</para>
+		/// </remarks>
+		/// <seealso cref="Tag.PerformersSort" />
+		public override string [] PerformersSort {
+			get {
+				string [] output = new string [0];
+				foreach (XiphComment tag in tags)
+					if (tag != null && output.Length == 0)
+						output = tag.PerformersSort;
+				
+				return output;
+			}
+			set {if (tags.Count > 0) tags [0].PerformersSort = value;}
+		}
+
+		/// <summary>
 		///    Gets and sets the band or artist who is credited in the
 		///    creation of the entire album or collection containing the
 		///    media described by the current instance.
@@ -245,6 +275,39 @@
 			}
 			set {if (tags.Count > 0) tags [0].AlbumArtists = value;}
 		}
+		
+		/// <summary>
+		///    Gets and sets the sort names for the band or artist who
+		///    is credited in the creation of the entire album or
+		///    collection containing the media described by the
+		///    current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names
+		///    for the band or artist who is credited in the creation
+		///    of the entire album or collection containing the media
+		///    described by the current instance or an empty array if
+		///    no value is present.
+		/// </value>
+		/// <remarks>
+		///    <para>When getting the value, the child comments are
+		///    looped through in order and the first non-empty value is
+		///    returned.</para>
+		///    <para>When setting the value, it is stored in the first
+		///    comment.</para>
+		/// </remarks>
+		/// <seealso cref="Tag.AlbumArtistsSort" />
+		public override string [] AlbumArtistsSort {
+			get {
+				string [] output = new string [0];
+				foreach (XiphComment tag in tags)
+					if (tag != null && output.Length == 0)
+						output = tag.AlbumArtistsSort;
+				
+				return output;
+			}
+			set {if (tags.Count > 0) tags [0].AlbumArtistsSort = value;}
+		}
 
 		/// <summary>
 		///    Gets and sets the composers of the media represented by

=== modified file 'src/TagLib/Ogg/XiphComment.cs'
--- src/TagLib/Ogg/XiphComment.cs	2008-01-03 01:05:18 +0000
+++ src/TagLib/Ogg/XiphComment.cs	2009-01-14 00:05:05 +0000
@@ -481,6 +481,24 @@
 		}
 		
 		/// <summary>
+		///    Gets and sets the sort names of the performers or artists
+		///    who performed in the media described by the current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names for
+		///    the performers or artists who performed in the media
+		///    described by the current instance, or an empty array if
+		///    no value is present. 
+		/// </value>
+		/// <remarks>
+		///    This property is implemented using the "ARTISTSORT" field.
+		/// </remarks>
+		public override string [] PerformersSort {
+			get {return GetField ("ARTISTSORT");}
+			set {SetField ("ARTISTSORT", value);}
+		}
+		
+		/// <summary>
 		///    Gets and sets the band or artist who is credited in the
 		///    creation of the entire album or collection containing the
 		///    media described by the current instance.
@@ -501,6 +519,28 @@
 		}
 		
 		/// <summary>
+		///    Gets and sets the sort names for the band or artist who
+		///    is credited in the creation of the entire album or
+		///    collection containing the media described by the
+		///    current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names
+		///    for the band or artist who is credited in the creation
+		///    of the entire album or collection containing the media
+		///    described by the current instance or an empty array if
+		///    no value is present.
+		/// </value>
+		/// <remarks>
+		///    This property is implemented using the "ALBUMARTISTSORT"
+		///    field.
+		/// </remarks>
+		public override string [] AlbumArtistsSort {
+			get {return GetField ("ALBUMARTISTSORT");}
+			set {SetField ("ALBUMARTISTSORT", value);}
+		}
+		
+		/// <summary>
 		///    Gets and sets the composers of the media represented by
 		///    the current instance.
 		/// </summary>

=== modified file 'src/TagLib/Tag.cs'
--- src/TagLib/Tag.cs	2008-01-03 01:05:18 +0000
+++ src/TagLib/Tag.cs	2009-01-14 00:06:22 +0000
@@ -174,6 +174,28 @@
 		}
 		
 		/// <summary>
+		///    Gets and sets the sort names of the performers or artists
+		///    who performed in the media described by the current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names for
+		///    the performers or artists who performed in the media
+		///    described by the current instance, or an empty array if
+		///    no value is present. 
+		/// </value>
+		/// <remarks>
+		///    <para>This is used to provide more control over how tracks
+		///    are sorted. Typical uses are to skip common prefixes or
+		///    sort by last name. For example, "The Beatles" might be
+		///    sorted as "Beatles, The".
+		///    </para>
+		/// </remarks>
+		public virtual string [] PerformersSort {
+			get {return new string [] {};}
+			set {}
+		}
+		
+		/// <summary>
 		///    Gets and sets the band or artist who is credited in the
 		///    creation of the entire album or collection containing the
 		///    media described by the current instance.
@@ -204,6 +226,38 @@
 		}
 		
 		/// <summary>
+		///    Gets and sets the sort names for the band or artist who
+		///    is credited in the creation of the entire album or
+		///    collection containing the media described by the
+		///    current instance.
+		/// </summary>
+		/// <value>
+		///    A <see cref="string[]" /> containing the sort names
+		///    for the band or artist who is credited in the creation
+		///    of the entire album or collection containing the media
+		///    described by the current instance or an empty array if
+		///    no value is present.
+		/// </value>
+		/// <remarks>
+		///    <para>This field is typically optional but aids in the
+		///    sorting of compilations or albums with multiple artists.
+		///    For example, if an album has several artists, sorting by
+		///    artist will split up the album and sorting by album will
+		///    split up albums by the same artist. Having a single album
+		///    artist for an entire album will solve this
+		///    problem.</para>
+		///    <para>As this value is to be used as a sorting key, it
+		///    should be used with less variation than <see
+		///    cref="Performers" />. Where performers can be broken into
+		///    muliple artist it is best to stick with a single band
+		///    name. For example, "Beatles, The".</para>
+		/// </remarks>
+		public virtual string [] AlbumArtistsSort {
+			get {return new string [] {};}
+			set {}
+		}
+		
+		/// <summary>
 		///    Gets and sets the composers of the media represented by
 		///    the current instance.
 		/// </summary>
@@ -569,6 +623,23 @@
 		
 		/// <summary>
 		///    Gets the first value contained in <see
+		///    cref="AlbumArtistsSort" />.
+		/// </summary>
+		/// <value>
+		///    The first <see cref="string" /> object in <see
+		///    cref="AlbumArtistsSort" />, or <see langword="null" /> is it
+		///    contains no values.
+		/// </value>
+		/// <remarks>
+		///    This property is provided for convenience. Use <see
+		///    cref="AlbumArtistsSort" /> to set the value.
+		/// </remarks>
+		public string FirstAlbumArtistSort {
+			get {return FirstInGroup(AlbumArtistsSort);}
+		}
+		
+		/// <summary>
+		///    Gets the first value contained in <see
 		///    cref="Performers" />.
 		/// </summary>
 		/// <value>
@@ -667,6 +738,22 @@
 		
 		/// <summary>
 		///    Gets a semicolon separated string containing the values
+		///    in <see cref="PerformersSort" />.
+		/// </summary>
+		/// <value>
+		///    A semicolon separated <see cref="string" /> object
+		///    containing the values in <see cref="PerformersSort" />.
+		/// </value>
+		/// <remarks>
+		///    This property is provided for convenience. Use <see
+		///    cref="PerformersSort" /> to set the value.
+		/// </remarks>
+		public string JoinedPerformersSort {
+			get {return JoinGroup(PerformersSort);}
+		}
+		
+		/// <summary>
+		///    Gets a semicolon separated string containing the values
 		///    in <see cref="Composers" />.
 		/// </summary>
 		/// <value>

