Skip to content

Commit

Permalink
Merge pull request #282 from griff/fix/universal-build-of-thirdparty-…
Browse files Browse the repository at this point in the history
…binaries

Fix/universal build of thirdparty binaries
  • Loading branch information
griff authored Dec 8, 2024
2 parents e412873 + a5c6b06 commit 1571b27
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
2 changes: 2 additions & 0 deletions MetaZ.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
32CA4F630368D1EE00C91783 /* MetaZ_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MetaZ_Prefix.pch; path = App/MetaZ_Prefix.pch; sourceTree = "<group>"; };
7F2C885E2CF62FD2000A3FA1 /* mp4chaps build notes.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mp4chaps build notes.txt"; sourceTree = "<group>"; };
7F4F84D518CD1F8000D002DA /* NSString+NumericCompare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+NumericCompare.h"; sourceTree = "<group>"; };
7F4F84D618CD1F8000D002DA /* NSString+NumericCompare.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+NumericCompare.m"; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = App/Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1769,6 +1770,7 @@
1BEA6E87106EF40C004B1A7F /* Resources */ = {
isa = PBXGroup;
children = (
7F2C885E2CF62FD2000A3FA1 /* mp4chaps build notes.txt */,
1B44949810D57D6900B9C751 /* AtomicParsley */,
1B040C13107F9DA20027FA0D /* mp4chaps */,
1BEA6E8D106EF522004B1A7F /* Info.plist */,
Expand Down
Binary file modified Plugins/AtomicParsley/resources/AtomicParsley
Binary file not shown.
Binary file modified Plugins/AtomicParsley/resources/mp4chaps
Binary file not shown.
8 changes: 8 additions & 0 deletions Plugins/AtomicParsley/resources/mp4chaps build notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The code with related MetaZ changes for this version can be found on github at this location:

https://github.com/jmcintyre/mp4v2/commit/046e93ca495e9d2dd96f905f0e9c9aa2619486b2

The build was performed as follows:

cmake -DBUILD_SHARED=OFF .
make
36 changes: 28 additions & 8 deletions Plugins/AtomicParsley/src/AtomicParsleyPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ - (id)init
//@"contentRating",
@"genre",
/*@"album", @"albumArtist",*/ @"purchaseDate", @"description",
@"longDescription",
@"longdesc",
@"TVShowName", @"TVEpisode",
@"TVSeasonNum", @"TVEpisodeNum", @"TVNetwork", @"podcastURL",
@"podcastGUID",@"category", @"keyword", @"advisory",
Expand Down Expand Up @@ -466,13 +466,33 @@ - (void)parseData:(NSData *)data withFileName:(NSString *)fileName dict:(NSMutab
NSMutableDictionary* dict = [NSMutableDictionary dictionaryWithCapacity:[atoms count]];
for(NSString* atom in atoms)
{
NSRange split = [atom rangeOfString:@"\" contains: "];
if(split.location == NSNotFound)
continue;
NSString* type = [atom substringToIndex:split.location];
NSString* content = [[atom substringFromIndex:split.location+split.length]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
[dict setObject:content forKey:type];
// Example reverse dns:
// ----" [com.apple.iTunes;iTunEXTC] contains: mpaa|PG-13|300|
if( atom.length > 7 && [[atom substringToIndex:7] compare:@"----\" ["] == NSOrderedSame )
{
NSRange split = [atom rangeOfString:@"] contains: "];
if( split.location != NSNotFound )
{
NSRange typeRange = {7, split.location - 7};
NSString* type = [atom substringWithRange:typeRange];
NSString* content = [[atom substringFromIndex:split.location+split.length]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
[dict setObject:content forKey:type];
}
}
// Example standard:
// gnre" contains: Comedy
else
{
NSRange split = [atom rangeOfString:@"\" contains: "];
if( split.location != NSNotFound )
{
NSString* type = [atom substringToIndex:split.location];
NSString* content = [[atom substringFromIndex:split.location+split.length]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
[dict setObject:content forKey:type];
}
}
}

// Initialize a null value for all known keys
Expand Down

0 comments on commit 1571b27

Please sign in to comment.