Ticket #4180: imdbpatch.3.patch
File imdbpatch.3.patch, 1.9 KB (added by , 16 years ago) |
---|
-
mythvideo/mythvideo/scripts/imdb.pl
201 201 $movierating = parseBetween($movierating, ">", "<"); 202 202 } 203 203 204 # Convert MPAA Rating into Parental Rating 205 my $parentalrating; 206 if ($movierating =~ m/USA:G|Rated G|TV-Y|TV-G|UK:U/i) { 207 $parentalrating = "1" 208 } 209 elsif ($movierating =~ m/USA:PG-13|Rated PG-13|Rated PG13|TV-14|UK:12|UK:15/i) { 210 $parentalrating = "3" 211 } 212 elsif ($movierating =~ m/USA:PG|Rated PG|TV-PG|UK:PG/i) { 213 $parentalrating = "2" 214 } 215 elsif ($movierating =~ m/USA:R|Rated R|UK:18|USA:NC-17|Rated NC-17|Rated NC17|USA:X|Rated X|TV-MA|UK:18|UK:R18/i) { 216 $parentalrating = "4" 217 } 218 else 219 { 220 $parentalrating = "1" 221 } 222 204 223 # parse movie length 205 224 my $rawruntime = trim(parseBetween($response, ">Runtime:</h5>", "</div>")); 206 225 my $runtime = trim(parseBetween($rawruntime, "", " min")); … … 246 265 print "Cast: $cast\n"; 247 266 print "Genres: $lgenres\n"; 248 267 print "Countries: $lcountries\n"; 268 print "ParentalRating: $parentalrating\n"; 249 269 } 250 270 251 271 # dump Movie Poster -
mythvideo/mythvideo/videomanager.cpp
1891 1891 item->setUserRating(data["UserRating"].toFloat()); 1892 1892 item->setRating(data["MovieRating"]); 1893 1893 item->setLength(data["Runtime"].toInt()); 1894 1895 //movieGenres 1894 item->setShowLevel(ParentalLevel::Level (data["ParentalRating"].toInt())); 1895 1896 //movieGenres 1896 1897 Metadata::genre_list movie_genres; 1897 1898 QStringList genres = QStringList::split(",", data["Genres"]); 1898 1899