popcorn-official / popcorn-api

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player. Compatible API Anime/Movies/Show Scrapper
https://popcorntime.app
MIT License
622 stars 101 forks source link

Issue with thumbnail images #49

Closed JimiC closed 7 years ago

JimiC commented 7 years ago

Problem: Turns out that thumbnail images are mostly fetched from fanart. Unfortunately this service has a slow response time.

I have noticed that some images are trying to be fetched from walter.trakt.us and they fail because this service has been moved to walter.trakt.tv.

Solution: Consider switching the image fetching to https://walter.trakt.tv/

JimiC commented 7 years ago

Moved from https://github.com/popcorn-official/popcorn-desktop/issues/313

JimiC commented 7 years ago

So I dived into the code to figure out how the images are fetched.

I figured that all images are fetched from fanart.tv with a fallback to thetvdb.com. Now, reading on how trakt.tv gets its images, (and I chose Trakt because most of popcorn users use it), they use the following order:

  1. TMDB
  2. TVDB (only for shows)
  3. FANART

So maybe we should consider following the same order. Thoughts?

ChrisAlderson commented 7 years ago

Take the discussion to: https://github.com/popcorn-official/popcorn-api/issues/49

JimiC commented 7 years ago

@ChrisAlderson This is #49.

ChrisAlderson commented 7 years ago

Derp

voddan commented 7 years ago

Note that this issue seems to affect mostly anime titles: #326

JimiC commented 7 years ago

It's related as it has to do with the source popcorn is fetching the poster for each title.

momo82 commented 7 years ago

It looks like fanart.tv restricts traffic by region . Thumbnails stopped working for me recently ( only Anime tab thumbnails are working ). They only work (very slowly ) when I use an American proxy server .

I'm using the latest 64bit build from Jenkins , and I'm located in Syria .

ChrisAlderson commented 7 years ago

Order of fallback for movies:

Order of fallback for shows:

1a8b8f3fccc4f73199137ca5615a743c6c48fa85

JimiC commented 7 years ago

Just to clarify @ChrisAlderson comment.

Order of fallback for movies:

  1. tmdb
  2. omdb
  3. fanart.tv

Order of fallback for shows:

  1. tmdb
  2. tvdb
  3. fanart.tv
ChrisAlderson commented 7 years ago

ordered list unordered list, top to bottom you get it.

JimiC commented 7 years ago

@ChrisAlderson Just a suggestion to better handle the fallback. Currently the way the fallback is coded, the next provider is used only if the current provider is unreachable, and not if the image is not found.

Maybe you want to reconsider the logic of the fallback.

team-pct commented 7 years ago

@JimiC Can you send PR ? i will need @ChrisAlderson to work on structure ASAP 🎱

JimiC commented 7 years ago

@team-pct Sure I could do that.

team-pct commented 7 years ago

Really Great that you are just Shy ! Don't be

JimiC commented 7 years ago

@team-pct Will start working on it as soon as @ChrisAlderson PR gets merged.

team-pct commented 7 years ago

@JimiC merged

voddan commented 7 years ago

@team-pct what branch was it merged into? At what commit?

I can't see the difference in behaviour on master :(

JimiC commented 7 years ago

https://github.com/popcorn-official/popcorn-api/pull/55 development -> master

The commit is linked in @ChrisAlderson comment.

voddan commented 7 years ago

I see, thanks!

Was it supposed to resolve the problem I mentioned earlier at https://github.com/popcorn-official/popcorn-api/issues/49#issuecomment-259542451? I don't notice any changes. Does it work for you?

JimiC commented 7 years ago

Actually it does. Anime images are fetched from Hummingbird, so if you still experience issues check that your machine isn't blocking it. screen shot 11-20-16 at 02 58 pm

voddan commented 7 years ago

@JimiC you are right, I wasn't able to go to https://hummingbird.me/ without a VPN (I work from Russia).

The error in my browser (chrome) was:

This site can’t provide a secure connection hummingbird.me didn’t accept your login certificate, or your login certificate may have expired. Try contacting the system admin. ERR_BAD_SSL_CLIENT_AUTH_CERT

Is there a way to fix that except for a system-wide VPN?

JimiC commented 7 years ago

Probably the certificate of Humminbird your chrome is using has expired.

Clearing the SSL state might help.

JimiC commented 7 years ago

@team-pct This is not an issue with popcorn-api.

team-pct commented 7 years ago

Thank you @JimiC

momo82 commented 7 years ago

The issue is solved in the latest build .

Thank you .

voddan commented 7 years ago

@JimiC unfortunately clearing the chrome's SSLs did not help. But anyway this is PCT that I care about, not Chrome. I guess PCT must use system's SSL certificates, but my Mac KeyChain contains nothing out of order. What might be the issue here?

JimiC commented 7 years ago

Beats me. Correct me if I'm wrong but I think PCT is using V8 engine (same as Chrome). So if you can make your Chrome browse to Hummingbird when PCT will too.

voddan commented 7 years ago

@JimiC AFAIU, it depends not on the js engine, but on the security policy. For some reason https://hummingbird.me/ requests an (optional) client SSL certificate, which (many?) computers do no have.

I believe a client may choose to ignore this and connect without a certificate. This is usually the case with Chrome, but not on my machine (OS X 10.11.6).

Maybe it is possible to make PCT ignore the security when fetching the thumbnails?

JimiC commented 7 years ago

@voddan Unfortunately even trying to connect to http://hummingbird.me redirects to https. I don't believe that there is something more the team can do about it. I would really appreciated if @ChrisAlderson could give us his insight.