Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant "No Matches Found" on select shows. #38

Closed
ilikpoptarts opened this issue Nov 16, 2022 · 9 comments
Closed

Instant "No Matches Found" on select shows. #38

ilikpoptarts opened this issue Nov 16, 2022 · 9 comments
Assignees
Labels
Milestone

Comments

@ilikpoptarts
Copy link

ilikpoptarts commented Nov 16, 2022

Searching for a match instantly replies with "no matches found" no matter the search query. This only happens on select shows. I've provided the log of this behavior here > https://hastebin.com/raw/pitilatope . I took the liberty of dividing up the log into sections for each search, with an explanation of the basic behavior for each. All the shows in the log were added on the same date. I am stumped. Of 37 shows added, 8 show the behavior of instant "No Matches Found" like the 2 in the log.

This has happened previously to me, usually when adding more than 5 or so shows at once, the system feels like it gets bogged and I'm only able to match a show after allowing the previously-matched show to load all its metadata, otherwise it will show no search results.

However, this is the first time that it has consistently had this behavior for over a day. I have tried reinstalling the agent, as well as cleaning database and bundles in plex settings. I have also tried matching these using [mal-<mal_id>] with the same results.

Thanks for all the support and the great agent.

edit: i'd also like to add, this was my reinstall experience: exit plex > delete MAL > launch plex & clean bundles > exit plex > put in new agent > launch plex. My main concern though, is that when I deleted the agent, and launched plex (with MAL agent deleted), the agent was still showing up in settings and available agents in the "Find Match" screen. Upon reinstalling, it also kept my previous settings in the MAL agent, which is understandable if settings are stored in a separate location. Is all of that expected behavior or did I miss something?

@Fribb
Copy link
Owner

Fribb commented Nov 16, 2022

When you have the "instant no matches found" then you also have a critical error so no surprises there because the Agent fails even before something the Agent is even doing something.

For "DanMachi" and "Management of a Novice Alchemist", could you share your file structure? According to the output you have or are requesting for Season 4 which isn't supported by the Agent, File organization should follow how MyAnimeList organizes it. That means each release needs to be its own Show in Plex.

That is, at least, the assumption of how the Agent works because the error is being thrown since it apparently cannot find either episode or Season 1 in the request you are making (this is for the .match file I implemented with the recent release).

weirdly enough, the "To your Eternity" has it as season 2 but there it works. Even stranger the "Management of a Novice Alchemist" has it as Season 1 but still fails.

I had this report on Reddit already but the Person never replied to my query for the file structure so I couldn't investigate this further without going on a wild goose chase.

A simple catch for that .match file part might suffice in this regard but I would like to be able to reproduce it.

@Fribb Fribb self-assigned this Nov 16, 2022
@mondychan
Copy link

I cannot bring anything new to the table regarding debugging this problem, but I have experienced it numerous times myself

Coudnt find any other solution that removing the folder with the series from my main anime folder,
remove the show (unmatched) inside plex,
add the folder back and rescan, that would refresh the (possibly?) broken DB entry and would match as usual

@EZarnosky
Copy link

Normally my stuff matches (although I have hot had to rebuild my library in quite some time), but I have one "Do It Yourself!!" that will not match. Is the myanimelist-id: option still there, because that is not working either.

@Fribb
Copy link
Owner

Fribb commented Nov 16, 2022

Normally my stuff matches (although I have hot had to rebuild my library in quite some time), but I have one "Do It Yourself!!" that will not match. Is the myanimelist-id: option still there, because that is not working either.

Please see the Force a match section.

To keep it consistent I changed it from myanimelist-id:XXXX to [mal-XXXXX] so that it also works with the Absolute Series Scanner output.

@ilikpoptarts
Copy link
Author

ilikpoptarts commented Nov 16, 2022

Wow what a strange issue. So an hour ago I checked the 8 shows that had this problem, but while I was asleep, 4 out of 8 can now find a match, and I changed nothing. (as a recap, out of 37 shows, 8 were not matching. Now only 4 are not matching) So for some reason, time seems to slowly fix this issue. (this is day 2 or 3 for some shows). However I'm impatient, so here are my other findings. buckle up 😛

In regards to file structure & multi-season shows

I suppose I do use this agent differently than intended, in that I don't care about metadata on anything past season 1. In other words I just want poster (I use TVDB api), show synopsis, and ratings. (I use this over HAMA since MAL ratings never populated for me on HAMA). My use case has no need for episode metadata. For example, I have Gintama with 8 seasons, and Danmachi is the same case. I match Danmachi, it shows all seasons, but only populates first season metadata... pic (which im perfectly happy with)
-Danmachi
--Season 1
---Danmachi S01E01 [file info]
--Season 2
--Season 3
--Season 4 (this is the unmatched one)
Under usual circumstances I could match season 4 (most times it auto-matches into same show but this time it didn't) and it would be added into the rest of the series. In this case, I fixed it by simply merging it into the series (select existing danmachi>select S4>click 3 dots at top>merge. Here is the picture of the show after merge.
edit: just wanted to clarify. I would normally match Season 4 to what is actually Season 1 of the show, and it would add it with the rest.

However, all of this is just my use case, and ultimately this is happening with other shows, so I'll move on to my other findings.

In regards to @mondychan 's solution

As for "Management of a Novice Alchemist" I tested @mondychan 's idea. In fact, all I did was change the folder name from
Management of a Novice Alchemist > Management of a Novice Alchemist [test]
Scanned, and it found results. Fixed.
I then removed the [test] and switched it back to the old name, and it still found results.
File structure is
-Management of a Novice Alchemist
--Season 1
---Title S01E01

The same file structure is used in all the recent added shows. And another strange finding for me was a show Gin no Guardian (The Silver Guardian). Mondy's fix did not work for this show. Nothing worked for this show. Maybe time will eventually fix it. I changed folder names, Gin no Guardian didn't work and The Silver Guardian didn't work. I changed file structure, Show Folder>Season Folder>Video Files didn't work. Show Folder>Video Files didn't work. Neither did .match nor force matching via search work. So I'm stumped on that one.

In regards to matching Do It Yourself!!

@EZarnosky Do It Yourself is one that I had issues with as well. However, it was one where I could search other show's titles and it would come up with results. None of DIY's titles worked for me though. Only thing that worked for me was was forcing a match ( typing [mal-48542] ) into the manual search. Hope that helps.

Also wanted to add that through troubleshooting that show, I also found that I cannot use .match files where the file structure is Show>Season Folder>Video Files. The only time .match files worked is when the structure is Show>Video Files, like shown in the Force a match section (Force Match using the search function worked on either one though)

@Fribb
Copy link
Owner

Fribb commented Nov 17, 2022

I use this over HAMA since MAL ratings never populated for me on HAMA

HAMA uses a severely outdated and copied MAL code from this Agent, I have seen this stated a few times that people somehow got metadata with HAMA from MAL which just isn't possible because the API is offline for years now.

However, the MALAgent does accept Metadata from HAMA which might be something you could look into and try out by setting MAL as the main provider and setting HAMA as the secondary provider.

Danmachi

Yeah, with the implementation of the Match file I specifically look for Season 1 Episode 1 to get the path to the match file. apparently, in some cases, this path or rather the media object does not contain Season 1 and/or Episode 1 which is why it fails.

I am wondering since you are organizing your files according to Seasonal structure how it would behave with the absolute structure. Example, by using the Absolute Series Scanner and having your files organized like this:

  • Gin no Guardian
    • Gin no Guardian - 01

Regardless of this outcome, I will add something this weekend to catch the error so that the Agent doesn't fail completely and prevent Metadata retrieval.

Still, the agent is designed to work only with Absolute order and one seasons so anything other you will not get episode metadata for other seasons.

@Fribb Fribb added the bug label Nov 17, 2022
@Fribb Fribb added this to the 7.3.2 milestone Nov 17, 2022
@ilikpoptarts
Copy link
Author

Just wanted to mention 2 things after reading this over again...
I did not have Gin no Guardian episode 1 in the folder, in fact I just had episode 4 since I was testing things. That may be the reason it couldn't match no matter what?

Also wanted to mention that I have had HAMA as a secondary agent selected for the past couple months and it has never provided metadata for a series. I added it under the mal agent mainly hoping for FanArtTV posters, or season posters and themes if I was lucky. From that experience, I assumed that there just wasn't a way for HAMA to know what series it needed to grab metadata for. But I suppose if it gets the mal ID it can do its matching magic. Maybe it's user error on my part somewhere.
pic of agent settings

@ilikpoptarts
Copy link
Author

ilikpoptarts commented Nov 19, 2022

Oh boy. I think the problem has been found for the original matching issue.

Yeah, with the implementation of the Match file I specifically look for Season 1 Episode 1 to get the path to the match file. apparently, in some cases, this path or rather the media object does not contain Season 1 and/or Episode 1 which is why it fails.

If that is the case with match/search function in plex as well, that may have been the issue. It's very likely that my sonarr instance had simply not grabbed the first episode of those series yet. In fact, I added more series today. 3 of them didnt match, and came up with instant No Matches Found. After reading that comment I checked, and none of those 3 series had an EP1 in them yet. I then added the first episode to one of them, and it instantly found a match. Looking back now I can't believe I didn't think about that sooner. If that is the intended way of it working, might I suggest specifically stating on the readme page something along the lines of "it uses EP01 to match the show"? I always assumed it used the folder name.

Also, while my new series are working now immediately after adding EP1, Management of a Novice Alchemist was an outlier. I double checked just now, and episodes 1-6 were in the folder and scanned by plex before creating this post. So what I've learned from this so far is this...
If it doesn't work, it prob doesnt have EP1 yet. If it still doesnt work after that, rename folder/move folder, scan, then re-add it, as @mondychan said.

@Fribb
Copy link
Owner

Fribb commented Nov 19, 2022

yeah, there is no difference between the automatic match and the manual match in terms of its functionality. The only difference is that you select the search result on a manual match instead of Plex deciding which one to pick.

Still, the issue is a problem I haven't thought about and will fix today. I will first have to check if a Season 1 exists (because that is the intended and recommended use for the agent) and when that is the case to pick whatever episode number is being used to find the match file.

This should then cover the bases and even if someone has a show that doesn't have an episode 1 yet or uses season organization it shouldn't fail completely.

@Fribb Fribb closed this as completed in 51ad576 Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants