def GetAniDBTVDBMap(): global AniDBTVDBMap AniDBTVDBMap = common.LoadFile(filename=os.path.basename(SCHUDLEE_MASTER), relativeDirectory="AnimeLists", url=SCHUDLEE_MASTER, cache=CACHE_1DAY * 6) # if not AniDBTVDBMap: Log.Critical( "GetAniDBTVDBMap() - Failed to load core file '{file}'".format( url=os.path.splitext(os.path.basename(SCHUDLEE_MASTER))) ) #; AniDB_Movie_Set = XML.ElementFromString("<anime-set-list></anime-set-list>") #; raise Exception("HAMA Fatal Error Hit") AniDBTVDBMap = MergeMaps( AniDBTVDBMap, common.LoadFile(filename=os.path.basename(ASS_SCHUDLEE_CORRECTIONS), relativeDirectory="AnimeLists", url=ASS_SCHUDLEE_CORRECTIONS, cache=CACHE_1DAY * 6)) #Online ScudLee anidb to tvdb mapping list
def GetAniDBTVDBMap(): global AniDBTVDBMap MAPPING = 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml' # ScudLee mapping file url MAPPING_FIX = 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml' # ScudLee mapping file url online override AniDBTVDBMap = common.LoadFile(filename=os.path.basename(MAPPING), relativeDirectory="AnimeLists", url=MAPPING, cache=CACHE_1DAY * 6) # if not AniDBTVDBMap: Log.Critical( "GetAniDBTVDBMap() - Failed to load core file '{file}'".format( url=os.path.splitext(os.path.basename(MAPPING))) ) #; AniDB_Movie_Set = XML.ElementFromString("<anime-set-list></anime-set-list>") #; raise Exception("HAMA Fatal Error Hit") AniDBTVDBMap = MergeMaps( AniDBTVDBMap, common.LoadFile(filename=os.path.basename(MAPPING_FIX), relativeDirectory="AnimeLists", url=MAPPING_FIX, cache=CACHE_1DAY * 6)) #Online ScudLee anidb to tvdb mapping list
def GetAniDBTVDBMap(): global AniDBTVDBMap MAPPING = 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml' # ScudLee mapping file url MAPPING_FIX = 'https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml' # ScudLee mapping file url online override MAPPING_LOCAL = os.path.join( common.CachePath, 'AnimeLists', 'anime-list-custom.xml' ) # Custom mapping list(PlexRoot, "Plug-in Support", "Data", "com.plexapp.agents.hama", "DataItems", 'AnimeLists', 'anime-list-corrections.xml') AniDBTVDBMap = common.LoadFile(filename=os.path.basename(MAPPING), relativeDirectory="AnimeLists", url=MAPPING, cache=CACHE_1DAY * 6) # if not AniDBTVDBMap: Log.Critical( "GetAniDBTVDBMap() - Failed to load core file '{file}'".format( url=os.path.splitext(os.path.basename(MAPPING))) ) #; AniDB_Movie_Set = XML.ElementFromString("<anime-set-list></anime-set-list>") #; raise Exception("HAMA Fatal Error Hit") MergeMaps(AniDBTVDBMap, common.LoadFile(filename=os.path.basename(MAPPING_FIX), relativeDirectory="AnimeLists", url=MAPPING_FIX, cache=CACHE_1DAY * 6)) #Online ScudLee anidb to tvdb mapping list if os.path.exists( MAPPING_LOCAL): #Local ScudLee anidb to tvdb mapping list Log.Info("GetAniDBTVDBMap() - Loading local custom mapping - url: " + MAPPING_LOCAL) try: MergeMaps(AniDBTVDBMap, XML.ElementFromString(Core.storage.load(MAPPING_LOCAL))) except Exception as e: Log.Info( "GetAniDBTVDBMap() - Failed open scudlee_filename_custom, error: '%s'" % e) else: Log.Info( "GetAniDBTVDBMap() - Local custom mapping file not present: {}". format(MAPPING_LOCAL))