[fProgressBar setIndeterminate:NO];
[fProgressBar stopAnimation:nil];
[fProgressBar setDoubleValue:0.0];
+
+
}
else
withSubtitleInfo: YES]];
}
}
-
else
+ {
[fJobDescTextField setStringValue: @"No encodes pending"];
+
+ }
+
}
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
- (void)currentJobChanged: (HBJob *) currentJob
{
+ /* if the job has a destination path, lets perform finished job notifications in fHBController
+ * We call this here so that we pickup the last job in the queue and single encodes before fCurrentJob
+ * is released. So for the first job and the beginning of single encodes we check for the existence
+ * of a valid fCurrentJob jobGroup
+ */
[currentJob retain];
+ /* We need to compare the job group to determine if this is the end of a job group
+ * or just the end of a job within a group to keep from sending encode done notification
+ * after the first pass in a two pass encode
+ */
+ HBJobGroup * theJobGroupCheck = [currentJob jobGroup];
+ if ((theJobGroupCheck == nil) || (theJobGroupCheck != fCurrentJobGroup))
+ {
+ /* we need to make sure that we are not at the beginning of a queue and also that the job hasn't
+ * been cancelled
+ */
+ if ([[fCurrentJob jobGroup] destinationPath] && [fCurrentJobGroup status] != HBStatusCanceled)
+ {
+ /* send encode messages to fHBController. User prefs are grokked there. */
+ [fHBController showGrowlDoneNotification: [[fCurrentJob jobGroup] destinationPath]];
+ [fHBController sendToMetaX: [[fCurrentJob jobGroup] destinationPath]];
+ }
+ }
[fCurrentJob release];
fCurrentJob = currentJob;
// all other cases are assumed to be a successful encode. BTW, libhb
// doesn't currently report errors back to the GUI.
if ([fCurrentJobGroup status] != HBStatusCanceled)
+ {
[fCurrentJobGroup setStatus:HBStatusCompleted];
+ }
+
+
}
// Set the new group