Commit ffd60553 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Media Library: compilation fixes when compiling with HAVE_BLOCK enabled (default disabled on iOS)

parent c5de1525
...@@ -190,6 +190,13 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma ...@@ -190,6 +190,13 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma
#endif #endif
} }
- (void)save
{
NSError *error = nil;
BOOL success = [[self managedObjectContext] save:&error];
NSAssert1(success, @"Can't save: %@", error);
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{ {
if ([keyPath isEqualToString:@"hasChanges"] && object == _managedObjectContext) { if ([keyPath isEqualToString:@"hasChanges"] && object == _managedObjectContext) {
...@@ -289,13 +296,6 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma ...@@ -289,13 +296,6 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma
show.lastSyncDate = [MLTVShowInfoGrabber serverTime]; show.lastSyncDate = [MLTVShowInfoGrabber serverTime];
} }
- (void)save
{
NSError *error = nil;
BOOL success = [[self managedObjectContext] save:&error];
NSAssert1(success, @"Can't save: %@", error);
}
- (void)tvShowEpisodesInfoGrabber:(MLTVShowEpisodesInfoGrabber *)grabber didFailWithError:(NSError *)error - (void)tvShowEpisodesInfoGrabber:(MLTVShowEpisodesInfoGrabber *)grabber didFailWithError:(NSError *)error
{ {
MLShow *show = grabber.userData; MLShow *show = grabber.userData;
...@@ -389,7 +389,7 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma ...@@ -389,7 +389,7 @@ static NSString *kUpdatedToTheMojoWireDatabaseFormat = @"upgradedToDatabaseForma
if ([[result objectForKey:@"serie"] boolValue]) { if ([[result objectForKey:@"serie"] boolValue]) {
continue; continue;
} }
MLShowEpisode *showEpisode = [self showEpisodeWithShow:show episodeNumber:[result objectForKey:@"episodeNumber"] seasonNumber:[result objectForKey:@"seasonNumber"]]; MLShowEpisode *showEpisode = [MLShowEpisode episodeWithShow:show episodeNumber:[result objectForKey:@"episodeNumber"] seasonNumber:[result objectForKey:@"seasonNumber"] createIfNeeded:YES];
showEpisode.name = [result objectForKey:@"title"]; showEpisode.name = [result objectForKey:@"title"];
showEpisode.theTVDBID = [result objectForKey:@"id"]; showEpisode.theTVDBID = [result objectForKey:@"id"];
showEpisode.shortSummary = [result objectForKey:@"shortSummary"]; showEpisode.shortSummary = [result objectForKey:@"shortSummary"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment