Permalink
Browse files

Subscriptions are now saved before updating the show list.

  • Loading branch information...
1 parent a556c28 commit 57eb9cdace79da0eac5627d9a63b3b084a1c1ef4 @mattprice mattprice committed Oct 3, 2009
Showing with 3 additions and 13 deletions.
  1. +0 −1 Controller.h
  2. +3 −12 Controller.m
View
@@ -103,7 +103,6 @@
// Misc
- (void)applicationWillTerminate: (NSNotification *)aNotification;
-- (IBAction)test: (id)sender;
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
- (void)checkForBittorrentClient;
- (void)checkForBittorrentClientAlertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
View
@@ -235,14 +235,15 @@ - (void)mainWindowDidBecomeMain: (NSNotification *)notification
- (IBAction)downloadShowList
{
-
[NSApp beginSheet:progressPanel
modalForWindow:mainWindow
modalDelegate:self
didEndSelector:nil
contextInfo:nil];
[progressPanelIndicator startAnimation:nil];
+ [shows writeToFile:[h showsPath] atomically:YES];
+
NSTask *aTask = [[NSTask alloc] init];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadShowListDidFinish:) name:NSTaskDidTerminateNotification object:aTask];
[aTask setArguments:[NSArray arrayWithObjects:[h showsPath],ShowsLatestVersion,nil]];
@@ -390,11 +391,6 @@ - (IBAction)subscribe: (id)sender
[getShowDetailsTask launch];
} else {
[currentShow setValue:[NSNumber numberWithBool:NO] forKeyPath:ShowSubscribed];
- /*
- [currentShow setValue:[NSNumber numberWithInt:0] forKeyPath:ShowSeason];
- [currentShow setValue:[NSNumber numberWithInt:0] forKeyPath:ShowEpisode];
- [currentShow setValue:[NSNumber numberWithBool:NO] forKeyPath:ShowSubscribed];
- */
[showsController rearrangeObjects];
}
}
@@ -417,7 +413,6 @@ - (void)getShowDetailsDidFinish: (NSNotification *)notification
// Ok
} else {
-
retries = 0;
NSString *errorString;
id someDetails = [NSPropertyListSerialization
@@ -459,6 +454,7 @@ - (IBAction)cancelSubscription: (id)sender
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSTaskDidTerminateNotification object:getShowDetailsTask];
[getShowDetailsTask terminate];
[currentShow setValue:[NSNumber numberWithBool:NO] forKeyPath:ShowSubscribed];
+
[NSApp endSheet:detailsSheet];
[detailsSheet close];
}
@@ -618,11 +614,6 @@ - (void)applicationWillTerminate: (NSNotification *)aNotification
[self loadIntoLaunchd];
}
-- (IBAction)test: (id)sender
-{
- [defaultsController save:self];
-}
-
- (BOOL)shouldGreenRowAtIndex: (int)index
{
if ( index < [[showsController arrangedObjects] count] )

0 comments on commit 57eb9cd

Please sign in to comment.