Example #1
0
def watch(showname, cache, episodestring):
    logger.info("watch({name}, {epstring})".format(name=showname, epstring=episodestring))
    seasonnum, episodenum = getepisodeinfo(episodestring)
    assert(seasonnum is not None and episodenum is not None)
    episode = cache.getepisode(showname, seasonnum, episodenum)
    if watchepisode(episode):
        cache.markwatched(episode)
    askwatchnext(showname, cache)
Example #2
0
def watchnext(showname, cache):
    logger.info("watchnext")
    episode = cache.getnextepisode(showname)
    if episode is None:
        print("Couldn't find any new episodes!")
        if yesno("Would you like to update the cache?"):
            update(showname, cache)
            watchnext(showname, cache)  # this could be an endless loop.
        return
    if watchepisode(episode):
        cache.markwatched(episode)
    askwatchnext(showname, cache)