summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2020-12-01 10:53:37 +0100
committerDamiano Galassi <[email protected]>2020-12-01 10:53:37 +0100
commitfeaf9d2f8074673ea95e26c038752316f9bf5bc9 (patch)
treecece86fc174bb10df346348928d150f9263301c1 /macosx
parent2ca52fc22d7cff67d847b374967f4c49d9874943 (diff)
MacGui: start encoding when a job is added to the queu if a job is already encoding and there is a free worker.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBQueue.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/macosx/HBQueue.m b/macosx/HBQueue.m
index 641c20d5d..19f568e41 100644
--- a/macosx/HBQueue.m
+++ b/macosx/HBQueue.m
@@ -205,6 +205,11 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK
{
NSIndexSet *indexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(self.itemsInternal.count, itemsToAdd.count)];
[self addItems:itemsToAdd atIndexes:indexes];
+
+ if (self.isEncoding && self.countOfEncodings < self.workersCount)
+ {
+ [self encodeNextQueueItem];
+ }
}
}