...
 
Commits (16)
...@@ -13,29 +13,39 @@ ...@@ -13,29 +13,39 @@
7D0EF52A170885130003ED47 /* MLFileParserQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51B170885130003ED47 /* MLFileParserQueue.m */; }; 7D0EF52A170885130003ED47 /* MLFileParserQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51B170885130003ED47 /* MLFileParserQueue.m */; };
7D0EF52B170885130003ED47 /* MLLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51C170885130003ED47 /* MLLabel.m */; }; 7D0EF52B170885130003ED47 /* MLLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51C170885130003ED47 /* MLLabel.m */; };
7D0EF52C170885130003ED47 /* MLMediaLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51D170885130003ED47 /* MLMediaLibrary.m */; }; 7D0EF52C170885130003ED47 /* MLMediaLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51D170885130003ED47 /* MLMediaLibrary.m */; };
7D0EF52D170885130003ED47 /* MLMovieInfoGrabber.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51E170885130003ED47 /* MLMovieInfoGrabber.m */; };
7D0EF52E170885130003ED47 /* MLShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51F170885130003ED47 /* MLShow.m */; }; 7D0EF52E170885130003ED47 /* MLShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51F170885130003ED47 /* MLShow.m */; };
7D0EF52F170885130003ED47 /* MLShowEpisode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF520170885130003ED47 /* MLShowEpisode.m */; }; 7D0EF52F170885130003ED47 /* MLShowEpisode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF520170885130003ED47 /* MLShowEpisode.m */; };
7D0EF530170885130003ED47 /* MLThumbnailerQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF522170885130003ED47 /* MLThumbnailerQueue.m */; }; 7D0EF530170885130003ED47 /* MLThumbnailerQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF522170885130003ED47 /* MLThumbnailerQueue.m */; };
7D0EF531170885130003ED47 /* MLTitleDecrapifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF523170885130003ED47 /* MLTitleDecrapifier.m */; }; 7D0EF531170885130003ED47 /* MLTitleDecrapifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF523170885130003ED47 /* MLTitleDecrapifier.m */; };
7D0EF532170885130003ED47 /* MLTVShowEpisodesInfoGrabber.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF524170885130003ED47 /* MLTVShowEpisodesInfoGrabber.m */; };
7D0EF533170885130003ED47 /* MLTVShowInfoGrabber.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF525170885130003ED47 /* MLTVShowInfoGrabber.m */; };
7D0EF534170885130003ED47 /* MLURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF526170885130003ED47 /* MLURLConnection.m */; }; 7D0EF534170885130003ED47 /* MLURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF526170885130003ED47 /* MLURLConnection.m */; };
7D0EF535170885130003ED47 /* NSXMLNode_Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF527170885130003ED47 /* NSXMLNode_Additions.m */; };
7D0EF551170885230003ED47 /* CXMLDocument_CreationExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF53A170885230003ED47 /* CXMLDocument_CreationExtensions.m */; };
7D0EF552170885230003ED47 /* CXMLNode_CreationExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF53C170885230003ED47 /* CXMLNode_CreationExtensions.m */; };
7D0EF553170885230003ED47 /* CXMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF53E170885230003ED47 /* CXMLDocument.m */; };
7D0EF554170885230003ED47 /* CXMLDocument_PrivateExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF540170885230003ED47 /* CXMLDocument_PrivateExtensions.m */; };
7D0EF555170885230003ED47 /* CXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF542170885230003ED47 /* CXMLElement.m */; };
7D0EF556170885230003ED47 /* CXMLElement_CreationExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF544170885230003ED47 /* CXMLElement_CreationExtensions.m */; };
7D0EF557170885230003ED47 /* CXMLElement_ElementTreeExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF546170885230003ED47 /* CXMLElement_ElementTreeExtensions.m */; };
7D0EF558170885230003ED47 /* CXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF548170885230003ED47 /* CXMLNode.m */; };
7D0EF559170885230003ED47 /* CXMLNode_PrivateExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF54A170885230003ED47 /* CXMLNode_PrivateExtensions.m */; };
7D0EF55A170885230003ED47 /* CXMLNode_XPathExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF54C170885230003ED47 /* CXMLNode_XPathExtensions.m */; };
7D0EF55B170885230003ED47 /* CTidy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF54F170885230003ED47 /* CTidy.m */; };
7D201AC81B186724009AC64E /* UIImage+MLKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D201AC71B186724009AC64E /* UIImage+MLKit.m */; }; 7D201AC81B186724009AC64E /* UIImage+MLKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D201AC71B186724009AC64E /* UIImage+MLKit.m */; };
7D8ECFE21708FEAE00A989E9 /* CXHTMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D8ECFE11708FEAE00A989E9 /* CXHTMLDocument.m */; }; 7D84E4E71B42BA9900EA7D1F /* MLFileEntityMappingPolicy_2_5_to_2_6.m in Sources */ = {isa = PBXBuildFile; fileRef = DDC57DFA1AFD0B5000DBAEF7 /* MLFileEntityMappingPolicy_2_5_to_2_6.m */; };
7D8ECFE51708FEC000A989E9 /* CXMLNamespaceNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D8ECFE41708FEC000A989E9 /* CXMLNamespaceNode.m */; }; 7D84E4E81B42BA9900EA7D1F /* MLCrashPreventer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF518170885130003ED47 /* MLCrashPreventer.m */; };
7D84E4E91B42BA9900EA7D1F /* MLFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF519170885130003ED47 /* MLFile.m */; };
7D84E4EA1B42BA9900EA7D1F /* MLFileParserQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51B170885130003ED47 /* MLFileParserQueue.m */; };
7D84E4EB1B42BA9900EA7D1F /* MediaLibrary.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = DDC7BFAA1B03825F00160878 /* MediaLibrary.xcdatamodeld */; };
7D84E4EC1B42BA9900EA7D1F /* MLLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51C170885130003ED47 /* MLLabel.m */; };
7D84E4ED1B42BA9900EA7D1F /* MLMediaLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51D170885130003ED47 /* MLMediaLibrary.m */; };
7D84E4EF1B42BA9900EA7D1F /* MLShow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF51F170885130003ED47 /* MLShow.m */; };
7D84E4F01B42BA9900EA7D1F /* MLShowEpisode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF520170885130003ED47 /* MLShowEpisode.m */; };
7D84E4F11B42BA9900EA7D1F /* MappingModel_2_5_to_2_6.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = DDB959381AFBAD8700BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel */; };
7D84E4F21B42BA9900EA7D1F /* MLThumbnailerQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF522170885130003ED47 /* MLThumbnailerQueue.m */; };
7D84E4F31B42BA9900EA7D1F /* MLTitleDecrapifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF523170885130003ED47 /* MLTitleDecrapifier.m */; };
7D84E4F61B42BA9900EA7D1F /* MLURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0EF526170885130003ED47 /* MLURLConnection.m */; };
7D84E4F71B42BA9900EA7D1F /* MLAlbumTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238517AEEA13008485E5 /* MLAlbumTrack.m */; };
7D84E4F81B42BA9900EA7D1F /* MLAlbum.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238717AEEA71008485E5 /* MLAlbum.m */; };
7D84E4FE1B42BA9900EA7D1F /* UIImage+MLKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D201AC71B186724009AC64E /* UIImage+MLKit.m */; };
7D84E5021B42BA9900EA7D1F /* MLMediaLibrary+Migration.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB959361AFB9B2B00BB8CFF /* MLMediaLibrary+Migration.m */; };
7D84E50A1B42BA9900EA7D1F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D0EF4A1170883940003ED47 /* Foundation.framework */; };
7D84E50C1B42BA9900EA7D1F /* MLAlbum.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D9E238117AEE9F2008485E5 /* MLAlbum.h */; };
7D84E50D1B42BA9900EA7D1F /* MLAlbumTrack.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D9E238417AEEA13008485E5 /* MLAlbumTrack.h */; };
7D84E50E1B42BA9900EA7D1F /* MediaLibraryKit.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF510170885130003ED47 /* MediaLibraryKit.h */; };
7D84E50F1B42BA9900EA7D1F /* MLFile.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF511170885130003ED47 /* MLFile.h */; };
7D84E5101B42BA9900EA7D1F /* MLLabel.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF512170885130003ED47 /* MLLabel.h */; };
7D84E5111B42BA9900EA7D1F /* MLMediaLibrary.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF513170885130003ED47 /* MLMediaLibrary.h */; };
7D84E5121B42BA9900EA7D1F /* MLShow.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF514170885130003ED47 /* MLShow.h */; };
7D84E5131B42BA9900EA7D1F /* MLShowEpisode.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF515170885130003ED47 /* MLShowEpisode.h */; };
7D84E5141B42BA9900EA7D1F /* MLThumbnailerQueue.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D0EF521170885130003ED47 /* MLThumbnailerQueue.h */; };
7D9E238617AEEA13008485E5 /* MLAlbumTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238517AEEA13008485E5 /* MLAlbumTrack.m */; }; 7D9E238617AEEA13008485E5 /* MLAlbumTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238517AEEA13008485E5 /* MLAlbumTrack.m */; };
7D9E238817AEEA71008485E5 /* MLAlbum.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238717AEEA71008485E5 /* MLAlbum.m */; }; 7D9E238817AEEA71008485E5 /* MLAlbum.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9E238717AEEA71008485E5 /* MLAlbum.m */; };
7D9E238917AF0711008485E5 /* MLAlbum.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D9E238117AEE9F2008485E5 /* MLAlbum.h */; }; 7D9E238917AF0711008485E5 /* MLAlbum.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 7D9E238117AEE9F2008485E5 /* MLAlbum.h */; };
...@@ -73,6 +83,25 @@ ...@@ -73,6 +83,25 @@
name = "Copy Files"; name = "Copy Files";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
7D84E50B1B42BA9900EA7D1F /* Copy Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/${PRODUCT_NAME}";
dstSubfolderSpec = 16;
files = (
7D84E50C1B42BA9900EA7D1F /* MLAlbum.h in Copy Files */,
7D84E50D1B42BA9900EA7D1F /* MLAlbumTrack.h in Copy Files */,
7D84E50E1B42BA9900EA7D1F /* MediaLibraryKit.h in Copy Files */,
7D84E50F1B42BA9900EA7D1F /* MLFile.h in Copy Files */,
7D84E5101B42BA9900EA7D1F /* MLLabel.h in Copy Files */,
7D84E5111B42BA9900EA7D1F /* MLMediaLibrary.h in Copy Files */,
7D84E5121B42BA9900EA7D1F /* MLShow.h in Copy Files */,
7D84E5131B42BA9900EA7D1F /* MLShowEpisode.h in Copy Files */,
7D84E5141B42BA9900EA7D1F /* MLThumbnailerQueue.h in Copy Files */,
);
name = "Copy Files";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -134,6 +163,7 @@ ...@@ -134,6 +163,7 @@
7D0EF550170885230003ED47 /* TouchXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchXML.h; sourceTree = "<group>"; }; 7D0EF550170885230003ED47 /* TouchXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchXML.h; sourceTree = "<group>"; };
7D201AC61B186724009AC64E /* UIImage+MLKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MLKit.h"; sourceTree = "<group>"; }; 7D201AC61B186724009AC64E /* UIImage+MLKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MLKit.h"; sourceTree = "<group>"; };
7D201AC71B186724009AC64E /* UIImage+MLKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MLKit.m"; sourceTree = "<group>"; }; 7D201AC71B186724009AC64E /* UIImage+MLKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MLKit.m"; sourceTree = "<group>"; };
7D84E5181B42BA9900EA7D1F /* libMediaLibraryKit-readonly.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libMediaLibraryKit-readonly.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7D8ECFE01708FEAE00A989E9 /* CXHTMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXHTMLDocument.h; sourceTree = "<group>"; }; 7D8ECFE01708FEAE00A989E9 /* CXHTMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXHTMLDocument.h; sourceTree = "<group>"; };
7D8ECFE11708FEAE00A989E9 /* CXHTMLDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CXHTMLDocument.m; sourceTree = "<group>"; }; 7D8ECFE11708FEAE00A989E9 /* CXHTMLDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CXHTMLDocument.m; sourceTree = "<group>"; };
7D8ECFE31708FEC000A989E9 /* CXMLNamespaceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXMLNamespaceNode.h; sourceTree = "<group>"; }; 7D8ECFE31708FEC000A989E9 /* CXMLNamespaceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXMLNamespaceNode.h; sourceTree = "<group>"; };
...@@ -161,6 +191,14 @@ ...@@ -161,6 +191,14 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
7D84E5091B42BA9900EA7D1F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7D84E50A1B42BA9900EA7D1F /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
...@@ -183,6 +221,7 @@ ...@@ -183,6 +221,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
7D0EF49E170883940003ED47 /* libMediaLibraryKit.a */, 7D0EF49E170883940003ED47 /* libMediaLibraryKit.a */,
7D84E5181B42BA9900EA7D1F /* libMediaLibraryKit-readonly.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -353,6 +392,23 @@ ...@@ -353,6 +392,23 @@
productReference = 7D0EF49E170883940003ED47 /* libMediaLibraryKit.a */; productReference = 7D0EF49E170883940003ED47 /* libMediaLibraryKit.a */;
productType = "com.apple.product-type.library.static"; productType = "com.apple.product-type.library.static";
}; };
7D84E4E51B42BA9900EA7D1F /* MediaLibraryKit-readonly */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D84E5151B42BA9900EA7D1F /* Build configuration list for PBXNativeTarget "MediaLibraryKit-readonly" */;
buildPhases = (
7D84E4E61B42BA9900EA7D1F /* Sources */,
7D84E5091B42BA9900EA7D1F /* Frameworks */,
7D84E50B1B42BA9900EA7D1F /* Copy Files */,
);
buildRules = (
);
dependencies = (
);
name = "MediaLibraryKit-readonly";
productName = MediaLibraryKit;
productReference = 7D84E5181B42BA9900EA7D1F /* libMediaLibraryKit-readonly.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
...@@ -375,6 +431,7 @@ ...@@ -375,6 +431,7 @@
projectRoot = ""; projectRoot = "";
targets = ( targets = (
7D0EF49D170883940003ED47 /* MediaLibraryKit */, 7D0EF49D170883940003ED47 /* MediaLibraryKit */,
7D84E4E51B42BA9900EA7D1F /* MediaLibraryKit-readonly */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -391,33 +448,40 @@ ...@@ -391,33 +448,40 @@
DDC7BFAE1B03825F00160878 /* MediaLibrary.xcdatamodeld in Sources */, DDC7BFAE1B03825F00160878 /* MediaLibrary.xcdatamodeld in Sources */,
7D0EF52B170885130003ED47 /* MLLabel.m in Sources */, 7D0EF52B170885130003ED47 /* MLLabel.m in Sources */,
7D0EF52C170885130003ED47 /* MLMediaLibrary.m in Sources */, 7D0EF52C170885130003ED47 /* MLMediaLibrary.m in Sources */,
7D0EF52D170885130003ED47 /* MLMovieInfoGrabber.m in Sources */,
7D0EF52E170885130003ED47 /* MLShow.m in Sources */, 7D0EF52E170885130003ED47 /* MLShow.m in Sources */,
7D0EF52F170885130003ED47 /* MLShowEpisode.m in Sources */, 7D0EF52F170885130003ED47 /* MLShowEpisode.m in Sources */,
DDB959391AFBAD8700BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel in Sources */, DDB959391AFBAD8700BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel in Sources */,
7D0EF530170885130003ED47 /* MLThumbnailerQueue.m in Sources */, 7D0EF530170885130003ED47 /* MLThumbnailerQueue.m in Sources */,
7D0EF531170885130003ED47 /* MLTitleDecrapifier.m in Sources */, 7D0EF531170885130003ED47 /* MLTitleDecrapifier.m in Sources */,
7D0EF532170885130003ED47 /* MLTVShowEpisodesInfoGrabber.m in Sources */,
7D0EF533170885130003ED47 /* MLTVShowInfoGrabber.m in Sources */,
7D0EF534170885130003ED47 /* MLURLConnection.m in Sources */, 7D0EF534170885130003ED47 /* MLURLConnection.m in Sources */,
7D9E238617AEEA13008485E5 /* MLAlbumTrack.m in Sources */, 7D9E238617AEEA13008485E5 /* MLAlbumTrack.m in Sources */,
7D9E238817AEEA71008485E5 /* MLAlbum.m in Sources */, 7D9E238817AEEA71008485E5 /* MLAlbum.m in Sources */,
7D0EF535170885130003ED47 /* NSXMLNode_Additions.m in Sources */,
7D0EF551170885230003ED47 /* CXMLDocument_CreationExtensions.m in Sources */,
7D0EF552170885230003ED47 /* CXMLNode_CreationExtensions.m in Sources */,
7D0EF553170885230003ED47 /* CXMLDocument.m in Sources */,
7D0EF554170885230003ED47 /* CXMLDocument_PrivateExtensions.m in Sources */,
7D201AC81B186724009AC64E /* UIImage+MLKit.m in Sources */, 7D201AC81B186724009AC64E /* UIImage+MLKit.m in Sources */,
7D0EF555170885230003ED47 /* CXMLElement.m in Sources */,
7D0EF556170885230003ED47 /* CXMLElement_CreationExtensions.m in Sources */,
7D0EF557170885230003ED47 /* CXMLElement_ElementTreeExtensions.m in Sources */,
DDB959371AFB9B2B00BB8CFF /* MLMediaLibrary+Migration.m in Sources */, DDB959371AFB9B2B00BB8CFF /* MLMediaLibrary+Migration.m in Sources */,
7D0EF558170885230003ED47 /* CXMLNode.m in Sources */, );
7D0EF559170885230003ED47 /* CXMLNode_PrivateExtensions.m in Sources */, runOnlyForDeploymentPostprocessing = 0;
7D0EF55A170885230003ED47 /* CXMLNode_XPathExtensions.m in Sources */, };
7D0EF55B170885230003ED47 /* CTidy.m in Sources */, 7D84E4E61B42BA9900EA7D1F /* Sources */ = {
7D8ECFE21708FEAE00A989E9 /* CXHTMLDocument.m in Sources */, isa = PBXSourcesBuildPhase;
7D8ECFE51708FEC000A989E9 /* CXMLNamespaceNode.m in Sources */, buildActionMask = 2147483647;
files = (
7D84E4E71B42BA9900EA7D1F /* MLFileEntityMappingPolicy_2_5_to_2_6.m in Sources */,
7D84E4E81B42BA9900EA7D1F /* MLCrashPreventer.m in Sources */,
7D84E4E91B42BA9900EA7D1F /* MLFile.m in Sources */,
7D84E4EA1B42BA9900EA7D1F /* MLFileParserQueue.m in Sources */,
7D84E4EB1B42BA9900EA7D1F /* MediaLibrary.xcdatamodeld in Sources */,
7D84E4EC1B42BA9900EA7D1F /* MLLabel.m in Sources */,
7D84E4ED1B42BA9900EA7D1F /* MLMediaLibrary.m in Sources */,
7D84E4EF1B42BA9900EA7D1F /* MLShow.m in Sources */,
7D84E4F01B42BA9900EA7D1F /* MLShowEpisode.m in Sources */,
7D84E4F11B42BA9900EA7D1F /* MappingModel_2_5_to_2_6.xcmappingmodel in Sources */,
7D84E4F21B42BA9900EA7D1F /* MLThumbnailerQueue.m in Sources */,
7D84E4F31B42BA9900EA7D1F /* MLTitleDecrapifier.m in Sources */,
7D84E4F61B42BA9900EA7D1F /* MLURLConnection.m in Sources */,
7D84E4F71B42BA9900EA7D1F /* MLAlbumTrack.m in Sources */,
7D84E4F81B42BA9900EA7D1F /* MLAlbum.m in Sources */,
7D84E4FE1B42BA9900EA7D1F /* UIImage+MLKit.m in Sources */,
7D84E5021B42BA9900EA7D1F /* MLMediaLibrary+Migration.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -532,6 +596,59 @@ ...@@ -532,6 +596,59 @@
}; };
name = Release; name = Release;
}; };
7D84E5161B42BA9900EA7D1F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
armv7s,
);
CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/MediaLibraryKit.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = MediaLibraryKit_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
MLKIT_READONLY_TARGET,
);
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/External/MobileVLCKit/include\"",
/usr/include/libxml2,
);
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/External/MobileVLCKit\"";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "MediaLibraryKit-readonly";
SKIP_INSTALL = YES;
};
name = Debug;
};
7D84E5171B42BA9900EA7D1F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
armv7s,
);
CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/MediaLibraryKit.dst;
ENABLE_NS_ASSERTIONS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = MediaLibraryKit_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = MLKIT_READONLY_TARGET;
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/External/MobileVLCKit/include\"",
/usr/include/libxml2,
);
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/External/MobileVLCKit\"";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "MediaLibraryKit-readonly";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
...@@ -553,6 +670,15 @@ ...@@ -553,6 +670,15 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
7D84E5151B42BA9900EA7D1F /* Build configuration list for PBXNativeTarget "MediaLibraryKit-readonly" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D84E5161B42BA9900EA7D1F /* Debug */,
7D84E5171B42BA9900EA7D1F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCVersionGroup section */ /* Begin XCVersionGroup section */
......
...@@ -33,20 +33,16 @@ ...@@ -33,20 +33,16 @@
// FIXME // FIXME
#define HAVE_BLOCK 0 #define HAVE_BLOCK 0
#define NSXMLDocument CXMLDocument
#define NSXMLNode CXMLNode
#import "TouchXML.h"
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <MobileVLCKit/MobileVLCKit.h> #import <MobileVLCKit/MobileVLCKit.h>
#else #else
#define HAVE_BLOCK 1 #define HAVE_BLOCK 1
#import <VLCKit/VLCKit.h> #import <VLCKit/VLCKit.h>
#import "NSXMLNode_Additions.h"
#endif #endif
#import "NSXMLNode_Additions.h"
#import "UIImage+MLKit.h" #import "UIImage+MLKit.h"
#ifndef NDEBUG #ifndef NDEBUG
......
Version 2.5.5
-------------
* Stability improvements
Version 2.5.4
-------------
* Stability improvements
Version 2.5.3
-------------
* Stability improvements
Version 2.5.2
-------------
* Smaller library size by increased dead code stripping
* Added new target to create a read-only variant which
does not depend on VLCKit
Version 2.5.1 Version 2.5.1
------------- -------------
Added Public APIs: Added Public APIs:
......
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
+ (MLAlbum *)albumWithName:(NSString *)name + (MLAlbum *)albumWithName:(NSString *)name
{ {
NSFetchRequest *request = [[MLMediaLibrary sharedMediaLibrary] fetchRequestForEntity:@"Album"]; NSFetchRequest *request = [[MLMediaLibrary sharedMediaLibrary] fetchRequestForEntity:@"Album"];
if (!request)
return nil;
[request setPredicate:[NSPredicate predicateWithFormat:@"name == %@", name]]; [request setPredicate:[NSPredicate predicateWithFormat:@"name == %@", name]];
NSManagedObjectContext *moc = [[MLMediaLibrary sharedMediaLibrary] managedObjectContext]; NSManagedObjectContext *moc = [[MLMediaLibrary sharedMediaLibrary] managedObjectContext];
...@@ -100,11 +102,16 @@ ...@@ -100,11 +102,16 @@
NSMutableSet *tracks = [self mutableSetValueForKey:@"tracks"]; NSMutableSet *tracks = [self mutableSetValueForKey:@"tracks"];
[tracks removeObject:track]; @try {
[tracks removeObject:track];
[self willChangeValueForKey:@"tracks"]; [self willChangeValueForKey:@"tracks"];
[self setValue:tracks forKey:@"tracks"]; [self setValue:tracks forKey:@"tracks"];
[self didChangeValueForKey:@"tracks"]; [self didChangeValueForKey:@"tracks"];
}
@catch (NSException *exception) {
NSLog(@"removing track failed");
}
} }
- (void)removeTrackWithNumber:(NSNumber *)trackNumber - (void)removeTrackWithNumber:(NSNumber *)trackNumber
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
- (NSString *)relativePathForFullPath:(NSString *)fullPath - (NSString *)relativePathForFullPath:(NSString *)fullPath
{ {
NSArray *components = [fullPath componentsSeparatedByString:@"Documents"]; NSArray *components = [fullPath componentsSeparatedByString:@"Documents"];
return [components.lastObject stringByRemovingPercentEncoding]; // Note: stringByRemovingPercentEncoding is iOS 7+ only
return [components.lastObject stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
} }
@end @end
...@@ -34,6 +34,43 @@ ...@@ -34,6 +34,43 @@
#import <CommonCrypto/CommonDigest.h> // for MD5 #import <CommonCrypto/CommonDigest.h> // for MD5
#import "MLThumbnailerQueue.h" #import "MLThumbnailerQueue.h"
#ifdef MLKIT_READONLY_TARGET
@implementation MLFileParserQueue
+ (MLFileParserQueue *)sharedFileParserQueue
{
static MLFileParserQueue *shared = nil;
if (!shared) {
shared = [[MLFileParserQueue alloc] init];
}
return shared;
}
- (void)addFile:(MLFile *)file
{
}
- (void)setHighPriorityForFile:(MLFile *)file
{
}
- (void)setDefaultPriorityForFile:(MLFile *)file
{
}
- (void)stop
{
}
- (void)resume
{
}
@end
#else
@interface MLFileParserQueue () @interface MLFileParserQueue ()
{ {
NSDictionary *_fileDescriptionToOperation; NSDictionary *_fileDescriptionToOperation;
...@@ -105,7 +142,7 @@ ...@@ -105,7 +142,7 @@
_parsing = NO; _parsing = NO;
[_timeOutTimer invalidate]; [_timeOutTimer invalidate];
APLog(@"Parsed %@ - %lu tracks", media, [[_media tracksInformation] count]); APLog(@"Parsed %@ - %lu tracks", media, (unsigned long)[[_media tracksInformation] count]);
if (_media.delegate != self) if (_media.delegate != self)
return; return;
...@@ -165,27 +202,38 @@ ...@@ -165,27 +202,38 @@
MLAlbum *album = nil; MLAlbum *album = nil;
BOOL wasCreated = NO; BOOL wasCreated = NO;
MLAlbumTrack *track = [MLAlbumTrack trackWithAlbumName:albumName @try {
trackNumber:@([trackNumber integerValue]) MLAlbumTrack *track = [MLAlbumTrack trackWithAlbumName:albumName
trackName:title trackNumber:@([trackNumber integerValue])
createIfNeeded:YES trackName:title
wasCreated:&wasCreated]; createIfNeeded:YES
if (track) { wasCreated:&wasCreated];
album = track.album; if (track) {
track.title = title ? title : @""; album = track.album;
track.artist = artist ? artist : @""; track.title = title ? title : @"";
track.genre = genre ? genre : @""; track.artist = artist ? artist : @"";
album.releaseYear = releaseYear ? releaseYear : @""; track.genre = genre ? genre : @"";
album.releaseYear = releaseYear ? releaseYear : @"";
if (!track.title || [track.title isEqualToString:@""])
track.title = [MLTitleDecrapifier decrapify:file.title]; if (!track.title || [track.title isEqualToString:@""])
track.title = [MLTitleDecrapifier decrapify:file.title];
[track addFilesObject:file];
file.albumTrack = track; [track addFilesObject:file];
file.albumTrack = track;
}
}
@catch (NSException *exception) {
APLog(@"album track creation failed");
} }
} }
file.type = kMLFileTypeAudio; @try {
file.type = kMLFileTypeAudio;
}
@catch (NSException *exception) {
APLog(@"file type setting failed");
}
APLog(@"'%@' is an audio file, fetching artwork", file.title); APLog(@"'%@' is an audio file, fetching artwork", file.title);
NSString *artist, *albumName, *title; NSString *artist, *albumName, *title;
BOOL skipOperation = NO; BOOL skipOperation = NO;
...@@ -204,31 +252,40 @@ ...@@ -204,31 +252,40 @@
NSDictionary *poorMansContentInfo = [MLTitleDecrapifier audioContentInfoFromFile:file]; NSDictionary *poorMansContentInfo = [MLTitleDecrapifier audioContentInfoFromFile:file];
if (poorMansContentInfo) if (poorMansContentInfo)
title = poorMansContentInfo[VLCMetaInformationTitle]; title = poorMansContentInfo[VLCMetaInformationTitle];
file.title = title; @try {
file.title = title;
}
@catch (NSException *exception) {
APLog(@"file title setting failed");
}
} }
if (!skipOperation) { if (!skipOperation) {
NSString *artworkPath = [self artworkPathForMediaItemWithTitle:title Artist:artist andAlbumName:albumName]; @try {
if ([[NSFileManager defaultManager] fileExistsAtPath:artworkPath]) { NSString *artworkPath = [self artworkPathForMediaItemWithTitle:title Artist:artist andAlbumName:albumName];
file.computedThumbnail = [UIImage scaleImage:[UIImage imageWithContentsOfFile:artworkPath] if ([[NSFileManager defaultManager] fileExistsAtPath:artworkPath]) {
toFitRect:(CGRect){CGPointZero, [UIImage preferredThumbnailSizeForDevice]}]; file.computedThumbnail = [UIImage scaleImage:[UIImage imageWithContentsOfFile:artworkPath]
toFitRect:(CGRect){CGPointZero, [UIImage preferredThumbnailSizeForDevice]}];
}
if (file.computedThumbnail == nil)
file.albumTrack.containsArtwork = NO;
}
@catch (NSException *exception) {
APLog(@"file thumbnail setting failed");
} }
if (file.computedThumbnail == nil)
file.albumTrack.containsArtwork = NO;
} }
} else { } else {
MLMediaLibrary *sharedLibrary = [MLMediaLibrary sharedMediaLibrary]; MLMediaLibrary *sharedLibrary = [MLMediaLibrary sharedMediaLibrary];
[sharedLibrary computeThumbnailForFile:file]; [sharedLibrary computeThumbnailForFile:file];
[sharedLibrary fetchMetaDataForFile:file]; [sharedLibrary fetchMetaDataForFile:file];
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:file.url.absoluteString error:nil];
NSNumber *size = attributes[NSFileSize]; // FIXME [result valueForAttribute:@"kMDItemFSSize"];
if ([size longLongValue] < 150000000) /* 150 MB */
file.type = kMLFileTypeClip;
else
file.type = kMLFileTypeMovie;
} }
file.hasFetchedInfo = @(YES); @try {
file.hasFetchedInfo = @(YES);
}
@catch (NSException *exception) {
APLog(@"failed to set that we fetch info for the file");
}
[self endParsing]; [self endParsing];
} }
...@@ -351,3 +408,5 @@ static inline NSString *hashFromFile(MLFile *file) ...@@ -351,3 +408,5 @@ static inline NSString *hashFromFile(MLFile *file)
} }
@end @end
#endif
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#import "MLMediaLibrary.h" #import "MLMediaLibrary.h"
#import "MLTitleDecrapifier.h" #import "MLTitleDecrapifier.h"
#import "MLMovieInfoGrabber.h"
#import "MLTVShowInfoGrabber.h"
#import "MLTVShowEpisodesInfoGrabber.h"
#import "MLFile.h" #import "MLFile.h"
#import "MLLabel.h" #import "MLLabel.h"
#import "MLShowEpisode.h" #import "MLShowEpisode.h"
...@@ -42,6 +39,12 @@ ...@@ -42,6 +39,12 @@
#import "MLMediaLibrary+Migration.h" #import "MLMediaLibrary+Migration.h"
#import <sys/sysctl.h> // for sysctlbyname #import <sys/sysctl.h> // for sysctlbyname
#if HAVE_BLOCK
#import "MLMovieInfoGrabber.h"
#import "MLTVShowInfoGrabber.h"
#import "MLTVShowEpisodesInfoGrabber.h"
#endif
@interface MLMediaLibrary () @interface MLMediaLibrary ()
{ {
NSManagedObjectContext *_managedObjectContext; NSManagedObjectContext *_managedObjectContext;
...@@ -57,16 +60,15 @@ ...@@ -57,16 +60,15 @@
} }
@end @end
#define DEBUG 1
// Pref key // Pref key
static NSString *kLastTVDBUpdateServerTime = @"MLLastTVDBUpdateServerTime"; static NSString *kLastTVDBUpdateServerTime = @"MLLastTVDBUpdateServerTime";
static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
#if HAVE_BLOCK #if HAVE_BLOCK
@interface MLMediaLibrary ()
#else
@interface MLMediaLibrary () <MLMovieInfoGrabberDelegate, MLTVShowEpisodesInfoGrabberDelegate, MLTVShowInfoGrabberDelegate> @interface MLMediaLibrary () <MLMovieInfoGrabberDelegate, MLTVShowEpisodesInfoGrabberDelegate, MLTVShowInfoGrabberDelegate>
#else
@interface MLMediaLibrary ()
#endif #endif
- (NSManagedObjectContext *)managedObjectContext; - (NSManagedObjectContext *)managedObjectContext;
- (NSString *)databaseFolderPath; - (NSString *)databaseFolderPath;
...@@ -243,6 +245,9 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -243,6 +245,9 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
#pragma mark - #pragma mark -
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator - (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{ {
if (_persistentStoreCoordinator) {
return _persistentStoreCoordinator;
}
NSPersistentStoreCoordinator *coordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; NSPersistentStoreCoordinator *coordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
...@@ -287,6 +292,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -287,6 +292,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
return nil; return nil;
} }
} }
_persistentStoreCoordinator = coordinator;
return coordinator; return coordinator;
} }
...@@ -297,8 +304,10 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -297,8 +304,10 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
_managedObjectContext = [[NSManagedObjectContext alloc] init]; _managedObjectContext = [[NSManagedObjectContext alloc] init];
[_managedObjectContext setPersistentStoreCoordinator:self.persistentStoreCoordinator]; [_managedObjectContext setPersistentStoreCoordinator:self.persistentStoreCoordinator];
if (_managedObjectContext.persistentStoreCoordinator == nil) if (_managedObjectContext.persistentStoreCoordinator == nil) {
_managedObjectContext = nil;
return nil; return nil;
}
[_managedObjectContext setUndoManager:nil]; [_managedObjectContext setUndoManager:nil];
[_managedObjectContext addObserver:self forKeyPath:@"hasChanges" options:NSKeyValueObservingOptionInitial context:nil]; [_managedObjectContext addObserver:self forKeyPath:@"hasChanges" options:NSKeyValueObservingOptionInitial context:nil];
return _managedObjectContext; return _managedObjectContext;
...@@ -312,7 +321,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -312,7 +321,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
if (!moc) if (!moc)
return; return;
BOOL success = [[self managedObjectContext] save:&error]; BOOL success = NO;
@try {
success = [[self managedObjectContext] save:&error];
}
@catch (NSException *exception) {
NSLog(@"Saving pending changes failed");
}
NSAssert1(success, @"Can't save: %@", error); NSAssert1(success, @"Can't save: %@", error);
#if !TARGET_OS_IPHONE && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 #if !TARGET_OS_IPHONE && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
NSProcessInfo *process = [NSProcessInfo processInfo]; NSProcessInfo *process = [NSProcessInfo processInfo];
...@@ -328,7 +343,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -328,7 +343,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
if (!moc) if (!moc)
return; return;
BOOL success = [moc save:&error]; BOOL success = NO;
@try {
success = [moc save:&error];
}
@catch (NSException *exception) {
NSLog(@"Saving changes failed");
}
NSAssert1(success, @"Can't save: %@", error); NSAssert1(success, @"Can't save: %@", error);
} }
...@@ -355,8 +376,10 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -355,8 +376,10 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
return nil; return nil;
} }
NSManagedObjectID *objectID = [self.persistentStoreCoordinator managedObjectIDForURIRepresentation:uriRepresenation]; NSManagedObjectID *objectID = [self.persistentStoreCoordinator managedObjectIDForURIRepresentation:uriRepresenation];
NSManagedObject *managedObject = [self.managedObjectContext objectWithID:objectID]; if (objectID) {
return managedObject; return [self.managedObjectContext objectWithID:objectID];
}
return nil;
} }
#pragma mark - #pragma mark -
...@@ -415,7 +438,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -415,7 +438,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
#pragma mark - #pragma mark -
#pragma mark Online meta data grabbing #pragma mark Online meta data grabbing
#if !HAVE_BLOCK #if HAVE_BLOCK
- (void)tvShowEpisodesInfoGrabberDidFinishGrabbing:(MLTVShowEpisodesInfoGrabber *)grabber - (void)tvShowEpisodesInfoGrabberDidFinishGrabbing:(MLTVShowEpisodesInfoGrabber *)grabber
{ {
MLShow *show = grabber.userData; MLShow *show = grabber.userData;
...@@ -551,11 +574,6 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -551,11 +574,6 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
}]; }];
}]; }];
#else
MLTVShowInfoGrabber *grabber = [[MLTVShowInfoGrabber alloc] init];
grabber.delegate = self;
grabber.userData = show;
[grabber fetchServerTime];
#endif #endif
} }
...@@ -603,7 +621,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -603,7 +621,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
* MLFile auto detection * MLFile auto detection
*/ */
#if !HAVE_BLOCK #if HAVE_BLOCK
- (void)movieInfoGrabber:(MLMovieInfoGrabber *)grabber didFailWithError:(NSError *)error - (void)movieInfoGrabber:(MLMovieInfoGrabber *)grabber didFailWithError:(NSError *)error
{ {
MLFile *file = grabber.userData; MLFile *file = grabber.userData;
...@@ -644,7 +662,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -644,7 +662,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
if (!_allowNetworkAccess) if (!_allowNetworkAccess)
return; return;
#if HAVE_BLOCK
// Go online and fetch info. // Go online and fetch info.
// We don't care about keeping a reference to track the item during its life span // We don't care about keeping a reference to track the item during its life span
...@@ -653,7 +671,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -653,7 +671,7 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
APLog(@"Looking up for Movie '%@'", file.title); APLog(@"Looking up for Movie '%@'", file.title);
#if HAVE_BLOCK
[grabber lookUpForTitle:file.title andExecuteBlock:^(NSError *err){ [grabber lookUpForTitle:file.title andExecuteBlock:^(NSError *err){
if (err) { if (err) {
[self errorWhenFetchingMetaDataForFile:file]; [self errorWhenFetchingMetaDataForFile:file];
...@@ -673,10 +691,6 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -673,10 +691,6 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
[self noMetaDataInRemoteDBForFile:file]; [self noMetaDataInRemoteDBForFile:file];
file.hasFetchedInfo = [NSNumber numberWithBool:YES]; file.hasFetchedInfo = [NSNumber numberWithBool:YES];
}]; }];
#else
grabber.userData = file;
grabber.delegate = self;
[grabber lookUpForTitle:file.title];
#endif #endif
} }
...@@ -740,7 +754,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -740,7 +754,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
[fetchPredicates addObject:[NSPredicate predicateWithFormat:@"path == %@", relativePath]]; [fetchPredicates addObject:[NSPredicate predicateWithFormat:@"path == %@", relativePath]];
} }
NSFetchRequest *request = [self fetchRequestForEntity:@"File"]; NSFetchRequest *request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
[request setPredicate:[NSCompoundPredicate orPredicateWithSubpredicates:fetchPredicates]]; [request setPredicate:[NSCompoundPredicate orPredicateWithSubpredicates:fetchPredicates]];
APLog(@"Fetching"); APLog(@"Fetching");
...@@ -767,10 +782,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -767,10 +782,13 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
#pragma mark - #pragma mark -
#pragma mark DB Updates #pragma mark DB Updates
#if !HAVE_BLOCK #if HAVE_BLOCK
- (void)tvShowInfoGrabber:(MLTVShowInfoGrabber *)grabber didFetchUpdates:(NSArray *)updates - (void)tvShowInfoGrabber:(MLTVShowInfoGrabber *)grabber didFetchUpdates:(NSArray *)updates
{ {
NSFetchRequest *request = [self fetchRequestForEntity:@"Show"]; NSFetchRequest *request = [self fetchRequestForEntity:@"Show"];
if (!request)
return;
[request setPredicate:[NSComparisonPredicate predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"theTVDBID"] rightExpression:[NSExpression expressionForConstantValue:updates] modifier:NSDirectPredicateModifier type:NSInPredicateOperatorType options:0]]; [request setPredicate:[NSComparisonPredicate predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"theTVDBID"] rightExpression:[NSExpression expressionForConstantValue:updates] modifier:NSDirectPredicateModifier type:NSInPredicateOperatorType options:0]];
NSArray *results = [[self managedObjectContext] executeFetchRequest:request error:nil]; NSArray *results = [[self managedObjectContext] executeFetchRequest:request error:nil];
for (MLShow *show in results) for (MLShow *show in results)
...@@ -783,10 +801,20 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -783,10 +801,20 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
[self libraryDidDisappear]; [self libraryDidDisappear];
// Remove no more present files // Remove no more present files
NSFetchRequest *request = [self fetchRequestForEntity:@"File"]; NSFetchRequest *request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
NSManagedObjectContext *moc = [self managedObjectContext]; NSManagedObjectContext *moc = [self managedObjectContext];
if (!moc) if (!moc)
return; return;
NSArray *results = [moc executeFetchRequest:request error:nil]; NSArray *results;
@try {
results = [moc executeFetchRequest:request error:nil];
}
@catch (NSException *exception) {
NSLog(@"media database update failed");
return;
}
NSFileManager *fileManager = [NSFileManager defaultManager]; NSFileManager *fileManager = [NSFileManager defaultManager];
unsigned int count = (unsigned int)results.count; unsigned int count = (unsigned int)results.count;
...@@ -841,6 +869,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -841,6 +869,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
// Get the file to parse // Get the file to parse
request = [self fetchRequestForEntity:@"File"]; request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
[request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && tracks.@count == 0"]]; [request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && tracks.@count == 0"]];
results = [moc executeFetchRequest:request error:nil]; results = [moc executeFetchRequest:request error:nil];
for (MLFile *file in results) for (MLFile *file in results)
...@@ -849,6 +879,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -849,6 +879,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
if (!_allowNetworkAccess) { if (!_allowNetworkAccess) {
// Always attempt to fetch // Always attempt to fetch
request = [self fetchRequestForEntity:@"File"]; request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
[request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES"]]; [request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES"]];
results = [moc executeFetchRequest:request error:nil]; results = [moc executeFetchRequest:request error:nil];
for (MLFile *file in results) { for (MLFile *file in results) {
...@@ -860,6 +892,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -860,6 +892,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
// Get the thumbnails to compute // Get the thumbnails to compute
request = [self fetchRequestForEntity:@"File"]; request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
[request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && hasFetchedInfo == 1 && artworkURL == nil"]]; [request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && hasFetchedInfo == 1 && artworkURL == nil"]];
results = [moc executeFetchRequest:request error:nil]; results = [moc executeFetchRequest:request error:nil];
for (MLFile *file in results) { for (MLFile *file in results) {
...@@ -871,6 +905,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -871,6 +905,8 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
// Get to fetch meta data // Get to fetch meta data
request = [self fetchRequestForEntity:@"File"]; request = [self fetchRequestForEntity:@"File"];
if (!request)
return;
[request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && hasFetchedInfo == 0"]]; [request setPredicate:[NSPredicate predicateWithFormat:@"isOnDisk == YES && hasFetchedInfo == 0"]];
results = [moc executeFetchRequest:request error:nil]; results = [moc executeFetchRequest:request error:nil];
for (MLFile *file in results) for (MLFile *file in results)
...@@ -878,25 +914,26 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles"; ...@@ -878,25 +914,26 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
// Get to fetch show info // Get to fetch show info
request = [self fetchRequestForEntity:@"Show"]; request = [self fetchRequestForEntity:@"Show"];
if (!request)
return;
[request setPredicate:[NSPredicate predicateWithFormat:@"lastSyncDate == 0"]]; [request setPredicate:[NSPredicate predicateWithFormat:@"lastSyncDate == 0"]];
results = [moc executeFetchRequest:request error:nil]; results = [moc executeFetchRequest:request error:nil];
for (MLShow *show in results) for (MLShow *show in results)
[self fetchMetaDataForShow:show]; [self fetchMetaDataForShow:show];
#if HAVE_BLOCK
// Get updated TV Shows // Get updated TV Shows
NSNumber *lastServerTime = @([[NSUserDefaults standardUserDefaults] integerForKey:kLastTVDBUpdateServerTime]); NSNumber *lastServerTime = @([[NSUserDefaults standardUserDefaults] integerForKey:kLastTVDBUpdateServerTime]);
#if HAVE_BLOCK
[MLTVShowInfoGrabber fetchUpdatesSinceServerTime:lastServerTime andExecuteBlock:^(NSArray *updates){ [MLTVShowInfoGrabber fetchUpdatesSinceServerTime:lastServerTime andExecuteBlock:^(NSArray *updates){
NSFetchRequest *request = [self fetchRequestForEntity:@"Show"]; NSFetchRequest *request = [self fetchRequestForEntity:@"Show"];
if (!request)
return;
[request setPredicate:[NSComparisonPredicate predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"theTVDBID"] rightExpression:[NSExpression expressionForConstantValue:updates] modifier:NSDirectPredicateModifier type:NSInPredicateOperatorType options:0]]; [request setPredicate:[NSComparisonPredicate predicateWithLeftExpression:[NSExpression expressionForKeyPath:@"theTVDBID"] rightExpression:[NSExpression expressionForConstantValue:updates] modifier:NSDirectPredicateModifier type:NSInPredicateOperatorType options:0]];
NSArray *results = [moc executeFetchRequest:request error:nil]; NSArray *results = [moc executeFetchRequest:request error:nil];
for (MLShow *show in results) for (MLShow *show in results)
[self fetchMetaDataForShow:show]; [self fetchMetaDataForShow:show];
}]; }];
#else
MLTVShowInfoGrabber *grabber = [[MLTVShowInfoGrabber alloc] init];
grabber.delegate = self;
[grabber fetchUpdatesSinceServerTime:lastServerTime];
#endif #endif
/* Update every hour - FIXME: Preferences key */ /* Update every hour - FIXME: Preferences key */
[self performSelector:@selector(updateMediaDatabase) withObject:nil afterDelay:60 * 60]; [self performSelector:@selector(updateMediaDatabase) withObject:nil afterDelay:60 * 60];
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
+ (MLShow *)showWithName:(NSString *)name + (MLShow *)showWithName:(NSString *)name
{ {
NSFetchRequest *request = [[MLMediaLibrary sharedMediaLibrary] fetchRequestForEntity:@"Show"]; NSFetchRequest *request = [[MLMediaLibrary sharedMediaLibrary] fetchRequestForEntity:@"Show"];
if (!request)
return nil;
[request setPredicate:[NSPredicate predicateWithFormat:@"name == %@", name]]; [request setPredicate:[NSPredicate predicateWithFormat:@"name == %@", name]];
NSManagedObjectContext *moc = [[MLMediaLibrary sharedMediaLibrary] managedObjectContext]; NSManagedObjectContext *moc = [[MLMediaLibrary sharedMediaLibrary] managedObjectContext];
......
...@@ -30,6 +30,43 @@ ...@@ -30,6 +30,43 @@
#import "MLMediaLibrary.h" #import "MLMediaLibrary.h"
#import "MLFileParserQueue.h" #import "MLFileParserQueue.h"
#ifdef MLKIT_READONLY_TARGET
@implementation MLThumbnailerQueue
+ (MLThumbnailerQueue *)sharedThumbnailerQueue
{
static MLThumbnailerQueue *shared = nil;
if (!shared) {
shared = [[MLThumbnailerQueue alloc] init];
}
return shared;
}
- (void)addFile:(MLFile *)file
{
}
- (void)setHighPriorityForFile:(MLFile *)file
{
}
- (void)setDefaultPriorityForFile:(MLFile *)file
{
}
- (void)stop
{
}
- (void)resume
{
}
@end
#else
@interface ThumbnailOperation : NSOperation <VLCMediaThumbnailerDelegate> @interface ThumbnailOperation : NSOperation <VLCMediaThumbnailerDelegate>
{ {
MLFile *_file; MLFile *_file;
...@@ -200,3 +237,5 @@ static inline NSString *hashFromFile(MLFile *file) ...@@ -200,3 +237,5 @@ static inline NSString *hashFromFile(MLFile *file)
} }
@end @end
#endif
...@@ -26,9 +26,40 @@ ...@@ -26,9 +26,40 @@
#import "MLTitleDecrapifier.h" #import "MLTitleDecrapifier.h"
#ifdef MLKIT_READONLY_TARGET
@implementation MLTitleDecrapifier
+ (NSString *)decrapify:(NSString *)string;
{
return @"";
}
+ (BOOL)isTVShowEpisodeTitle:(NSString *)string
{
return NO;
}
+ (NSDictionary *)tvShowEpisodeInfoFromString:(NSString *)string
{
return @{};
}
+ (NSDictionary *)audioContentInfoFromFile:(MLFile *)file
{
return @{};
}
@end
#else
@implementation MLTitleDecrapifier @implementation MLTitleDecrapifier
+ (NSString *)decrapify:(NSString *)string + (NSString *)decrapify:(NSString *)string
{ {
if (string == nil)
return nil;
static NSArray *ignoredWords = nil; static NSArray *ignoredWords = nil;
if (!ignoredWords) if (!ignoredWords)
ignoredWords = [[NSArray alloc] initWithObjects: ignoredWords = [[NSArray alloc] initWithObjects:
...@@ -237,7 +268,12 @@ returnThings: ...@@ -237,7 +268,12 @@ returnThings:
} else } else
title = [self decrapify:title]; title = [self decrapify:title];
return @{VLCMetaInformationTitle: title}; if (title != nil)
return @{VLCMetaInformationTitle: title};
return @{};
} }
@end @end
#endif