Hi All
I have noticed that when you try to add shows from "traktList=popular" there are no posters that loads with the shows.
I wonder if this is related to https://github.com/SickRage/SickRage/issues/2653 OR is this an different issue.
If this is an WIP or are aware please close this if not is there an eta at all.
Thanks a lot again :)
Branch/Commit: master / a3ce318f2c3b207da474db4c8e3cf62bb9032e0e
OS: Synology
What you did: Tried to add shows from - https://IPADDRESS:PORT/addShows/trendingShows/?traktList=popular
What happened: No Posters Loaded
What you expected: Posters Loaded
Logs:
No Logs To Provide As None Was Generated As No Errors In Logs.
Thanks for the issue report! Before a real human comes by, please make sure your report has all the below criteria checked
Please make sure you also read how to create an issue and followed all of the steps.
The title should describe your issue. Having "SR not working" or "I get this bug" for 100 issues, isn't really helpful. We will close issues if there isn't enough information.
Sometimes the devs may seem like grunts and respond with short answers. This isn't (always) because the dev hates you, but because he's on mobile or busy fixing bugs. If something isn't clear, please let us know, and this bot may get updated to automatically answer you.
Thanks!
The reason for this is that the Trakt.tv API no longer serves images.
Instead, Trakt recommends using other services such as TMDB, TVDB, IMDB etc to get the images.
This same issue was reported in #2492.
@NickMolloy thanks for the info. Is there no way to use IMDB for Images or is that a lot of work ?
I had a look at using OMDb to supply the posters, but for some reason, the poster returned for some shows is not the right aspect ratio, and so they get squashed.
OMDb has a new poster API in closed beta, so maybe waiting for that to be available is best.
tvdb will be the replacement like all other sickbeard forks. Just wait for @miigotu to update this repo.
Thanks
@miigotu any tips on how I should do the caching of the images?
I already managed to get them from tvdb, but still need a good reference for caching.
We have a backed for caching images from tvdb, you just add an ajax view to webserver, and add the URI to that view in data-src, then have it replace the poster once the view is returning an image. In the view you start the caching process if it hasn't been cached yet.
I implemented a working version, but it seems quite slow since we need to get 100 images for the trending trakt shows via the tvdb api... And since there are also new series in it, even without images on tvdb, we can get some images series without images...
Perhaps I'll have a look if we can't parse the poster path from the trakt site since we do get the trakt_url for the show.
Seems like you are trying to DL all of the images at once? The ajax should be attached to each show container and the webserver caches them in the backend. The ajax calls the webserver and if the image is cache return the cached image so the ajax can replace the poster src, otherwise it starts the caching of the image if it hasnt already started caching it and returns that it doesnt have it yet (image stays the trakt no image). When the webserve responds to the ajax that the image is downloaded it changes the src of the poster in the template
^ Oh, so it downloads using a different thread and doesn't clog up the loading of the page!
That's one of the issue I ran into!
Yep this lets the page load immediately, and as images become available the "no image" is replaced one by one
@h3llrais3r Might I suggest a small note while it's loading images - to let the user know it's getting images.
I'll push the branch to the sickrage repo, so you can both have a look.
It's easier to discuss.
EDIT: in fact I made it in the same way as the imdbPopular logic works... And here all the images are cached when retrieving them from imdb.
In fact it's slow due to the retrieval of series that don't have any data yet on tvdb.
This results in retries that slow everything down.
For example:
HTTP error None while loading URL http://thetvdb.com/api/F9C450E78D99172E/series/318689/en.xml, Retrying in 3 seconds...
HTTP error None while loading URL http://thetvdb.com/api/F9C450E78D99172E/series/318689/en.xml, Retrying in 6 seconds...
HTTP error None while loading URL http://thetvdb.com/api/F9C450E78D99172E/series/318689/en.xml, Retrying in 12 seconds...
19:31:42 WARNING::Thread-24 :: Unable to look up show on theTVDB, not downloading images: error HTTP error None while loading URL http://thetvdb.com/api/F9C450E78D99172E/series/318689/en.xml
19:31:42 DEBUG::Thread-24 :: theTVDB may be experiencing some problems. Try again later.
Yes, but if it is done via ajax it wont stop the page from loading, it will load the page and then call to webserve (which is asynchronous)
Also, each image will have its own seperate call, so one image being slow will not cause another image to not load right away.
I overcame that by searching tvdb by show['show']['title'] (of trakt) and matching the indexer to see if it exists on TVDB.
I believe the TVDB_API_V2 fixes that, but it's too much of a hassle to implement.
@sharkykh tvdb api v2 is very important that we implement soon. api1 is already showing signs of a problem since they dont update it instantly when changes are made, only daily or maybe even less often now. They are phasing it out.
The whole indexer_api garbage needs taken out and done in a better way anyways imho.
You can generate a code using swagger-codegen (which I did) but it's even messier.
I didn't know where to begin.
@h3llrais3r
Maybe do
try:
# get from tvdb
except requests.exceptions.HTTPError():
pass
~just to see if it works.~
Doesn't work.
Do we have have code that caches the images via ajax?
Because I based myself on imdbPopular...
And what I also find strange is that there are trending shows that still need to air... :thinking:
That's the most anticipated list
Branch pushed: https://github.com/SickRage/SickRage/tree/trakt-images
@sharkykh You're right 馃槈
Umm you didn't push any commits to trakt-images
LOL, forgot them.
EDIT: pushed.
We dont have ajax that checks data-src to cache them. This whole thing is really easy tbh. Its maybe 20 lines of python and javascript combined
Most helpful comment
I'll push the branch to the sickrage repo, so you can both have a look.
It's easier to discuss.
EDIT: in fact I made it in the same way as the imdbPopular logic works... And here all the images are cached when retrieving them from imdb.