<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -83,6 +83,8 @@
 		[NSNumber numberWithBool:NO],BGPrefWantOldIcon,
 		[NSNumber numberWithBool:NO],BGPrefShouldDoMultiPlay,
 		[NSNumber numberWithBool:NO],BGPrefShouldUseAlbumArtist,
+		[NSNumber numberWithBool:NO],BGPrefShouldUseComposerInsteadOfArtist,
+		[NSNumber numberWithBool:NO],BGPrefShouldUseGroupingInTitle,
 		@&quot;~/Music/iTunes/iTunes Music Library.xml&quot;,BGPrefXmlLocation,
 nil] ];
 </diff>
      <filename>AppController.m</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@
 		currentUnixTime = [NSString stringWithFormat:@&quot;%d&quot;,(int)[[NSDate date] timeIntervalSince1970]]; 
 		authenticationHash = [[NSString stringWithFormat:@&quot;%@%@&quot;,[API_SECRET md5HexHash],currentUnixTime] md5HexHash];
 
-		handshakeURL = [NSURL URLWithString: [NSString stringWithFormat:@&quot;http://post.audioscrobbler.com/?hs=true&amp;p=1.2.1&amp;c=sld&amp;v=0.50.11&amp;u=%@&amp;t=%@&amp;a=%@&amp;sk=%@&quot;,theUsername,currentUnixTime,authenticationHash,apiSessionKey]];
+		handshakeURL = [NSURL URLWithString: [NSString stringWithFormat:@&quot;http://post.audioscrobbler.com/?hs=true&amp;p=1.2.1&amp;c=sld&amp;v=0.521&amp;u=%@&amp;t=%@&amp;a=%@&amp;sk=%@&quot;,theUsername,currentUnixTime,authenticationHash,apiSessionKey]];
 
 		NSMutableURLRequest *handshakeRequest = [[NSMutableURLRequest alloc] initWithURL:handshakeURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:2.0];
 		[handshakeRequest setHTTPMethod:@&quot;GET&quot;];</diff>
      <filename>BGLastFmHandshaker.m</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 	NSString *currentUnixTime = [NSString stringWithFormat:@&quot;%d&quot;,(int)[[NSDate date] timeIntervalSince1970]]; 
 	NSString *authString = [[NSString stringWithFormat:@&quot;%@%@&quot;,API_SECRET,currentUnixTime] md5HexHash];
 
-	NSString *handshakeUrlString = [NSString stringWithFormat:@&quot;http://post.audioscrobbler.com/?hs=true&amp;p=1.2.1&amp;c=sld&amp;v=0.50&amp;u=%@&amp;t=%@&amp;a=%@&amp;api_key=%@&amp;sk=%@&quot;,username,currentUnixTime,authString,API_KEY,wsSessionKey];
+	NSString *handshakeUrlString = [NSString stringWithFormat:@&quot;http://post.audioscrobbler.com/?hs=true&amp;p=1.2.1&amp;c=sld&amp;v=0.52&amp;u=%@&amp;t=%@&amp;a=%@&amp;api_key=%@&amp;sk=%@&quot;,username,currentUnixTime,authString,API_KEY,wsSessionKey];
 	
 	NSURL *postURL = [NSURL URLWithString:handshakeUrlString];
 	</diff>
      <filename>BGLastFmSubmissionHandshaker.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,9 @@
 @implementation BGTrackCollector
 -(NSMutableArray *)collectTracksFromXMLFile:(NSString *)xmlPath withCutoffDate:(NSDate *)cutoffDate includingPodcasts:(BOOL)includePodcasts includingVideo:(BOOL)includeVideo ignoringComment:(NSString *)ignoreString ignoringGenre:(NSString *)genreString withMinimumDuration:(int)minimumDuration {
 
+	double oldPriority = [NSThread threadPriority];
+	[NSThread setThreadPriority:0.0];
+
 	if (!xmlPath || ![[NSFileManager defaultManager] fileExistsAtPath:xmlPath]) {
 		NSLog(@&quot;Supplied XML path does not exist - Using default XML path&quot;);
 		xmlPath = [@&quot;~/Music/iTunes/iTunes Music Library.xml&quot; stringByExpandingTildeInPath];
@@ -27,7 +30,9 @@
 	
 	NSMutableArray *resultSongArray = [NSMutableArray new];
 	
-	BOOL useAlbumArtist = [[NSUserDefaults standardUserDefaults] boolForKey:BGPrefShouldUseAlbumArtist];
+	BOOL useAlbumArtist =             [[NSUserDefaults standardUserDefaults] boolForKey:BGPrefShouldUseAlbumArtist];
+	BOOL useComposerInsteadOfArtist = [[NSUserDefaults standardUserDefaults] boolForKey:BGPrefShouldUseComposerInsteadOfArtist];
+	BOOL useGroupingInTitle =         [[NSUserDefaults standardUserDefaults] boolForKey:BGPrefShouldUseGroupingInTitle];
 	
 	if (itunesLibrary) {
 		NSLog(@&quot;Parsing XML contents&quot;);
@@ -51,13 +56,28 @@
 
 			NSDictionary *trackStuff;
 			for (trackStuff in wantedTracksSorted) {
+			
 				// track name
-				NSString *nameString = [trackStuff objectForKey:@&quot;Name&quot;];
+				NSString *trackTitle = [trackStuff objectForKey:@&quot;Name&quot;];
+				NSString *nameString = nil;
+				if (trackTitle) {
+					if (useGroupingInTitle) {
+						NSString *trackGrouping = [trackStuff objectForKey:@&quot;Grouping&quot;];
+						if (trackGrouping) nameString = [NSString stringWithFormat:@&quot;%@: %@&quot;,trackGrouping,trackTitle];
+					}
+					if (!nameString) nameString = trackTitle;
+				}
+				NSLog(@&quot;10&quot;);
 				if (!nameString) nameString = @&quot;&quot;;
+				NSLog(@&quot;11&quot;);
 				
 				// artist, using album artist where possible
 				NSString *artistString = nil;
-				if (useAlbumArtist) artistString = [trackStuff objectForKey:@&quot;Album Artist&quot;];
+				if (useAlbumArtist) {
+					artistString = [trackStuff objectForKey:@&quot;Album Artist&quot;];
+				} else if (useComposerInsteadOfArtist) {
+					artistString = [trackStuff objectForKey:@&quot;Composer&quot;];
+				}
 				if (!artistString)  artistString = [trackStuff objectForKey:@&quot;Artist&quot;];
 				if (!artistString)  artistString = @&quot;&quot;;
 				
@@ -97,6 +117,8 @@
 	} else NSLog(@&quot;Could not load dictionary from XML&quot;);
 	
 	//itunesLibrary
+	
+	[NSThread setThreadPriority:oldPriority];
 
 	return resultSongArray;
 }</diff>
      <filename>BGTrackCollector.m</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,8 @@
 	#define BGPrefIgnoreShortLength @&quot;IgnoreShortLength&quot;
 	#define BGPrefShouldDoMultiPlay @&quot;DoMultiPlay&quot;
 	#define BGPrefShouldUseAlbumArtist @&quot;UseAlbumArtist&quot;
+	#define BGPrefShouldUseComposerInsteadOfArtist @&quot;UseComposer&quot;
+	#define BGPrefShouldUseGroupingInTitle @&quot;UseGroupingInTitle&quot;
 	#define INSTALLATIONID @&quot;AnonymousInstallNumber&quot;
 	
 	#define BGPrefWantOldIcon @&quot;WantOldIcon&quot;</diff>
      <filename>Defines.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 	&lt;key&gt;CFBundlePackageType&lt;/key&gt;
 	&lt;string&gt;APPL&lt;/string&gt;
 	&lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
-	&lt;string&gt;0.51&lt;/string&gt;
+	&lt;string&gt;0.52&lt;/string&gt;
 	&lt;key&gt;CFBundleSignature&lt;/key&gt;
 	&lt;string&gt;????&lt;/string&gt;
 	&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
@@ -32,7 +32,7 @@
 		&lt;/dict&gt;
 	&lt;/array&gt;
 	&lt;key&gt;CFBundleVersion&lt;/key&gt;
-	&lt;string&gt;0.51&lt;/string&gt;
+	&lt;string&gt;0.52&lt;/string&gt;
 	&lt;key&gt;LSMinimumSystemVersion&lt;/key&gt;
 	&lt;string&gt;10.5&lt;/string&gt;
 	&lt;key&gt;NSMainNibFile&lt;/key&gt;</diff>
      <filename>Info.plist</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0b83f30eeab06dc3fbbfa86b52012d813450ab2d</id>
    </parent>
  </parents>
  <author>
    <name>Ben Gummer</name>
    <email>bengummer@gmail.com</email>
  </author>
  <url>http://github.com/scrobblepod/scrobblepod/commit/a8762960074eec273378bd7061f481bbfe825a90</url>
  <id>a8762960074eec273378bd7061f481bbfe825a90</id>
  <committed-date>2009-02-15T05:08:46-08:00</committed-date>
  <authored-date>2009-02-15T05:08:46-08:00</authored-date>
  <message>Add two hidden preferences used in 0.52 (and soon 0.52.1 bug fix release).</message>
  <tree>4b23eec42d2b2b6c44d108fff32e05eb2ec4ec3f</tree>
  <committer>
    <name>Ben Gummer</name>
    <email>bengummer@gmail.com</email>
  </committer>
</commit>
