From b524eab9153ec5be7e69e31b982a9357d1630c82 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 5 Oct 2016 14:03:35 +0200 Subject: [PATCH] More the unknown rating to the last position of the array, so it doesn't replace the actual mpaa unrated value. --- MP42/MP42Ratings.m | 2 +- MP42/Ratings.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MP42/MP42Ratings.m b/MP42/MP42Ratings.m index 6dfe080..6c241a2 100644 --- a/MP42/MP42Ratings.m +++ b/MP42/MP42Ratings.m @@ -103,7 +103,7 @@ } - (NSUInteger) unknownIndex { - return 0; + return iTunesCodes.count - 1; } - (NSUInteger) ratingIndexForiTunesCode:(NSString *)aiTunesCode { diff --git a/MP42/Ratings.json b/MP42/Ratings.json index a7bc78c..adceeda 100644 --- a/MP42/Ratings.json +++ b/MP42/Ratings.json @@ -1,10 +1,4 @@ [ -{ - "country" : "Unknown", - "ratings" : [ - { "media" : "movie & TV", "prefix" : "mpaa", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unknown" } - ] -}, { "country" : "USA", "ratings" : [ @@ -226,5 +220,11 @@ { "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" : "Unknown", + "ratings" : [ + { "media" : "movie & TV", "prefix" : "mpaa", "itunes-code" : "Unrated", "itunes-value" : "???", "description" : "Unknown" } + ] } ]