Fixed build

This commit is contained in:
Damiano Galassi committed 2015-09-14 10:58:09 +02:00
1 parent 93c779e02b
commit 7ff4c086d0
4 files changed
+23 -23

No files matched your search

+8 -8
View File
@@ -17,11 +17,11 @@ NS_ASSUME_NONNULL_BEGIN
BOOL _isCancelled;
}
typedef enum SBCachePolicy : NSUInteger {
SBDefaultPolicy = 0,
typedef NS_ENUM(NSUInteger, SBCachePolicy) {
SBDefaultPolicy,
SBReturnCacheElseLoad,
SBReloadIgnoringLocalCacheData,
} SBCachePolicy;
};
#pragma mark Helper routines
+ (NSDictionary<NSString *, NSString *> *)parseFilename:(NSString *)filename;
@@ -53,13 +53,13 @@ typedef enum SBCachePolicy : NSUInteger {
#pragma mark Methods to be overridden
- (NSArray<NSString *> *) languages;
- (NSArray<MP42Metadata *> * _Nullable) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage;
- (NSArray<MP42Metadata *> * _Nullable) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage seasonNum:(NSString * _Nullable)aSeasonNum episodeNum:(NSString * _Nullable)aEpisodeNum;
- (nullable NSArray<MP42Metadata *> *) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage;
- (nullable NSArray<MP42Metadata *> *) searchTVSeries:(NSString *)aSeriesName language:(NSString *)aLanguage seasonNum:(nullable NSString *)aSeasonNum episodeNum:(nullable NSString *)aEpisodeNum;
- (NSArray<MP42Metadata *> * _Nullable) searchMovie:(NSString *)aMovieTitle language:(NSString *)aLanguage;
- (nullable NSArray<MP42Metadata *> *) searchMovie:(NSString *)aMovieTitle language:(NSString *)aLanguage;
- (MP42Metadata * _Nullable) loadTVMetadata:(MP42Metadata *)aMetadata language:(NSString *)aLanguage;
- (MP42Metadata * _Nullable) loadMovieMetadata:(MP42Metadata *)aMetadata language:(NSString *)aLanguage;
- (nullable MP42Metadata *) loadTVMetadata:(MP42Metadata *)aMetadata language:(NSString *)aLanguage;
- (nullable MP42Metadata *) loadMovieMetadata:(MP42Metadata *)aMetadata language:(NSString *)aLanguage;
@end
+3 -3
View File
@@ -174,7 +174,7 @@
IOReturn io_success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep,
kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
BOOL result = NO;
NSDictionary<NSString *, NSNumber *> *attributes = [self saveAttributes];
NSDictionary<NSString *, NSNumber *> *options = [self saveAttributes];
self.mp4.progressHandler = ^(double progress){
dispatch_async(dispatch_get_main_queue(), ^{
@@ -187,12 +187,12 @@
case NSSaveOperation:
// movie file already exists, so we'll just update
// the movie resource.
result = [self.mp4 updateMP4FileWithAttributes:attributes error:outError];
result = [self.mp4 updateMP4FileWithOptions:options error:outError];
break;
case NSSaveAsOperation:
// movie does not exist, create a new one from scratch.
result = [self.mp4 writeToUrl:url withAttributes:attributes error:outError];
result = [self.mp4 writeToUrl:url options:options error:outError];
break;
default:
+10 -10
View File
@@ -491,18 +491,21 @@
#pragma mark NSComboBox delegates and protocols
- (NSString *)comboBox:(NSComboBox *)comboBox completedString:(NSString *)uncompletedString {
if (!uncompletedString || ([uncompletedString length] < 1)) return nil;
if (uncompletedString.length < 1) {
return nil;
}
if (comboBox == tvSeriesName) {
NSArray *previousTVseries = [[NSUserDefaults standardUserDefaults] arrayForKey:@"Previously used TV series"];
if (previousTVseries == nil) return nil;
NSEnumerator *previousTVseriesEnum = [previousTVseries objectEnumerator];
NSString *s;
while ((s = (NSString *) [previousTVseriesEnum nextObject])) {
if ([[s lowercaseString] hasPrefix:[uncompletedString lowercaseString]]) {
if (previousTVseries == nil) { return nil; }
for (NSString *s in previousTVseries) {
if ([s.lowercaseString hasPrefix:uncompletedString.lowercaseString]) {
return s;
}
}
return nil;
}
return nil;
}
@@ -535,9 +538,6 @@
}
- (NSInteger)numberOfItemsInComboBox:(NSComboBox *)comboBox {
// for some unknown reason, the number of items displayed won't be correct unless these member variables get accessed
// bug to fix!
//NSLog(@"in numberOfItemsInComboBox; box numberOfVisibleItems = %d, cell numberOfVisibleItems = %d", (int) [comboBox numberOfVisibleItems], (int) [[comboBox cell] numberOfVisibleItems]);
if (comboBox == tvSeriesName) {
return self.tvSeriesNameSearchArray.count;
}
+2 -2
View File
@@ -315,11 +315,11 @@
if (!self.cancelled) {
if ([self.URL isEqualTo:self.destURL] && [self.mp4File hasFileRepresentation]) {
// We have an existing mp4 file, update it
noErr = [self.mp4File updateMP4FileWithAttributes:self.attributes error:outError];
noErr = [self.mp4File updateMP4FileWithOptions:self.attributes error:outError];
} else {
// Write the new file to disk
noErr = [self.mp4File writeToUrl:self.destURL
withAttributes:self.attributes
options:self.attributes
error:outError];
}
}