<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -93,6 +93,7 @@
 -(void)detachNowPlayingThread;
 -(void)playScrobblingSound;
 -(void)xmlFileChanged:(NSNotification *)notification;
+-(void)amdsSyncCompleted:(NSNotification *)notification;
 
 #pragma mark Secondary Last.fm Methods
 -(void)queueApiCall:(BGLastFmWebServiceParameterList *)theCall popQueueToo:(BOOL)shouldPopQueue;</diff>
      <filename>AppController.h</filename>
    </modified>
    <modified>
      <diff>@@ -129,6 +129,7 @@ nil] ];
 	NSNotificationCenter *defaultNotificationCenter = [NSNotificationCenter defaultCenter];
 	[defaultNotificationCenter addObserver:self selector:@selector(podWatcherMountedPod:) name:BGNotificationPodMounted object:nil];
 	[defaultNotificationCenter addObserver:self selector:@selector(xmlFileChanged:) name:XMLChangedNotification object:nil];
+	[defaultNotificationCenter addObserver:self selector:@selector(amdsSyncCompleted:) name:AMDSSyncComplete object:nil];
 
 	 authManager = [[BGLastFmAuthenticationManager alloc] initWithDelegate:self];
 
@@ -299,6 +300,11 @@ nil] ];
 	[[BGScrobbleDecisionManager sharedManager] refreshDecisionAndNotifyIfChanged:YES];
 }
 
+-(void)amdsSyncCompleted:(NSNotification *)notification {
+	NSLog(@&quot;Mobile Device finished syncing... going to try to scrobble&quot;);
+	[self detachScrobbleThreadWithoutConsideration:NO];
+}
+
 -(void)xmlFileChanged:(NSNotification *)notification {
 	NSLog(@&quot;OMG! XML change!&quot;);
 	[self detachScrobbleThreadWithoutConsideration:NO];</diff>
      <filename>AppController.m</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@
 			[postString appendString:[NSString stringWithFormat:@&quot;&amp;m[%d]=&quot;,efficientPostIndex]]; //musicbrainz
 
 			efficientPostIndex++;
-
+			
 		}
 		
 		NSData *postData = [postString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];</diff>
      <filename>BGLastFmScrobbler.m</filename>
    </modified>
    <modified>
      <diff>@@ -67,9 +67,7 @@
 					}
 					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;</diff>
      <filename>BGTrackCollector.m</filename>
    </modified>
    <modified>
      <diff>@@ -59,6 +59,7 @@
 	#define BGLastSyncDate @&quot;iPodLastSynchronized&quot;
 	#define BGActivityHistoryArray &quot;ActivityHistory&quot;
 	#define BGTracksScrobbledTotal @&quot;TracksScrobbled&quot;
+	#define AMDSSyncComplete @&quot;AMDSSyncComplete&quot;
 
 	#define ServiceWorker_LoveCommand @&quot;track.love&quot;
 	#define ServiceWorker_BanCommand  @&quot;track.ban&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.52&lt;/string&gt;
+	&lt;string&gt;0.52.1&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.52&lt;/string&gt;
+	&lt;string&gt;0.52.1&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>
      <diff>@@ -25,6 +25,7 @@
 
 -(void)applyForMobileDeviceNotifications;
 -(void)amdsDidConnect:(NSNotification*)note;
+-(void)amdsDidSync:(NSNotification*)note;
 -(void)amdsDidFail:(NSNotification*)note;
 
 -(void)applyForiPodNotifications;</diff>
      <filename>iPodWatcher.h</filename>
    </modified>
    <modified>
      <diff>@@ -73,7 +73,13 @@ static iPodWatcher *sharedPodWatcher = nil;
 
 -(void)amdsDidConnect:(NSNotification*)note {
 	NSLog(@&quot;Mobile Device Connected: %@&quot;, [[note userInfo] objectForKey:@&quot;product&quot;]);
+	// [self updateLastSyncDateWithNotification:YES];
+}
+
+-(void)amdsDidSync:(NSNotification*)note {
+	NSLog(@&quot;Mobile Device Sync Finished&quot;);
 	[self updateLastSyncDateWithNotification:YES];
+	[[NSNotificationCenter defaultCenter] postNotificationName:AMDSSyncComplete object:nil];
 }
 
 -(void)amdsDidFail:(NSNotification*)note {
@@ -87,7 +93,8 @@ static iPodWatcher *sharedPodWatcher = nil;
 		NSLog(@&quot;iPhone Detection Initialization error occured&quot;);
 	} else {		
 		NSLog(@&quot;iPhone/iPod Touch Detection Enabled&quot;);
-		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(amdsDidConnect:) name:@&quot;org.bergstrand.amds.connect&quot; object:nil];		
+		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(amdsDidConnect:) name:@&quot;org.bergstrand.amds.connect&quot; object:nil];
+		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(amdsDidSync:) name:@&quot;org.bergstrand.amds.syncDidFinish&quot; object:nil];
 		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(amdsDidFail:) name:@&quot;org.bergstrand.amds.intializeDidFail&quot; object:nil];
 	}
 }</diff>
      <filename>iPodWatcher.m</filename>
    </modified>
    <modified>
      <diff>@@ -122,6 +122,7 @@ static iTunesWatcher *sharedTunesManager = nil;
 	
 	self.iTunesIsPlaying = YES;
 	NSString *newIdentifier = [[newSongDetails objectForKey:@&quot;PersistentID&quot;] stringValue];
+	NSLog(@&quot;Got new song Persistent ID: %@&quot;,newIdentifier);
 	
 	if ( [self songIsNew:newIdentifier] ) {
 </diff>
      <filename>iTunesWatcher.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a8762960074eec273378bd7061f481bbfe825a90</id>
    </parent>
  </parents>
  <author>
    <name>Ben Gummer</name>
    <email>bengummer@gmail.com</email>
  </author>
  <url>http://github.com/scrobblepod/scrobblepod/commit/37014c6712a233711b5d4c0640d959a657343a45</url>
  <id>37014c6712a233711b5d4c0640d959a657343a45</id>
  <committed-date>2009-03-26T18:35:55-07:00</committed-date>
  <authored-date>2009-03-26T18:35:55-07:00</authored-date>
  <message>Only enable scrobbling for iPhones when they actually finish syncing; Some random changes too.</message>
  <tree>97c41d53c461aa2739cd03ce8b2bdd526ecec9a9</tree>
  <committer>
    <name>Ben Gummer</name>
    <email>bengummer@gmail.com</email>
  </committer>
</commit>
