Example #1
0
def guide_movies_play(src, id, mode="external"):
    import_tmdb()
    tmdb_id = None
    if src == "tmdb": tmdb_id = id
    elif src == "imdb":
        info = tmdb.Find(id).info(external_source="imdb_id")
        try: tmdb_id = info["movie_results"][0]["id"]
        except (KeyError, TypeError): pass
    if tmdb_id: play_movie_from_guide(tmdb_id, mode)
    else: plugin.set_resolved_url()
Example #2
0
def guide_movies_play(src, id, mode):
    import_tmdb()
    tmdb_id = None
    if src == "tmdb": tmdb_id = id
    elif src == "imdb":
        info = tmdb.Find(id).info(external_source="imdb_id")
        try: tmdb_id = info["movie_results"][0]["id"]
        except (KeyError, TypeError): pass
    if tmdb_id: play_movie_from_guide(tmdb_id, mode)
    else: plugin.set_resolved_url()
Example #3
0
def action_cancel(clear_playlist=True):
    if clear_playlist: xbmc.PlayList(xbmc.PLAYLIST_VIDEO).clear()
    plugin.set_resolved_url()
    xbmc.executebuiltin('Dialog.Close(okdialog, true)')
Example #4
0
def action_cancel(clear_playlist=True):
    if clear_playlist:
        xbmc.PlayList(xbmc.PLAYLIST_VIDEO).clear()
    plugin.set_resolved_url()
    xbmc.executebuiltin("Dialog.Close(okdialog, true)")