This results in warining message "Title was not available" (jikan.py) and plex ignoring rest of the metadata update (summary, rating etc.).
Defaulting to "title" field works on my setup:
# get the Title that the user desires from the JSON response and add it to the metadata, if that title isn't available then default to the main
preferredTitle = str(Prefs["preferredTitle"])
apiTitle = None
if preferredTitle == "Japanese":
apiTitle = self.COMMON_UTILS.getJsonValue("title_japanese", detailResult)
elif preferredTitle == "English":
apiTitle = self.COMMON_UTILS.getJsonValue("title_english", detailResult)
if apiTitle is None:
apiTitle = self.COMMON_UTILS.getJsonValue("title", detailResult)
if apiTitle is not None:
Log.Debug("[" + self.AGENT_NAME + "] " + "Title (" + preferredTitle + "): " + str(apiTitle))
metadata.title = str(apiTitle)
else:
Log.Warn("[" + self.AGENT_NAME + "] " + "Title was not available ")
In some cases API returns null as "title_english". Example: https://jikan.fribbtastic.net/v3/anime/42340
This results in warining message "Title was not available" (jikan.py) and plex ignoring rest of the metadata update (summary, rating etc.).
Defaulting to "title" field works on my setup: