def updateMovie(self, movie, httphandler, LANG_MPAA): if movie["imdbnumber"] == "": util.logWarning("%(label)s: no IMDb id" % movie) else: mpaa = imdbMpaa(movie["imdbnumber"], httphandler, LANG_MPAA) formattedRating = ("%s%s" if ":" in FORM_MPAA else "%s %s") % (FORM_MPAA, mpaa.rating()) if mpaa.error(): util.logError("%s: problem with MPAA site" % movie["label"]) elif movie["mpaa"] != formattedRating: util.executeJSON('VideoLibrary.SetMovieDetails', {'movieid':movie['movieid'], 'mpaa':formattedRating}) util.log("%s: updated from %s to %s" % (movie["label"], movie["mpaa"], formattedRating)) return 1 return 0
def updateMovie(self, movie): if movie["imdbnumber"] == "": util.logWarning("%s: no IMDb id" % movie["label"]) else: imdb = imdbMovie(movie["imdbnumber"]) if imdb.error(): util.logError("%s: problem with omdbapi.com" % movie["label"]) elif (imdb.votes() == "0") or (imdb.votes() == "N/A"): util.logWarning("%s: no votes available" % movie["label"]) elif not(imdb.shouldUpdate(movie)): util.logDebug("%s: is up to date" % movie["label"]) else: util.executeJSON('VideoLibrary.SetMovieDetails', {'movieid': movie['movieid'], 'rating': float(imdb.rating()), 'votes': imdb.votes()}) util.log("%s: updated from %s (%s) to %s (%s)" % (movie["label"], movie["rating"], movie["votes"], imdb.rating(), imdb.votes())) return 1 return 0
def updateMovie(self, movie, httphandler, LANG_MPAA): if movie["imdbnumber"] == "": util.logWarning("%(label)s: no IMDb id" % movie) else: mpaa = imdbMpaa(movie["imdbnumber"], httphandler, LANG_MPAA) formattedRating = ("%s%s" if ":" in FORM_MPAA else "%s %s") % (FORM_MPAA, mpaa.rating()) if mpaa.error(): util.logError("%s: problem with MPAA site" % movie["label"]) elif movie["mpaa"] != formattedRating: util.executeJSON('VideoLibrary.SetMovieDetails', { 'movieid': movie['movieid'], 'mpaa': formattedRating }) util.log("%s: updated from %s to %s" % (movie["label"], movie["mpaa"], formattedRating)) return 1 return 0
def updateMovie(self, movie, position): util.executeJSON('VideoLibrary.SetMovieDetails', {'movieid': movie['movieid'], 'top250': position})
def updateMovie(self, movie, position): util.executeJSON('VideoLibrary.SetMovieDetails', { 'movieid': movie['movieid'], 'top250': position })