Ticket #4180: imdbpatch.patch
File imdbpatch.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/i) { 207 $parentalrating = "0" 208 } 209 elsif ($movierating =~ m/USA:PG-13|Rated PG-13|Rated PG13/i) { 210 $parentalrating = "2" 211 } 212 elsif ($movierating =~ m/USA:PG|Rated PG/i) { 213 $parentalrating = "1" 214 } 215 elsif ($movierating =~ m/USA:R|Rated R/i) { 216 $parentalrating = "3" 217 } 218 elsif ($movierating =~ m/USA:NC-17|Rated NC-17|Rated NC17/i) { 219 $parentalrating = "4" 220 } 221 elsif ($movierating =~ m/USA:X|Rated X/i) { 222 $parentalrating = "4" 223 } 224 else 225 { 226 $parentalrating = "0" 227 } 228 204 229 # parse movie length 205 230 my $rawruntime = trim(parseBetween($response, ">Runtime:</h5>", "</div>")); 206 231 my $runtime = trim(parseBetween($rawruntime, "", " min")); … … 246 271 print "Cast: $cast\n"; 247 272 print "Genres: $lgenres\n"; 248 273 print "Countries: $lcountries\n"; 274 print "ParentalRating: $parentalrating\n"; 249 275 } 250 276 251 277 # dump Movie Poster -
mythvideo/mythvideo/videomanager.cpp
643 643 curitem->setUserRating(data["UserRating"].toFloat()); 644 644 curitem->setRating(data["MovieRating"]); 645 645 curitem->setLength(data["Runtime"].toInt()); 646 curitem->setShowLevel(ParentalLevel::Level (data["ParentalRating"].toInt())); 646 647 647 648 //movieGenres 648 649 Metadata::genre_list movie_genres;