Faster way to get fresh metadata?
It seems HAMA really struggles with getting fresh metadata fast whenever a new episode is released for an anime, which causes the episodes to have no title. The title will be there in a few days, or never, unless I do a Plex dance. Forcing metadata refresh in Plex does nothing. I think that's because it relies on the xml file, which probably isn't updated as frequently as... well, realtime? I might be misunderstanding it, but I couldn't find any info or previous issue where it was explained clearly. As an example, I added the update log of Lord of the Mysteries, which it last updated 27-7-2025 at 00:15. The episode has been out with the English title on tvdb for a while (which I have set up as priority in the agent settings for using the title), but as you can see, it clearly doesn't have a title. That's because it's looking at a cached data file from a day ago, which is now old.
Lord of Mysteries.agent-update.log episode_11218186_ja.json
[X] s1e 6 => s1e 6 air_date: 2025-07-26 language_rank: 0, title: "Episode 6"
common.LoadFile() - File cached locally - Filename: 'TheTVDB\json\464419\series_en.json', Age: '3.34 days', Limit: '6 days', url: 'https://api.thetvdb.com/series/464419?en'
common.LoadFile() - File cached locally - Filename: 'TheTVDB\json\464419\episodes_page1_en.json', Age: '3.34 days', Limit: '6 days', url: 'https://api.thetvdb.com/series/464419/episodes?page=1'
Since it caches for 6 days the results and you download the episode the day it airs, well...
I see. Is there a way to make that shorter? To 1 day or X hours? So it caches faster? I don't have a lot of anime so it shouldn't be a problem to cache it more frequently.
You could
Yes? How? Is there a config file or something?
Sorry it posted without finishing the phrase...
- edit the source to put 2 day
- custom search for a seried 'clear-cache' and cancel, then refresh metadata
From memory, i update seldomly on completed series, and weekly on currently running one, could be changed to daily...
Remove the '*6' in the line below in common.py
def LoadFile(filename="", relativeDirectory="", url="", headers={}, data=None, cache=CACHE_1DAY*6, sleep=0, throttle=["", 0, 0]):
custom search for a seried 'clear-cache' and cancel, then refresh metadata
I'm sorry but what do you mean by this?
Remove the '*6' in the line below in common.py
def LoadFile(filename="", relativeDirectory="", url="", headers={}, data=None, cache=CACHE_1DAY*6, sleep=0, throttle=["", 0, 0]):
Thank you! I've done that. I'm guessing restarting Plex afterwards is the only other thing I need to do, so I did that. Now to wait and see.
From memory, i update seldomly on completed series, and weekly on currently running one, could be changed to daily...
Yes normally it wouldn't be really necessary but for some context: I'm using TitleCardMaker to make custom posters, and these can't be applied if the titles of the episodes in Sonarr (which uses TVDB) and Plex aren't the same. TCM fails to recognize the episode if it has no title.
Update: putting it on 1 day does work, but only if I manually refresh the metadata of the entire show (per episode doesn't work). So even if 1 day has passed, the shows keep their old titles.