Compare commits

..

No commits in common. "4ac4787cc135f4a308fbaaa1b4219b84aca9cec0" and "794a9d2e7cc5b448067c0c76c8e4cbaf8842c51e" have entirely different histories.

5 changed files with 21 additions and 20 deletions

View file

@ -399,7 +399,7 @@ extern NSMutableDictionary<NSString *, AlbumArtwork *> *kArtworkDictionary;
NSURL *_Nullable urlForPath(NSString *_Nullable path) {
if(!path || ![path length]) {
return [NSURL URLWithString:@"silence://10"];
return nil;
}
NSRange protocolRange = [path rangeOfString:@"://"];

View file

@ -392,9 +392,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
for(url in urls) {
id<SentrySpan> pathTask = [sandboxTask startChildWithOperation:@"Process one folder" description:[NSString stringWithFormat:@"Processing file or folder: %@", url]];
@try {
if(!url) continue;
if([url isFileURL]) {
if(![url path]) continue;
BOOL isDir;
if([[NSFileManager defaultManager] fileExistsAtPath:[url path] isDirectory:&isDir]) {
if(isDir == YES) {
@ -421,7 +419,6 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
}
} else {
// Non-file URL..
if(![url absoluteString]) continue;
[expandedURLs setValue:url forKey:[PlaylistLoader keyForPath:[url absoluteString]]];
}
@ -473,11 +470,11 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
id<SentrySpan> innerTask = nil;
NSURL *url = nil;
@try {
url = obj;
if(containerTask) {
pathTask = [containerTask startChildWithOperation:@"Process path as container" description:[NSString stringWithFormat:@"Checking if file is container: %@", url]];
}
url = obj;
[lock lock];
if([uniqueURLs containsObject:url]) {
[lock unlock];
@ -813,7 +810,7 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path);
- (void)loadInfoForEntries:(NSArray *)entries {
NSMutableDictionary *queueThisJob = [[NSMutableDictionary alloc] init];
for(PlaylistEntry *pe in entries) {
if(!pe || !pe.urlString || ![pe.urlString length] || pe.deLeted || pe.metadataLoaded) continue;
if(!pe || !pe.urlString || pe.deLeted || pe.metadataLoaded) continue;
NSString *path = pe.urlString;
NSMutableArray *entrySet = [queueThisJob objectForKey:path];
@ -1163,7 +1160,7 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path);
NSMutableIndexSet *pruneSet = [[NSMutableIndexSet alloc] init];
NSUInteger index = 0;
for(PlaylistEntry *pe in resultsCopy) {
if(pe.deLeted || !pe.urlString || ![pe.urlString length]) {
if(pe.deLeted || !pe.urlString || [pe.urlString length] < 1) {
[pruneSet addIndex:index];
[moc deleteObject:pe];
}

View file

@ -10,8 +10,6 @@
#import "SandboxBroker.h"
#import "Logging.h"
@implementation FileSource
+ (void)initialize {
@ -36,10 +34,6 @@
sbHandle = [sandboxBroker beginFolderAccess:url];
NSString *path = [url path];
if(!path) {
ALog(@"Invalid URL: %@", url);
return NO;
}
fex_type_t type;
fex_err_t error = fex_identify_file(&type, [path UTF8String]);

View file

@ -40,7 +40,6 @@
8307D31B2860722C000FF8EB /* SandboxBroker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SandboxBroker.h; path = ../../Utils/SandboxBroker.h; sourceTree = "<group>"; };
8335FF6817FF765A002D8DD2 /* File_Extractor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = File_Extractor.xcodeproj; path = ../../Frameworks/File_Extractor/File_Extractor.xcodeproj; sourceTree = "<group>"; };
834A42AD287AF25600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = "<group>"; };
835F15B82DF80DE1008C7054 /* Logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = /Users/chris/Source/Repos/cog/Utils/Logging.h; sourceTree = "<absolute>"; };
83747C4F2862DD2F0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
8D5B49B6048680CD000E48DA /* FileSource.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FileSource.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -94,7 +93,6 @@
isa = PBXGroup;
children = (
834A42AD287AF25600EB9D9B /* AudioChunk.h */,
835F15B82DF80DE1008C7054 /* Logging.h */,
8307D31B2860722C000FF8EB /* SandboxBroker.h */,
17ADB4080B979A8A00257CA2 /* Plugin.h */,
17ADB4180B979AEB00257CA2 /* FileSource.h */,

View file

@ -299,11 +299,17 @@
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = ../../ThirdParty/libid3tag/include;
HEADER_SEARCH_PATHS = (
../../ThirdParty/libmad/include,
../../ThirdParty/libid3tag/include,
);
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSPrincipalClass = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = ../../ThirdParty/libid3tag/lib;
LIBRARY_SEARCH_PATHS = (
../../ThirdParty/libmad/lib,
../../ThirdParty/libid3tag/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = co.losno.MAD;
@ -321,11 +327,17 @@
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = ../../ThirdParty/libid3tag/include;
HEADER_SEARCH_PATHS = (
../../ThirdParty/libmad/include,
../../ThirdParty/libid3tag/include,
);
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSPrincipalClass = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = ../../ThirdParty/libid3tag/lib;
LIBRARY_SEARCH_PATHS = (
../../ThirdParty/libmad/lib,
../../ThirdParty/libid3tag/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = co.losno.MAD;