From cf9e0ae3cd90e7a460a8c5a58770bf23e30dc143 Mon Sep 17 00:00:00 2001 From: Frederic Esser Date: Thu, 15 Sep 2022 07:33:30 +0200 Subject: [PATCH] changed .match guid to mal-id using only guid as a key is too ambiguous for a MyAnimeList specific usage. The key for the MyAnimeList ID was changed to mal-id. --- Contents/Code/utils/common.py | 5 +++-- Contents/Code/utils/myanimelistagent.py | 4 ++-- README.md | 4 ++-- VERSION | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Contents/Code/utils/common.py b/Contents/Code/utils/common.py index 1798739..3d804c5 100644 --- a/Contents/Code/utils/common.py +++ b/Contents/Code/utils/common.py @@ -276,9 +276,10 @@ def readMatchFile(self, path): elem = elem.replace("\r", "") if elem.startswith('title'): matchValues['title'] = elem.replace("title: ","") - if elem.startswith('guid'): - matchValues['guid'] = elem.replace("guid: ","") + if elem.startswith('mal-id'): + matchValues['mal-id'] = elem.replace("mal-id: ","") + Log.Debug("[" + self.AGENT_NAME + "] " + ".match values: " + str(matchValues)) return matchValues except Exception as e: diff --git a/Contents/Code/utils/myanimelistagent.py b/Contents/Code/utils/myanimelistagent.py index 4fc9203..07ed585 100644 --- a/Contents/Code/utils/myanimelistagent.py +++ b/Contents/Code/utils/myanimelistagent.py @@ -52,9 +52,9 @@ def search(self, results, media, lang, manual, type): Log.Info("[" + self.AGENT_NAME + "] " + ".match file found") matchFileDict = self.COMMON_UTILS.readMatchFile(matchFileLocation) - if "guid" in matchFileDict: + if "mal-id" in matchFileDict: # the MyAnimeList ID is available in the .match file - title = title + "[mal-" + matchFileDict['guid'] + "]" + title = title + "[mal-" + matchFileDict['mal-id'] + "]" elif "title" in matchFileDict: # a title is available in the .match file, use that instead of the media title title = matchFileDict['title'] diff --git a/README.md b/README.md index 37c9140..8bd2d05 100644 --- a/README.md +++ b/README.md @@ -199,13 +199,13 @@ Since I didn't want it to be Plex-specific, the Agent will read a .match file fr * .match * 91 Days - 01.ext -Currently, the Agent will only check for 2 values `title` and `guid`, the `guid` is prioritized so that if a GUID is set, the Agent will force a match to that ID. +Currently, the Agent will only check for 2 values `title` and `mal-id`, the `mal-id` is prioritized so that if a GUID is set, the Agent will force a match to that ID. A Match file could therefore look something like this: ``` title: 91 Days -guid: 32998 +mal-id: 32998 ``` With Applications like FileBot or ShokoServer that can rename your files automatically and that use AniDB, diff --git a/VERSION b/VERSION index fbdff3b..42a4032 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ -#Tue, 13 Sep 2022 13:51:14 +0200 +#Thu, 15 Sep 2022 07:17:54 +0200 major.number=7 minor.number=3 -build.number=0 +build.number=1