Fix VGM metadata and properties reading
parent
cb8fb9ce87
commit
258a88464a
|
@ -12,6 +12,7 @@
|
|||
17C8F3440CBED3BE008D969D /* GameDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C8F33E0CBED3BE008D969D /* GameDecoder.m */; };
|
||||
17C8F3C30CBED649008D969D /* GME.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17C8F3370CBED393008D969D /* GME.framework */; };
|
||||
17DA34BB0CC052030003F6B2 /* GameMetadataReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 17DA34B90CC052030003F6B2 /* GameMetadataReader.m */; };
|
||||
8319C750237629D400BFFAE0 /* GamePropertiesReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 8319C74F237629D400BFFAE0 /* GamePropertiesReader.m */; };
|
||||
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
@ -59,6 +60,8 @@
|
|||
17DA34B80CC052030003F6B2 /* GameMetadataReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMetadataReader.h; sourceTree = "<group>"; };
|
||||
17DA34B90CC052030003F6B2 /* GameMetadataReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameMetadataReader.m; sourceTree = "<group>"; };
|
||||
32DBCF630370AF2F00C91783 /* GME_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GME_Prefix.pch; sourceTree = "<group>"; };
|
||||
8319C74E237629D300BFFAE0 /* GamePropertiesReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamePropertiesReader.h; sourceTree = "<group>"; };
|
||||
8319C74F237629D400BFFAE0 /* GamePropertiesReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GamePropertiesReader.m; sourceTree = "<group>"; };
|
||||
833F68351CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
835C888F22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
8384912E1808175400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = "<group>"; };
|
||||
|
@ -114,15 +117,17 @@
|
|||
08FB77AFFE84173DC02AAC07 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
83FAF8A518ADD4D100057CAF /* PlaylistController.h */,
|
||||
8384912E1808175400E7332D /* Logging.h */,
|
||||
17C8F3470CBED3C7008D969D /* Plugin.h */,
|
||||
17C8F33B0CBED3BE008D969D /* GameContainer.h */,
|
||||
17C8F33C0CBED3BE008D969D /* GameContainer.m */,
|
||||
17C8F33D0CBED3BE008D969D /* GameDecoder.h */,
|
||||
17C8F33E0CBED3BE008D969D /* GameDecoder.m */,
|
||||
17DA34B80CC052030003F6B2 /* GameMetadataReader.h */,
|
||||
17DA34B90CC052030003F6B2 /* GameMetadataReader.m */,
|
||||
8319C74E237629D300BFFAE0 /* GamePropertiesReader.h */,
|
||||
8319C74F237629D400BFFAE0 /* GamePropertiesReader.m */,
|
||||
8384912E1808175400E7332D /* Logging.h */,
|
||||
83FAF8A518ADD4D100057CAF /* PlaylistController.h */,
|
||||
17C8F3470CBED3C7008D969D /* Plugin.h */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
|
@ -260,6 +265,7 @@
|
|||
17C8F3420CBED3BE008D969D /* GameContainer.m in Sources */,
|
||||
17C8F3440CBED3BE008D969D /* GameDecoder.m in Sources */,
|
||||
17DA34BB0CC052030003F6B2 /* GameMetadataReader.m in Sources */,
|
||||
8319C750237629D400BFFAE0 /* GamePropertiesReader.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// GamePropertiesReader.h
|
||||
// GME
|
||||
//
|
||||
// Created by Christopher Snowhill on 11/08/19.
|
||||
// Copyright 2019 __LoSnoCo__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "Plugin.h"
|
||||
|
||||
@interface GamePropertiesReader : NSObject <CogPropertiesReader> {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// VGMPropertiesReader.m
|
||||
// VGMStream
|
||||
//
|
||||
// Created by Christopher Snowhill on 10/18/19.
|
||||
// Copyright 2019 __LoSnoCo__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GamePropertiesReader.h"
|
||||
#import "GameDecoder.h"
|
||||
|
||||
@implementation GamePropertiesReader
|
||||
|
||||
+ (NSArray *)fileTypes
|
||||
{
|
||||
return [GameDecoder fileTypes];
|
||||
}
|
||||
|
||||
+ (NSArray *)mimeTypes
|
||||
{
|
||||
return [GameDecoder mimeTypes];
|
||||
}
|
||||
|
||||
+ (float)priority
|
||||
{
|
||||
return [GameDecoder priority];
|
||||
}
|
||||
|
||||
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
|
||||
{
|
||||
GameDecoder * decoder = [[GameDecoder alloc] init];
|
||||
|
||||
NSDictionary * properties = [NSDictionary dictionary];
|
||||
|
||||
if ([decoder open:source])
|
||||
{
|
||||
properties = [decoder properties];
|
||||
|
||||
[decoder close];
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue