Remove MP42Ratings class.

This commit is contained in:
Damiano Galassi committed 2020-02-04 13:40:45 +01:00
1 parent 9a2c5858ce
commit 98b7bb0b6c
6 files changed
-482

No files matched your search

-1
View File
@@ -28,7 +28,6 @@
#import <MP42Foundation/MP42MediaFormat.h>
#import <MP42Foundation/MP42Languages.h>
#import <MP42Foundation/MP42Ratings.h>
#import <MP42Foundation/MP42RelatedItem.h>
#import <MP42Foundation/MP42SecurityAccessToken.h>
-1
View File
@@ -12,7 +12,6 @@
#import "MP42Image.h"
#import "NSString+MP42Additions.h"
#import "MP42Ratings.h"
#import "MP42MetadataUtilities.h"
@interface MP42Metadata ()
-31
View File
@@ -1,31 +0,0 @@
//
// MP42Ratings.h
// Subler
//
// Created by Douglas Stebila on 2013-06-02.
//
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MP42Ratings : NSObject
@property (class, readonly) MP42Ratings *defaultManager;
@property (nonatomic, readonly) NSArray<NSString *> *ratings;
@property (nonatomic, readonly) NSArray<NSString *> *iTunesCodes;
@property (nonatomic, readonly) NSArray<NSString *> *ratingsCountries;
- (void)updateRatingsCountry;
- (NSInteger)ratingIndexForiTunesCode:(NSString *)aiTunesCode;
- (NSInteger)ratingIndexForiTunesCountry:(NSString *)aCountry media:(NSString *)aMedia ratingString:(NSString *)aRatingString;
- (nullable NSString *)ratingStringForiTunesCountry:(NSString *)aCountry media:(NSString *)aMedia ratingString:(NSString *)aRatingString;
@end
NS_ASSUME_NONNULL_END
-162
View File
@@ -1,162 +0,0 @@
//
// MP42Ratings.m
// Subler
//
// Created by Douglas Stebila on 2013-06-02.
//
//
#import "MP42Ratings.h"
@implementation MP42Ratings {
NSMutableArray *ratingsDictionary;
NSMutableArray<NSString *> *ratings;
NSMutableArray<NSString *> *iTunesCodes;
}
+ (MP42Ratings *)defaultManager {
static dispatch_once_t sharedRatingsPred;
static MP42Ratings *sharedRatingsManager = nil;
dispatch_once(&sharedRatingsPred, ^{ sharedRatingsManager = [[self alloc] init]; });
return sharedRatingsManager;
}
- (instancetype)init
{
self = [super init];
if (self) {
NSString *ratingsJSON = [[NSBundle bundleForClass:[MP42Ratings class]] pathForResource:@"Ratings" ofType:@"json"];
if (!ratingsJSON) {
return nil;
}
NSData *data = [NSData dataWithContentsOfFile:ratingsJSON];
if (data) {
ratingsDictionary = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
} else {
ratingsDictionary = [[NSMutableArray alloc] init];
}
[self updateRatingsCountry];
}
return self;
}
- (NSArray *)ratingsCountries {
NSMutableArray *countries = [[NSMutableArray alloc] init];
for (NSDictionary *countryRatings in ratingsDictionary) {
NSString *countryName = countryRatings[@"country"];
if ([countryName isEqualToString:@"Unknown"]) {
[countries addObject:@"All countries"];
} else {
[countries addObject:countryName];
}
}
return countries;
}
- (void)updateRatingsCountry {
// construct movie ratings
ratings = [[NSMutableArray alloc] init];
iTunesCodes = [[NSMutableArray alloc] init];
// if a specific country is picked, include the USA ratings at the end
NSString *selectedCountry = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBRatingsCountry"];
NSDictionary<NSString *, NSDictionary *> *usaRatings = nil;
for (NSDictionary *countryRatings in ratingsDictionary) {
NSString *countryName = countryRatings[@"country"];
if ([countryName isEqualToString:@"USA"]) {
usaRatings = countryRatings;
}
if (![selectedCountry isEqualToString:@"All countries"]) {
if (![countryName isEqualToString:@"Unknown"] && ![countryName isEqualToString:selectedCountry]) {
continue;
}
}
for (NSDictionary *rating in countryRatings[@"ratings"]) {
[ratings addObject:[NSString stringWithFormat:@"%@ %@: %@", countryName, rating[@"media"], rating[@"description"]]];
[iTunesCodes addObject:[NSString stringWithFormat:@"%@|%@|%@|", rating[@"prefix"], rating[@"itunes-code"], rating[@"itunes-value"]]];
}
}
if (![selectedCountry isEqualToString:@"All countries"] && ![selectedCountry isEqualToString:@"USA"]) {
if (usaRatings) {
for (NSDictionary *rating in usaRatings[@"ratings"]) {
[ratings addObject:[NSString stringWithFormat:@"%@ %@: %@", @"USA", rating[@"media"], rating[@"description"]]];
[iTunesCodes addObject:[NSString stringWithFormat:@"%@|%@|%@|", rating[@"prefix"], rating[@"itunes-code"], rating[@"itunes-value"]]];
}
}
}
}
- (NSArray<NSString *> *)ratings {
return [NSArray arrayWithArray:ratings];
}
- (NSArray<NSString *> *)iTunesCodes {
return [NSArray arrayWithArray:iTunesCodes];
}
- (NSInteger)ratingIndexForiTunesCode:(NSString *)aiTunesCode {
NSInteger i = 0;
for (NSString *code in iTunesCodes) {
if ([code isEqualToString:aiTunesCode]) {
return i;
}
i++;
}
return -1;
}
- (NSInteger)ratingIndexForiTunesCountry:(NSString *)aCountry media:(NSString *)aMedia ratingString:(NSString *)aRatingString {
NSString *target1 = [[NSString stringWithFormat:@"%@ %@: %@", aCountry, aMedia, aRatingString] lowercaseString];
NSString *target2 = [[NSString stringWithFormat:@"%@ %@: %@", aCountry, @"movie & TV", aRatingString] lowercaseString];
NSInteger i = 0;
for (NSString *iTunesRating in ratings) {
NSString *lowerCaseRating = iTunesRating.lowercaseString;
if ([lowerCaseRating isEqualToString:target1] || [lowerCaseRating isEqualToString:target2]) {
return i;
}
else {
i += 1;
}
}
if (aRatingString != nil) {
NSLog(@"Unknown rating information: %@", target1);
}
for (NSDictionary *countryRatings in ratingsDictionary) {
if ([countryRatings[@"country"] isEqualToString:aCountry]) {
for (NSDictionary *rating in countryRatings[@"ratings"]) {
if ([rating[@"itunes-value"] isEqualToString:@"???"]) {
return [self ratingIndexForiTunesCode:[NSString stringWithFormat:@"%@|%@|%@|", rating[@"prefix"], rating[@"itunes-code"], rating[@"itunes-value"]]];
}
}
}
}
return -1;
}
- (nullable NSString *)ratingStringForiTunesCountry:(NSString *)aCountry media:(NSString *)aMedia ratingString:(NSString *)aRatingString {
NSInteger index = [self ratingIndexForiTunesCountry:aCountry media:aMedia ratingString:aRatingString];
if (index > -1) {
return iTunesCodes[index];
}
else {
return nil;
}
}
@end
-273
View File
@@ -1,273 +0,0 @@
[
{
"country" : "USA",
"ratings" : [
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "NR", "itunes-value" : "000", "description" : "NR" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "PG-13", "itunes-value" : "300", "description" : "PG-13" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "R", "itunes-value" : "400", "description" : "R" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "NC-17", "itunes-value" : "500", "description" : "NC-17" },
{ "media" : "movie", "prefix" : "mpaa", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-Y", "itunes-value" : "100", "description" : "TV-Y" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-Y7", "itunes-value" : "200", "description" : "TV-Y7" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-G", "itunes-value" : "300", "description" : "TV-G" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-PG", "itunes-value" : "400", "description" : "TV-PG" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-14", "itunes-value" : "500", "description" : "TV-14" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "TV-MA", "itunes-value" : "600", "description" : "TV-MA" },
{ "media" : "TV", "prefix" : "us-tv", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" }
]
},
{
"country" : "Australia",
"ratings" : [
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "M", "itunes-value" : "350", "description" : "M" },
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "MA15+", "itunes-value" : "375", "description" : "MA15+" },
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "R18+", "itunes-value" : "400", "description" : "R18+" },
{ "media" : "movie", "prefix" : "au-movie", "itunes-code" : "Not Rated","itunes-value" : "???", "description" : "Not Rated" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "P", "itunes-value" : "100", "description" : "P" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "C", "itunes-value" : "200", "description" : "C" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "G", "itunes-value" : "300", "description" : "G" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "PG", "itunes-value" : "400", "description" : "PG" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "M", "itunes-value" : "500", "description" : "M" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "MA15+", "itunes-value" : "550", "description" : "MA15+" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "AV15+", "itunes-value" : "575", "description" : "AV15+" },
{ "media" : "TV", "prefix" : "au-tv", "itunes-code" : "R18+", "itunes-value" : "160", "description" : "R18+" }
]
},
{
"country" : "Brasil",
"ratings" : [
{ "media" : "movie", "prefix" : "br-movie", "itunes-code" : "L", "itunes-value" : "000", "description" : "L" },
{ "media" : "movie", "prefix" : "br-movie", "itunes-code" : "12", "itunes-value" : "100", "description" : "12" },
{ "media" : "movie", "prefix" : "br-movie", "itunes-code" : "14", "itunes-value" : "300", "description" : "14" },
{ "media" : "movie", "prefix" : "br-movie", "itunes-code" : "16", "itunes-value" : "350", "description" : "16" },
{ "media" : "movie", "prefix" : "br-movie", "itunes-code" : "18", "itunes-value" : "400", "description" : "18" }
]
},
{
"country" : "Canada",
"ratings" : [
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "14A", "itunes-value" : "300", "description" : "14A" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "18A", "itunes-value" : "350", "description" : "18A" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "R", "itunes-value" : "400", "description" : "R" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "A", "itunes-value" : "500", "description" : "A" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" },
{ "media" : "movie", "prefix" : "ca-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Not Rated" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "E", "itunes-value" : "000", "description" : "E" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "C", "itunes-value" : "050", "description" : "C" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "C8", "itunes-value" : "075", "description" : "C8" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "14+", "itunes-value" : "300", "description" : "14+" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "18+", "itunes-value" : "350", "description" : "18+" },
{ "media" : "TV", "prefix" : "ca-tv", "itunes-code" : "21+", "itunes-value" : "500", "description" : "21+" }
]
},
{
"country" : "Deutschland",
"ratings" : [
{ "media" : "movie", "prefix" : "de-movie", "itunes-code" : "Ab 0 Jahren", "itunes-value" : "075", "description" : "Ab 0 Jahren" },
{ "media" : "movie", "prefix" : "de-movie", "itunes-code" : "Ab 6 Jahren", "itunes-value" : "100", "description" : "Ab 6 Jahren" },
{ "media" : "movie", "prefix" : "de-movie", "itunes-code" : "Ab 12 Jahren", "itunes-value" : "200", "description" : "Ab 12 Jahren" },
{ "media" : "movie", "prefix" : "de-movie", "itunes-code" : "Ab 16 Jahren", "itunes-value" : "500", "description" : "Ab 16 Jahren" },
{ "media" : "movie", "prefix" : "de-movie", "itunes-code" : "Ab 18 Jahren", "itunes-value" : "600", "description" : "Ab 18 Jahren" },
{ "media" : "TV", "prefix" : "de-tv", "itunes-code" : "Ab 0 Jahren", "itunes-value" : "075", "description" : "Ab 0 Jahren" },
{ "media" : "TV", "prefix" : "de-tv", "itunes-code" : "Ab 6 Jahren", "itunes-value" : "100", "description" : "Ab 6 Jahren" },
{ "media" : "TV", "prefix" : "de-tv", "itunes-code" : "Ab 12 Jahren", "itunes-value" : "200", "description" : "Ab 12 Jahren" },
{ "media" : "TV", "prefix" : "de-tv", "itunes-code" : "Ab 16 Jahren", "itunes-value" : "500", "description" : "Ab 16 Jahren" },
{ "media" : "TV", "prefix" : "de-tv", "itunes-code" : "Ab 18 Jahren", "itunes-value" : "600", "description" : "Ab 18 Jahren" }
]
},
{
"country" : "France",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "Tout public", "itunes-value" : "000", "description" : "Tout public" },
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "-10", "itunes-value" : "100", "description" : "-10" },
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "-12", "itunes-value" : "300", "description" : "-12" },
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "-16", "itunes-value" : "375", "description" : "-16" },
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "-18", "itunes-value" : "400", "description" : "-18" },
{ "media" : "movie & TV", "prefix" : "fr-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" }
]
},
{
"country" : "Italia",
"ratings" : [
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "T", "itunes-value" : "100", "description" : "T" },
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "VPA", "itunes-value" : "125", "description" : "VPA" },
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "VM10", "itunes-value" : "150", "description" : "VM10" },
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "VM12", "itunes-value" : "200", "description" : "VM12" },
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "VM14", "itunes-value" : "325", "description" : "VM14" },
{ "media" : "movie", "prefix" : "it-movie", "itunes-code" : "VM18", "itunes-value" : "400", "description" : "VM18" }
]
},
{
"country" : "日本",
"ratings" : [
{ "media" : "movie", "prefix" : "jp-movie", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie", "prefix" : "jp-movie", "itunes-code" : "PG12", "itunes-value" : "200", "description" : "PG12" },
{ "media" : "movie", "prefix" : "jp-movie", "itunes-code" : "R15+", "itunes-value" : "300", "description" : "R15+" },
{ "media" : "movie", "prefix" : "jp-movie", "itunes-code" : "R18+", "itunes-value" : "400", "description" : "R18+" },
{ "media" : "movie", "prefix" : "jp-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "未審査" }
]
},
{
"country" : "Mexico",
"ratings" : [
{ "media" : "movie", "prefix" : "mx-movie", "itunes-code" : "AA", "itunes-value" : "000", "description" : "AA" },
{ "media" : "movie", "prefix" : "mx-movie", "itunes-code" : "A", "itunes-value" : "100", "description" : "A" },
{ "media" : "movie", "prefix" : "mx-movie", "itunes-code" : "B", "itunes-value" : "300", "description" : "B" },
{ "media" : "movie", "prefix" : "mx-movie", "itunes-code" : "B-15", "itunes-value" : "500", "description" : "B-15" },
{ "media" : "movie", "prefix" : "mx-movie", "itunes-code" : "C", "itunes-value" : "600", "description" : "C" }
]
},
{
"country" : "Nederland",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "AL/G", "itunes-value" : "000", "description" : "AL/G" },
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "6", "itunes-value" : "100", "description" : "6" },
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "9", "itunes-value" : "200", "description" : "9" },
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "12", "itunes-value" : "300", "description" : "12" },
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "16", "itunes-value" : "500", "description" : "16" },
{ "media" : "movie & TV", "prefix" : "nl-movie", "itunes-code" : "18", "itunes-value" : "600", "description" : "18" }
]
},
{
"country" : "New Zealand",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "M", "itunes-value" : "300", "description" : "M" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "R13", "itunes-value" : "325", "description" : "R13" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "RP13", "itunes-value" : "325", "description" : "RP13" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "R15", "itunes-value" : "350", "description" : "R15" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "R16", "itunes-value" : "375", "description" : "R16" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "RP16", "itunes-value" : "375", "description" : "RP16" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "R18", "itunes-value" : "400", "description" : "R18" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "R", "itunes-value" : "500", "description" : "R" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "U", "itunes-value" : "900", "description" : "U" },
{ "media" : "movie & TV", "prefix" : "nz-movie", "itunes-code" : "Not Rated","itunes-value" : "???", "description" : "Not Rated" }
]
},
{
"country" : "Sverige",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "A", "itunes-value" : "000", "description" : "Barntillåten" },
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "7", "itunes-value" : "125", "description" : "Från 7 år" },
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "11", "itunes-value" : "225", "description" : "Från 11 år" },
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "15", "itunes-value" : "400", "description" : "Från 15 år" },
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Ocensurerad" },
{ "media" : "movie & TV", "prefix" : "se-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Inte klassificerad" }
]
},
{
"country" : "Schweiz",
"ratings" : [
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "0", "itunes-value" : "050", "description" : "0" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "6", "itunes-value" : "075", "description" : "6" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "7", "itunes-value" : "125", "description" : "7" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "10", "itunes-value" : "150", "description" : "10" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "12", "itunes-value" : "200", "description" : "12" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "14", "itunes-value" : "325", "description" : "14" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "16", "itunes-value" : "375", "description" : "16" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "18", "itunes-value" : "400", "description" : "18" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "keine alterseinstufung" }
]
},
{
"country" : "Suisse",
"ratings" : [
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "0", "itunes-value" : "050", "description" : "0" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "6", "itunes-value" : "075", "description" : "6" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "7", "itunes-value" : "125", "description" : "7" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "10", "itunes-value" : "150", "description" : "10" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "12", "itunes-value" : "200", "description" : "12" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "14", "itunes-value" : "325", "description" : "14" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "16", "itunes-value" : "375", "description" : "16" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "18", "itunes-value" : "400", "description" : "18" },
{ "media" : "movie", "prefix" : "ch-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "keine alterseinstufung" }
]
},
{
"country" : "UK",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "NR", "itunes-value" : "000", "description" : "Not Rated" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "U", "itunes-value" : "100", "description" : "U" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "Uc", "itunes-value" : "150", "description" : "Uc" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "PG", "itunes-value" : "200", "description" : "PG" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "12", "itunes-value" : "300", "description" : "12" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "12A", "itunes-value" : "325", "description" : "12A" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "15", "itunes-value" : "350", "description" : "15" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "18", "itunes-value" : "400", "description" : "18" },
{ "media" : "TV", "prefix" : "uk-tv", "itunes-code" : "Caution", "itunes-value" : "500", "description" : "Caution" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "R18", "itunes-value" : "600", "description" : "R18" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "E", "itunes-value" : "0", "description" : "Exempt" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" },
{ "media" : "movie & TV", "prefix" : "uk-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "TBC" }
]
},
{
"country" : "Россия",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "0+", "itunes-value" : "000", "description" : "0+" },
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "6+", "itunes-value" : "150", "description" : "6+" },
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "12+", "itunes-value" : "200", "description" : "12+" },
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "16+", "itunes-value" : "375", "description" : "16+" },
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "18+", "itunes-value" : "400", "description" : "18+" },
{ "media" : "movie & TV", "prefix" : "ru-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" }
]
},
{
"country" : "Pilipinas",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "G", "itunes-value" : "100", "description" : "G" },
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "PG", "itunes-value" : "300", "description" : "PG" },
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "R-13", "itunes-value" : "325", "description" : "R-13" },
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "R-16", "itunes-value" : "375", "description" : "R-16" },
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "R-18", "itunes-value" : "400", "description" : "R-18" },
{ "media" : "movie & TV", "prefix" : "ph-movie", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unrated" }
]
},
{
"country" : "Hong Kong",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "hk-movie", "itunes-code" : "第i類", "itunes-value" : "100", "description" : "第i類" },
{ "media" : "movie & TV", "prefix" : "hk-movie", "itunes-code" : "第ii類", "itunes-value" : "400", "description" : "第ii類" },
{ "media" : "movie & TV", "prefix" : "hk-movie", "itunes-code" : "未作評級", "itunes-value" : "???", "description" : "未作評級" }
]
},
{
"country" : "Česká republika",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "cz-movies", "itunes-code" : "U", "itunes-value" : "100", "description" : "U" },
{ "media" : "movie & TV", "prefix" : "cz-movies", "itunes-code" : "12+", "itunes-value" : "200", "description" : "12+" },
{ "media" : "movie & TV", "prefix" : "cz-movies", "itunes-code" : "15+", "itunes-value" : "350", "description" : "15+" },
{ "media" : "movie & TV", "prefix" : "cz-movies", "itunes-code" : "18+", "itunes-value" : "400", "description" : "18+" },
{ "media" : "movie & TV", "prefix" : "cz-movies", "itunes-code" : "neklasifikováno", "itunes-value" : "???", "description" : "Neklasifikováno" }
]
},
{
"country" : "India",
"ratings" : [
{ "media" : "movie", "prefix" : "in-movies", "itunes-code" : "U", "itunes-value" : "000", "description" : "U" },
{ "media" : "movie", "prefix" : "in-movies", "itunes-code" : "UA", "itunes-value" : "200", "description" : "UA" },
{ "media" : "movie", "prefix" : "in-movies", "itunes-code" : "A", "itunes-value" : "500", "description" : "A" },
{ "media" : "movie", "prefix" : "in-movies", "itunes-code" : "S", "itunes-value" : "600", "description" : "S" },
{ "media" : "TV", "prefix" : "in-tv", "itunes-code" : "U", "itunes-value" : "100", "description" : "U" },
{ "media" : "TV", "prefix" : "in-tv", "itunes-code" : "UA", "itunes-value" : "200", "description" : "UA" },
{ "media" : "TV", "prefix" : "in-tv", "itunes-code" : "A", "itunes-value" : "600", "description" : "A" },
{ "media" : "TV", "prefix" : "in-tv", "itunes-code" : "S", "itunes-value" : "800", "description" : "S" },
{ "media" : "movie & TV", "prefix" : "in-movies", "itunes-code" : "रेट नहीं की गई", "itunes-value" : "???", "description" : "रेट नहीं की गई" }
]
},
{
"country" : "Unknown",
"ratings" : [
{ "media" : "movie & TV", "prefix" : "mpaa", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unknown" }
]
}
]
-14
View File
@@ -46,7 +46,6 @@
A910B5D818394EB20064028F /* MP42TextSample.m in Sources */ = {isa = PBXBuildFile; fileRef = A989F10E1823B3B40070AD8C /* MP42TextSample.m */; };
A910B5DA18394EB20064028F /* MP42Image.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2391823923100416A4E /* MP42Image.m */; };
A910B5DC18394EB20064028F /* MP42Languages.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2C31823957800416A4E /* MP42Languages.m */; };
A910B5DE18394EB20064028F /* MP42Ratings.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2CE182396A100416A4E /* MP42Ratings.m */; };
A910B5E018394EB20064028F /* MP42PrivateUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2531823923100416A4E /* MP42PrivateUtilities.m */; };
A910B5E218394EB20064028F /* MP42Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A925AAAE18379AF800BE84D4 /* MP42Utilities.m */; };
A910B5E418394EB20064028F /* MP42SubUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C24F1823923100416A4E /* MP42SubUtilities.m */; };
@@ -112,7 +111,6 @@
A9422FC61D4917AF000DB435 /* audio_resample.c in Sources */ = {isa = PBXBuildFile; fileRef = A9422FC31D4917AF000DB435 /* audio_resample.c */; };
A9422FC71D4917AF000DB435 /* audio_resample.h in Headers */ = {isa = PBXBuildFile; fileRef = A9422FC41D4917AF000DB435 /* audio_resample.h */; };
A9422FC81D4917AF000DB435 /* audio_resample.h in Headers */ = {isa = PBXBuildFile; fileRef = A9422FC41D4917AF000DB435 /* audio_resample.h */; };
A947BA9B1824F0B3004C734B /* Ratings.json in Resources */ = {isa = PBXBuildFile; fileRef = A947BA9A1824F0B3004C734B /* Ratings.json */; };
A951C183233F4B8F00D63AF8 /* libpng16.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B0F2B322A2A36D0012E099 /* libpng16.a */; };
A951C184233F4B8F00D63AF8 /* libtiff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9E42D3D22A2835500A94E9C /* libtiff.a */; };
A951C185233F4B9F00D63AF8 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A9E8FB861D4664F70071A5F1 /* libz.tbd */; };
@@ -232,8 +230,6 @@
A9B9C2AF1823923200416A4E /* sfifo.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2651823923200416A4E /* sfifo.h */; };
A9B9C2C41823957800416A4E /* MP42Languages.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2C21823957800416A4E /* MP42Languages.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2C51823957800416A4E /* MP42Languages.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2C31823957800416A4E /* MP42Languages.m */; };
A9B9C2CF182396A100416A4E /* MP42Ratings.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2CD182396A100416A4E /* MP42Ratings.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2D0182396A100416A4E /* MP42Ratings.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2CE182396A100416A4E /* MP42Ratings.m */; };
A9B9C2D81823970E00416A4E /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C2D71823970E00416A4E /* AVFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; };
A9B9C2DA1823971F00416A4E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C2D91823971F00416A4E /* AudioToolbox.framework */; };
A9B9C2DE1823973200416A4E /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C2DD1823973200416A4E /* CoreMedia.framework */; settings = {ATTRIBUTES = (Required, ); }; };
@@ -319,7 +315,6 @@
A941C95D1F82A9B800FC5E8D /* MP42SSAConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42SSAConverter.m; sourceTree = "<group>"; };
A9422FC31D4917AF000DB435 /* audio_resample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = audio_resample.c; sourceTree = "<group>"; };
A9422FC41D4917AF000DB435 /* audio_resample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_resample.h; sourceTree = "<group>"; };
A947BA9A1824F0B3004C734B /* Ratings.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Ratings.json; sourceTree = "<group>"; };
A957E5A7203FF96800A5F776 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; };
A96523431BAC315900E994E0 /* NSString+MP42Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MP42Additions.h"; sourceTree = "<group>"; };
A96523441BAC315900E994E0 /* NSString+MP42Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MP42Additions.m"; sourceTree = "<group>"; };
@@ -429,8 +424,6 @@
A9B9C2651823923200416A4E /* sfifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sfifo.h; sourceTree = "<group>"; };
A9B9C2C21823957800416A4E /* MP42Languages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP42Languages.h; sourceTree = "<group>"; };
A9B9C2C31823957800416A4E /* MP42Languages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42Languages.m; sourceTree = "<group>"; };
A9B9C2CD182396A100416A4E /* MP42Ratings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP42Ratings.h; sourceTree = "<group>"; };
A9B9C2CE182396A100416A4E /* MP42Ratings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42Ratings.m; sourceTree = "<group>"; };
A9B9C2D71823970E00416A4E /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
A9B9C2D91823971F00416A4E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
A9B9C2DD1823973200416A4E /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
@@ -633,7 +626,6 @@
children = (
A9BA1AEB1DBF7DBE00FD0B38 /* Localizable.strings */,
A99DB6B41D4649C300C6E56C /* eng.traineddata */,
A947BA9A1824F0B3004C734B /* Ratings.json */,
A9B9C1F8182391DF00416A4E /* MP42Foundation-Info.plist */,
A9B9C1F9182391DF00416A4E /* InfoPlist.strings */,
A9B9C1FC182391DF00416A4E /* MP42Foundation-Prefix.pch */,
@@ -744,8 +736,6 @@
A9B9C2391823923100416A4E /* MP42Image.m */,
A9B9C2C21823957800416A4E /* MP42Languages.h */,
A9B9C2C31823957800416A4E /* MP42Languages.m */,
A9B9C2CD182396A100416A4E /* MP42Ratings.h */,
A9B9C2CE182396A100416A4E /* MP42Ratings.m */,
A9B9C2521823923100416A4E /* MP42PrivateUtilities.h */,
A9B9C2531823923100416A4E /* MP42PrivateUtilities.m */,
A91C3ACD1BF20CF1008BCF87 /* MP42FormatUtilites.h */,
@@ -853,7 +843,6 @@
A930D8E822351E2F0061CF37 /* MP42SecurityAccessToken.h in Headers */,
A9195F362233DD38005C4D01 /* MP42RelatedItem.h in Headers */,
A941A7B41DA7B08600FB2A7C /* MP42MetadataFormat.h in Headers */,
A9B9C2CF182396A100416A4E /* MP42Ratings.h in Headers */,
A99FCBC41BAD65EF0058E27A /* MP42Track+Private.h in Headers */,
A925AAAF18379AF800BE84D4 /* MP42Utilities.h in Headers */,
A9B9C28F1823923200416A4E /* MP42OCRWrapper.h in Headers */,
@@ -1002,7 +991,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A947BA9B1824F0B3004C734B /* Ratings.json in Resources */,
A9BA1AE91DBF7DBE00FD0B38 /* Localizable.strings in Resources */,
A9B9C1FB182391DF00416A4E /* InfoPlist.strings in Resources */,
);
@@ -1041,7 +1029,6 @@
A910B5DA18394EB20064028F /* MP42Image.m in Sources */,
A941A7B71DA7B08600FB2A7C /* MP42MetadataFormat.m in Sources */,
A910B5DC18394EB20064028F /* MP42Languages.m in Sources */,
A910B5DE18394EB20064028F /* MP42Ratings.m in Sources */,
A9059DCF1D870F8D000D1B9A /* MP42ConversionSettings.m in Sources */,
A910B5E018394EB20064028F /* MP42PrivateUtilities.m in Sources */,
A910B5E218394EB20064028F /* MP42Utilities.m in Sources */,
@@ -1098,7 +1085,6 @@
FFE849971EBCAFDF000AA078 /* MP42AC3AudioEncoder.m in Sources */,
A9B9C2981823923200416A4E /* MP42SubtitleTrack.m in Sources */,
A9022A961D6F3FD9005F0920 /* MP42MetadataItem.m in Sources */,
A9B9C2D0182396A100416A4E /* MP42Ratings.m in Sources */,
A941A7B61DA7B08600FB2A7C /* MP42MetadataFormat.m in Sources */,
A9B9C2AB1823923200416A4E /* mbs.cpp in Sources */,
A9B9C2AE1823923200416A4E /* sfifo.c in Sources */,