Skip to content

Commit

Permalink
More UTi work-arounds for VLC UTIs.
Browse files Browse the repository at this point in the history
Bump the version number of the spotlight importer.
  • Loading branch information
MaddTheSane committed Nov 13, 2016
1 parent 9252239 commit a6c64c7
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Cocoa-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,10 @@
<string>net.sourceforge.playerpro.med</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<array>
<string>MED </string>
</array>
<key>public.filename-extension</key>
<array>
<string>med</string>
Expand Down
6 changes: 3 additions & 3 deletions MADDriver.source/iOS-PlugImport.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static const iPlugInfo iOSPlugInfo[] = {
.type = "IT ",
.version = PLUGVERS(2, 0, 0, 0),
.mode = MADPlugImport,
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.it"), NULL},
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.it"), CFSTR("org.videolan.it"), NULL},
},
#endif
{
Expand Down Expand Up @@ -140,7 +140,7 @@ static const iPlugInfo iOSPlugInfo[] = {
.type = "S3M ",
.version = PLUGVERS(2, 0, 0, 0),
.mode = MADPlugImportExport,
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.s3m"), NULL},
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.s3m"), CFSTR("org.videolan.s3m"), NULL},
},
{
.IOPlug = mainULT,
Expand Down Expand Up @@ -170,7 +170,7 @@ static const iPlugInfo iOSPlugInfo[] = {
.type = "XM ",
.version = PLUGVERS(2, 0, 0, 0),
.mode = MADPlugImportExport,
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.xm"), NULL},
.UTITypes = (CFStringRef[]){CFSTR("net.sourceforge.playerpro.xm"), CFSTR("org.videolan.xm"), NULL},
}
};

Expand Down
2 changes: 2 additions & 0 deletions PlayerPRO 6/Resources/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PPITFile = "ImpulseTracker Audio";
PPAMFFile = "AMF Tracker Audio";
PP669File = "669 Tracker Audio";
PPOKTAFile = "OKTAmed Tracker Audio";
PPMEDFile = "MED Tracker Audio";

PPXIFile = "FastTracker Instrument";
PPMINsFile = "PlayerPRO Instrument";
Expand All @@ -42,6 +43,7 @@ PPExtImpBundle = "PlayerPRO 6 Complex Import Plug-in";
"net.sourceforge.playerpro.amf" = "AMF Tracker Audio";
"net.sourceforge.playerpro.669" = "669 Tracker Audio";
"net.sourceforge.playerpro.okta" = "OKTAmed Tracker Audio";
"net.sourceforge.playerpro.med" = "MED Tracker Audio";

"com.quadmation.playerpro.mad" = "PlayerPRO MAD Tracker";
"com.quadmation.playerpro.madfg" = "PlayerPRO MAD-fg Tracker";
Expand Down
41 changes: 41 additions & 0 deletions PlayerPRO Player/PlayerPRO Player-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,28 @@
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>med</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MED</string>
<key>CFBundleTypeName</key>
<string>PPMEDFile</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>MED </string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>net.sourceforge.playerpro.med</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
Expand Down Expand Up @@ -841,6 +863,25 @@
</array>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>net.sourceforge.playerpro.tracker</string>
</array>
<key>UTTypeIdentifier</key>
<string>net.sourceforge.playerpro.med</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<array>
<string>MED </string>
</array>
<key>public.filename-extension</key>
<array>
<string>med</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions PlayerPRO Player/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ PPITFile = "ImpulseTracker Audio";
PPAMFFile = "AMF Tracker Audio";
PP669File = "669 Tracker Audio";
PPOKTAFile = "OKTAmed Tracker Audio";
PPMEDFile = "MED Tracker Audio";

PPMADFile = "PlayerPRO MAD Tracker";
PPMADFGFile = "PlayerPRO MADfg Tracker";
Expand All @@ -34,6 +35,7 @@ PPImpExpBundle = "PlayerPRO Import/Export PlugIn";
"net.sourceforge.playerpro.amf" = "AMF Tracker Audio";
"net.sourceforge.playerpro.669" = "669 Tracker Audio";
"net.sourceforge.playerpro.okta" = "OKTAmed Tracker Audio";
"net.sourceforge.playerpro.med" = "MED Tracker Audio";

"com.quadmation.playerpro.mad" = "PlayerPRO MAD Tracker";
"com.quadmation.playerpro.madfg" = "PlayerPRO MAD-fg Tracker";
Expand Down
22 changes: 11 additions & 11 deletions Shared/PlugInInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
import Cocoa

func ==(lhs: PlugInInfo, rhs: PlugInInfo) -> Bool {
if (lhs === rhs) {
return true;
if lhs === rhs {
return true
}

if (lhs.plugName != rhs.plugName) {
return false;
} else if (lhs.authorName != rhs.authorName) {
return false;
} else if (lhs.plugType != rhs.plugType) {
return false;
if lhs.plugName != rhs.plugName {
return false
} else if lhs.authorName != rhs.authorName {
return false
} else if lhs.plugType != rhs.plugType {
return false
} else {
return true;
return true
}
}

Expand Down Expand Up @@ -65,13 +65,13 @@ final class PlugInInfo: Hashable, CustomDebugStringConvertible, CustomStringConv
}

if (object === self) {
return true;
return true
}

if let unwrapped = object as? PlugInInfo {
return self == unwrapped
} else {
return false;
return false
}
}
}
27 changes: 24 additions & 3 deletions Spotlight Plug-in/PPImport-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
<string>net.sourceforge.playerpro.it</string>
<string>net.sourceforge.playerpro.mtm</string>
<string>net.sourceforge.playerpro.amf</string>
<string>net.sourceforge.playerpro.med</string>
<string>org.videolan.s3m</string>
<string>org.videolan.it</string>
<string>org.videolan.mod</string>
</array>
</dict>
</array>
Expand All @@ -42,9 +44,9 @@
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleShortVersionString</key>
<string>1.6.1</string>
<string>1.6.2</string>
<key>CFBundleVersion</key>
<string>1.6.1</string>
<string>1.6.2</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
Expand All @@ -63,7 +65,7 @@
</dict>
<key>CFPlugInUnloadFunction</key>
<string></string>
<key>UTExportedTypeDeclarations</key>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
Expand Down Expand Up @@ -412,6 +414,25 @@
</array>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>net.sourceforge.playerpro.tracker</string>
</array>
<key>UTTypeIdentifier</key>
<string>net.sourceforge.playerpro.med</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<array>
<string>MED </string>
</array>
<key>public.filename-extension</key>
<array>
<string>med</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
7 changes: 4 additions & 3 deletions Spotlight Plug-in/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* Localized versions of Info.plist keys */

CFBundleShortVersionString = "1.6.1";
CFBundleGetInfoString = "PlayerPRO Importer version 1.6.1, Copyright © 2013-2015 SourceForge.";
NSHumanReadableCopyright = "Copyright © 2013-2015 SourceForge.";
CFBundleShortVersionString = "1.6.2";
CFBundleGetInfoString = "PlayerPRO Importer version 1.6.2, Copyright © 2013-2016 SourceForge.";
NSHumanReadableCopyright = "Copyright © 2013-2016 SourceForge.";

"PPMTMFile" = "MultiTracker Audio";
"PPS3MFile" = "ScreamTracker Audio";
Expand Down Expand Up @@ -30,6 +30,7 @@ NSHumanReadableCopyright = "Copyright © 2013-2015 SourceForge.";
"net.sourceforge.playerpro.amf" = "AMF Tracker Audio";
"net.sourceforge.playerpro.669" = "669 Tracker Audio";
"net.sourceforge.playerpro.okta" = "OKTAmed Tracker Audio";
"net.sourceforge.playerpro.med" = "MED Tracker Audio";

"com.quadmation.playerpro.mad" = "PlayerPRO MAD Tracker";
"com.quadmation.playerpro.madfg" = "PlayerPRO MAD-fg Tracker";
Expand Down
76 changes: 76 additions & 0 deletions Spotlight Plug-in/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,81 @@
</displayattrs>
</type>

<!-- VLC UTIs, because VLC is a dumb-dumb -->
<type name="org.videolan.s3m">
<allattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_instumentlist
net_sourceforge_playerpro_tracker_patternlist
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</allattrs>
<displayattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</displayattrs>
</type>

<type name="org.videolan.it">
<allattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_instumentlist
net_sourceforge_playerpro_tracker_patternlist
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</allattrs>
<displayattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</displayattrs>
</type>

<type name="org.videolan.mod">
<allattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_instumentlist
net_sourceforge_playerpro_tracker_patternlist
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</allattrs>
<displayattrs>
kMDItemTitle
kMDItemDurationSeconds
kMDItemCodecs
net_sourceforge_playerpro_tracker_partitionlength
net_sourceforge_playerpro_tracker_totalpatterns
net_sourceforge_playerpro_tracker_totalinstruments
net_sourceforge_playerpro_tracker_totaltracks
net_sourceforge_playerpro_tracker_formatdescription
</displayattrs>
</type>

</types>
</schema>

0 comments on commit a6c64c7

Please sign in to comment.