Moved the movie file type to SBQueuePreferences.
This commit is contained in:
1 parent
6eba47d4f3
commit
6f0d2ccf72
3 files changed
+11
-7
No files matched your search
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#import <MP42Foundation/MP42Utilities.h>
|
#import <MP42Foundation/MP42Utilities.h>
|
||||||
|
|
||||||
static NSString *fileType = @"mp4";
|
|
||||||
static void *SBQueueContex = &SBQueueContex;
|
static void *SBQueueContex = &SBQueueContex;
|
||||||
|
|
||||||
#define SublerBatchTableViewDataType @"SublerBatchTableViewDataType"
|
#define SublerBatchTableViewDataType @"SublerBatchTableViewDataType"
|
||||||
@@ -86,7 +85,7 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
[_progressIndicator setHidden:YES];
|
[_progressIndicator setHidden:YES];
|
||||||
|
|
||||||
// Load a generic movie icon to display in the table view
|
// Load a generic movie icon to display in the table view
|
||||||
_docImg = [[[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode('MOOV')] retain];
|
_docImg = [[[NSWorkspace sharedWorkspace] iconForFileType:@"public.movie"] retain];
|
||||||
[_docImg setSize:NSMakeSize(16, 16)];
|
[_docImg setSize:NSMakeSize(16, 16)];
|
||||||
|
|
||||||
[_tableView registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, SublerBatchTableViewDataType, nil]];
|
[_tableView registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, SublerBatchTableViewDataType, nil]];
|
||||||
@@ -117,7 +116,6 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
[_startItem setImage:[NSImage imageNamed:NSImageNameGoRightTemplate]];
|
[_startItem setImage:[NSImage imageNamed:NSImageNameGoRightTemplate]];
|
||||||
[_countLabel setStringValue:@"Done"];
|
[_countLabel setStringValue:@"Done"];
|
||||||
|
|
||||||
[self updateDockTile];
|
|
||||||
[self updateUI];
|
[self updateUI];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@@ -257,9 +255,11 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
|
|
||||||
NSURL *destination = [self.options objectForKey:SBQueueDestination];
|
NSURL *destination = [self.options objectForKey:SBQueueDestination];
|
||||||
if (destination) {
|
if (destination) {
|
||||||
destination = [[[destination URLByAppendingPathComponent:[url lastPathComponent]] URLByDeletingPathExtension] URLByAppendingPathExtension:fileType];
|
destination = [[[destination URLByAppendingPathComponent:[url lastPathComponent]] URLByDeletingPathExtension]
|
||||||
|
URLByAppendingPathExtension:[self.options objectForKey:SBQueueFileType]];
|
||||||
} else {
|
} else {
|
||||||
destination = [[url URLByDeletingPathExtension] URLByAppendingPathExtension:fileType];
|
destination = [[url URLByDeletingPathExtension]
|
||||||
|
URLByAppendingPathExtension:[self.options objectForKey:SBQueueFileType]];
|
||||||
}
|
}
|
||||||
|
|
||||||
item.destURL = destination;
|
item.destURL = destination;
|
||||||
@@ -434,9 +434,10 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
|
|
||||||
- (void)updateUI {
|
- (void)updateUI {
|
||||||
[_tableView reloadData];
|
[_tableView reloadData];
|
||||||
|
[self updateDockTile];
|
||||||
|
|
||||||
if (self.queue.status != SBQueueStatusWorking) {
|
if (self.queue.status != SBQueueStatusWorking) {
|
||||||
[_countLabel setStringValue:[NSString stringWithFormat:@"%lu files in queue.", (unsigned long)[self.queue count]]];
|
[_countLabel setStringValue:[NSString stringWithFormat:@"%lu files in queue.", (unsigned long)[self.queue count]]];
|
||||||
[self updateDockTile];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
extern NSString * const SBQueueFileType;
|
||||||
extern NSString * const SBQueueOrganize;
|
extern NSString * const SBQueueOrganize;
|
||||||
extern NSString * const SBQueueMetadata;
|
extern NSString * const SBQueueMetadata;
|
||||||
extern NSString * const SBQueueSubtitles;
|
extern NSString * const SBQueueSubtitles;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#import <MP42Foundation/MP42Metadata.h>
|
#import <MP42Foundation/MP42Metadata.h>
|
||||||
|
|
||||||
|
NSString * const SBQueueFileType = @"SBQueueFileType";
|
||||||
NSString * const SBQueueOrganize = @"SBQueueOrganize";
|
NSString * const SBQueueOrganize = @"SBQueueOrganize";
|
||||||
NSString * const SBQueueMetadata = @"SBQueueMetadata";
|
NSString * const SBQueueMetadata = @"SBQueueMetadata";
|
||||||
NSString * const SBQueueSubtitles = @"SBQueueSubtitles";
|
NSString * const SBQueueSubtitles = @"SBQueueSubtitles";
|
||||||
@@ -56,7 +57,8 @@ NSString * const SBQueueSet = @"SBQueueSet";
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ (void)registerUserDefaults {
|
+ (void)registerUserDefaults {
|
||||||
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ SBQueueOrganize : @YES,
|
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ SBQueueFileType : @"mp4",
|
||||||
|
SBQueueOrganize : @YES,
|
||||||
SBQueueMetadata : @NO,
|
SBQueueMetadata : @NO,
|
||||||
SBQueueSubtitles: @YES,
|
SBQueueSubtitles: @YES,
|
||||||
SBQueueAutoStart: @NO,
|
SBQueueAutoStart: @NO,
|
||||||
|
|||||||
Reference in new issue
Block a user