def start(): if ANILIST_SKIP_UPDATE == 'true': logger.warning( 'AniList skip list update enabled in settings, will match but NOT update your list' ) # Anilist anilist_username = anilist_settings['username'] anilist.custom_mappings = custom_mappings anilist.ANILIST_ACCESS_TOKEN = ANILIST_ACCESS_TOKEN anilist.ANILIST_SKIP_UPDATE = ANILIST_SKIP_UPDATE anilist_series = anilist.process_user_list(anilist_username) # Plex if not anilist_series: logger.error( 'Unable to retrieve AniList list, check your username and access token' ) else: plexmodule.plex_settings = plex_settings plex_anime_series = plexmodule.get_anime_shows() if (plex_anime_series is None): logger.error('Found no Plex shows for processing so exiting') return None plex_series_watched = plexmodule.get_watched_shows(plex_anime_series) if (plex_series_watched is None): logger.error( 'Found no watched shows on Plex for processing so exiting') return None anilist.match_to_plex(anilist_series, plex_anime_series, plex_series_watched) logger.info('Plex to AniList sync finished')
def start(): logger.info("PlexAniSync - version: %s" % (__version__)) if ANILIST_SKIP_UPDATE == "true": logger.warning( "AniList skip list update enabled in settings, will match but NOT update your list" ) if ANILIST_PLEX_EPISODE_COUNT_PRIORITY == "true": logger.warning( "Plex episode watched count will take priority over AniList, this will always update AniList watched count over Plex data" ) # Cleanup any old logs exists = os.path.isfile("failed_matches.txt") if exists: try: os.remove("failed_matches.txt") except BaseException: pass # Anilist anilist_username = anilist_settings["username"] anilist.custom_mappings = custom_mappings anilist.ANILIST_ACCESS_TOKEN = ANILIST_ACCESS_TOKEN anilist.ANILIST_PLEX_EPISODE_COUNT_PRIORITY = ANILIST_PLEX_EPISODE_COUNT_PRIORITY anilist.ANILIST_SKIP_UPDATE = ANILIST_SKIP_UPDATE anilist_series = anilist.process_user_list(anilist_username) # Plex if anilist_series is None: logger.error( "Unable to retrieve AniList list, check your username and access token" ) else: if not anilist_series: logger.error( "No items found on your AniList list for additional processing later on" ) plexmodule.plex_settings = plex_settings plex_anime_series = plexmodule.get_anime_shows() if plex_anime_series is None: logger.error("Found no Plex shows for processing") plex_series_watched = None else: plex_series_watched = plexmodule.get_watched_shows( plex_anime_series) if plex_series_watched is None: logger.error("Found no watched shows on Plex for processing") else: anilist.match_to_plex(anilist_series, plex_anime_series, plex_series_watched) logger.info("Plex to AniList sync finished")
def start(): if ANILIST_SKIP_UPDATE == 'true': logger.warning( 'AniList skip list update enabled in settings, will match but NOT update your list' ) # Cleanup any old logs exists = os.path.isfile("failed_matches.txt") if exists: try: os.remove("failed_matches.txt") except BaseException: pass # Anilist anilist_username = anilist_settings['username'] anilist.custom_mappings = custom_mappings anilist.ANILIST_ACCESS_TOKEN = ANILIST_ACCESS_TOKEN anilist.ANILIST_PLEX_EPISODE_COUNT_PRIORITY = ANILIST_PLEX_EPISODE_COUNT_PRIORITY anilist.ANILIST_SKIP_UPDATE = ANILIST_SKIP_UPDATE anilist_series = anilist.process_user_list(anilist_username) # Plex if anilist_series is None: logger.error( 'Unable to retrieve AniList list, check your username and access token' ) else: if not anilist_series: logger.error( 'No items found on your AniList list for additional processing later on' ) plexmodule.plex_settings = plex_settings plex_anime_series = plexmodule.get_anime_shows() if (plex_anime_series is None): logger.error('Found no Plex shows for processing') plex_series_watched = None else: plex_series_watched = plexmodule.get_watched_shows( plex_anime_series) if (plex_series_watched is None): logger.error('Found no watched shows on Plex for processing') else: anilist.match_to_plex(anilist_series, plex_anime_series, plex_series_watched) logger.info('Plex to AniList sync finished')
def start(): logger.info(f"PlexAniSync - version: {__version__}") anilist.CUSTOM_MAPPINGS = read_custom_mappings() if graphql.ANILIST_SKIP_UPDATE: logger.warning( "AniList skip list update enabled in settings, will match but NOT update your list" ) if anilist.ANILIST_PLEX_EPISODE_COUNT_PRIORITY: logger.warning( "Plex episode watched count will take priority over AniList, this will always update AniList watched count over Plex data" ) anilist.clean_failed_matches_file() # Anilist anilist_username = anilist_settings["username"] anilist_series = anilist.process_user_list(anilist_username) # Plex if anilist_series is None: logger.error( "Unable to retrieve AniList list, check your username and access token" ) else: if not anilist_series: logger.error( "No items found on your AniList list for additional processing later on" ) plexmodule.plex_settings = plex_settings plex_anime_series = plexmodule.get_anime_shows() if plex_anime_series is None: logger.error("Found no Plex shows for processing") plex_series_watched = None else: plex_series_watched = plexmodule.get_watched_shows( plex_anime_series) if plex_series_watched is None: logger.error("Found no watched shows on Plex for processing") else: anilist.match_to_plex(anilist_series, plex_series_watched) logger.info("Plex to AniList sync finished")