测试已测试 | ✓ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布上次发布 | 2015年2月 |
由 Jason Barrie Morley 维护。
依赖项 | |
iTVDb | ~> 0.0.5 |
ILMovieDB | ~> 0.0.2 |
ISUtilities | ~> 1.1 |
用于管理媒体的工具。
ISMediaKit 通过 CocoaPods 提供。
source 'https://github.com/CocoaPods/Specs.git'
platform :osx, '10.9'
pod 'ISMediaKit', '~> 1.0'
文档可在 CocoaDocs 上获得。
数据库客户端配置如下
#import <ISMediaKit/ISMediaKit.h>
ISMKDatabaseClient *databaseClient = [ISMKDatabaseClient sharedInstance];
[databaseClient setTVDBAPIKey:@"0123456789ABCDEF"
mdbAPIKey:@"0123456789abcdef0123456789abcdef"];
可以使用 searchWithFilename:completionBlock:
方法搜索电视节目
[databaseClient searchWithFilename:@"jeeves.&.wooster.s01e01.mp4" completionBlock:^(NSDictionary *media) {
NSLog(@"%@", media);
}];
这将输出
{
EpisodeDescription = "Aunt Agatha wants Bertie to marry Honoria Glossop so that she will mold his character and infuse much needed strong blood in the Wooster line. But old chum Bingo Little is in love with her, so Bertie hatches a scheme to set things straight. Luckily, Jeeves has arrived to save Bertie from his own schemes (and hangovers).";
EpisodeIdentifier = 220723;
EpisodeNumber = 1;
EpisodeSeason = 1;
EpisodeThumbnail = "http://www.thetvdb.com/banners/_cache/episodes/76934/220723.jpg";
EpisodeTitle = "Jeeves Takes Charge";
ShowBanner = "http://www.thetvdb.com/banners/fanart/original/76934-2.jpg";
ShowDate = "1990-04-21 22:00:00 +0000";
ShowDescription = "Bertram Wooster, a well-intentioned, wealthy layabout, has a habit of getting himself into trouble and it's up to his brilliant valet, Jeeves, to get him out.";
ShowIdentifier = 76934;
ShowThumbnail = "http://www.thetvdb.com/banners/posters/76934-4.jpg";
ShowTitle = "Jeeves and Wooster";
Type = 1;
}
可以使用完全相同的方法搜索电影
[databaseClient searchWithFilename:@"back to the future.mp4" completionBlock:^(NSDictionary *media) {
NSLog(@"%@", media);
}];
这将输出
{
MovieBanner = "http://image.tmdb.org/t/p/original/x4N74cycZvKu5k3KDERJay4ajR3.jpg";
MovieIdentifier = 105;
MovieThumbnail = "http://image.tmdb.org/t/p/original/pTpxQB1N0waaSc3OSn0e9oc8kx9.jpg";
MovieTitle = "Back to the Future";
Type = 2;
}
show.title.123.ext
和 show.title.1221.ext
的电视节目非常感谢
ISMediaKit 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。