plexrequests-meteor icon indicating copy to clipboard operation
plexrequests-meteor copied to clipboard

TVMAZESearch Error -> Cannot read property 'medium' of null

Open Cruv opened this issue 10 years ago • 8 comments

Hello,

I just updated to 1.8.3. When I search for a TV show no results show up and the logs say TVMAZESearch Error -> Cannot read property 'medium' of null

Any idea what this could be? Let me know if I need to provide any extra information.

Thanks and great work!

Cruv avatar Mar 27 '16 19:03 Cruv

@rigrassm any thoughts? Is this your package or something in PR?

lokenx avatar Mar 28 '16 00:03 lokenx

@lokenx Having the same problem in PR. Also the search for Tv Shows is way off, cannot search for instance "Vikings" os "The originals" always gives no results found,

HenriqueKunha avatar Mar 28 '16 08:03 HenriqueKunha

@Cruv tvmaze results send a Medium sized poster and full sized. That error means the particular result doesn't have a Medium size. I'll look into putting a check in for that and to fall back to the original if it's not there.

@HenriqueKunha I'm not able to reproduce the issues with those shows. I'm searching for those exact terms and am getting what I'm assuming should be the correct results.

That said, I have been running the version from my repo that I had submitted as the pull request so I'm guessing something happened when the two were merged. I'm going to start digging into it now and see what's going on.

RickyGrassmuck avatar Mar 28 '16 11:03 RickyGrassmuck

I think I found the bug and should have a PR submitted soon to fix it in a bit. Tvmaze if pulling the correct results but the way I was enumerating the results was causing it to sometimes skip the first index item thus leaving out the most relevant result(definitely not a good thing lol)

RickyGrassmuck avatar Mar 28 '16 12:03 RickyGrassmuck

As for the original bug of not finding the medium poster; I'm 99%sure this is not an actual error but rather a byproduct of having the reactive search interface that updates while you type. Essentially, some a new search is performed with each keystroke which occasionally won't have a valid result returned hence not being able to find the poster.

So while that's not an issue itself, the amount of requests being made and the lack of checking for a valid object being returned is and will be addressed.

RickyGrassmuck avatar Mar 28 '16 13:03 RickyGrassmuck

You guys are quick. Glad it wasn't just me having the issue though since I had tried a fresh install to fix it and the issue was still there. Thanks again @rigrassm & @lokenx

Cruv avatar Mar 28 '16 17:03 Cruv

Issues here are resolved in the latest commit. Update to 1.8.5 and you should be good to go.

RickyGrassmuck avatar Mar 30 '16 17:03 RickyGrassmuck

Thanks @rigrassm, I'll give it a try tonight when I get home.

Cruv avatar Mar 30 '16 17:03 Cruv