MacGui: random fixes.

This commit is contained in:
Damiano Galassi committed 2015-02-27 09:43:11 +01:00
1 parent 194fbedc7c
commit 5d46d627d7
6 files changed
+21 -16

No files matched your search

+9 -5
View File
@@ -315,11 +315,15 @@ NSInteger sortMP42Metadata(id ep1, id ep2, void *context)
NSString *season = nil;
if (![[store valueForKey:@"season"] isEqualToString:@""]) {
NSArray *sa = [[s lowercaseString] componentsSeparatedByString:[NSString stringWithFormat:@", %@ ", [store valueForKey:@"season"]]];
if ([sa count] > 1) {
season = [sa objectAtIndex:1];
} else {
season = @"1";
}
if (sa.count <= 1) {
sa = [[s lowercaseString] componentsSeparatedByString:[NSString stringWithFormat:@", %@ ", @"book"]];
}
if ([sa count] > 1) {
season = [NSString stringWithFormat:@"%ld",(long) [[sa objectAtIndex:1] integerValue]];
} else {
season = @"1";
}
}
if (season) {
[metadata setTag:season forKey:@"TV Season"];
+2 -5
View File
@@ -606,11 +606,8 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
[[importWindow window] orderOut:nil];
[importWindow autorelease], importWindow = nil;
// IKImageBrowserView is a bit problematic, do the refresh at the end of the run loop
dispatch_async(dispatch_get_main_queue(), ^{
[fileTracksTable reloadData];
[self tableViewSelectionDidChange:nil];
});
[fileTracksTable reloadData];
[self tableViewSelectionDidChange:nil];
}
- (IBAction)sendToQueue:(id)sender
+1 -1
View File
@@ -23,7 +23,7 @@
- (instancetype)init {
if ((self = [super initWithWindowNibName:@"SBLogWindow"])) {
[self window];
(void)[self window];
}
return self;
+4
View File
@@ -289,8 +289,10 @@
// Convert from a file reference url to a normal url
// the file will be replaced if optimized, and the reference url
// may point to nil
[self willChangeValueForKey:@"fileURL"];
[_fileURL autorelease];
_fileURL = [[self.URL filePathURL] retain];
[self didChangeValueForKey:@"fileURL"];
if (!self.cancelled) {
if ([self.URL isEqualTo:self.destURL] && [self.mp4File hasFileRepresentation]) {
@@ -308,7 +310,9 @@
// Optimize the file
if (!self.cancelled && optimize) {
self.localizedWorkingDescription = NSLocalizedString(@"Optimizing", @"");
noErr = [self.mp4File optimize];
self.localizedWorkingDescription = nil;
}
if (!noErr) {