added = collection_changes['added']['episodes'] updated = collection_changes['updated']['episodes'] existing = collection_changes['existing']['episodes'] if added > 0: print " Added: {} episodes".format(added) if updated > 0: print " Updated: {} episodes".format(updated) if existing > 0: print " Existing: {} episodes".format(existing) if added == 0 and updated == 0 and existing == 0: print ' Show not found.' print ' Importing watched episodes...' watched_data = my_episodes.get_seen_episodes(show["id"]) watched_changes = trakt.add_to_watched_history(tvdb_data['seriesname'], tvdb_data['id'], watched_data) added = watched_changes['added']['episodes'] if added > 0: print " Added: {} episodes".format(added) else: print ' Show not found.' print ' Adding show to watch list...' watchlist_changes = trakt.add_to_watchlist(tvdb_data['seriesname'], tvdb_data['id']) added = watchlist_changes['added']['shows'] existing = watchlist_changes['existing']['shows'] not_found = watchlist_changes['not_found']['shows']
added = collection_changes['added']['episodes'] updated = collection_changes['updated']['episodes'] existing = collection_changes['existing']['episodes'] if added > 0: print " Added: {} episodes".format(added) if updated > 0: print " Updated: {} episodes".format(updated) if existing > 0: print " Existing: {} episodes".format(existing) if added == 0 and updated == 0 and existing == 0: print ' Show not found.' print ' Importing watched episodes...' watched_data = my_episodes.get_seen_episodes(show["id"]) watched_changes = trakt.add_to_watched_history( tvdb_data['seriesname'], tvdb_data['id'], watched_data) added = watched_changes['added']['episodes'] if added > 0: print " Added: {} episodes".format(added) else: print ' Show not found.' print ' Adding show to watch list...' watchlist_changes = trakt.add_to_watchlist( tvdb_data['seriesname'], tvdb_data['id']) added = watchlist_changes['added']['shows'] existing = watchlist_changes['existing']['shows']