def RefreshList(): cj = common.mechanizeLogin() if not cj: return import tv import movies l = common.args.url mvlist = [] tvlist = [] pDialog = xbmcgui.DialogProgress() pDialog.create(common.__plugin__, common.getString(30117)) for asin in common.SCRAP_ASINS(common.movielib % l, cj): if not movies.lookupMoviedb(asin): mvlist.append(asin) for asin in common.SCRAP_ASINS(common.tvlib % l, cj): if not tv.lookupTVdb(asin, tbl='seasons'): tvlist.append(asin) if mvlist: movies.updateLibrary(mvlist) if tvlist: tv.addTVdb(False, tvlist, None) pDialog.close() if mvlist: movies.updateFanart() if tvlist: tv.updateFanart()
def RefreshList(): cj = mechanizeLogin() if not cj: return import tv import movies l = args.get('url') mvlist = [] tvlist = [] pDialog = xbmcgui.DialogProgress() pDialog.create(pluginname, getString(30117)) for asin in SCRAP_ASINS(movielib % l, cj): if not movies.lookupMoviedb(asin): mvlist.append(asin) for asin in SCRAP_ASINS(tvlib % l, cj): if not tv.lookupTVdb(asin, tbl='seasons'): tvlist.append(asin) if mvlist: movies.updateLibrary(mvlist) if tvlist: tv.addTVdb(False, tvlist, None) pDialog.close() if mvlist: movies.updateFanart() if tvlist: tv.updateFanart()
def RefreshList(): import tv import movies list_ = common.args.url mvlist = [] tvlist = [] pDialog = xbmcgui.DialogProgress() pDialog.create(common.__plugin__, common.getString(30117)) for asin in common.SCRAP_ASINS(common.movielib % list_): if not movies.lookupMoviedb(asin): mvlist.append(asin) for asin in common.SCRAP_ASINS(common.tvlib % list_): if not tv.lookupTVdb(asin, tbl='seasons'): tvlist.append(asin) if mvlist: movies.updateLibrary(mvlist) if tvlist: tv.addTVdb(False, tvlist) pDialog.close() if mvlist: movies.updateFanart() if tvlist: tv.updateFanart()