Linux Problem Loading Posters
#16
Oops. Okay, I went to the Add-ons page and updated bth the TMDB and TMDB Python scrapers. They downloaded and seem to be installed again.

Then:
Quote:$ sudo rm -R /home/kodi/.kodi/userdata/addon_data/metadata.themoviedb.org
$ sudo rm -R /home/kodi/.kodi/userdata/addon_data/metadata.themoviedb.org.python

Rebooted. Then, changed the scraper for the source to FilmAffinity, then changed back to TMDB Python.

Tried refreshing the movie data from TMDB. Still no effect.

Latest log: http://paste.ubuntu.com/p/qqRHFgsw9m/
Reply
#17
Ok, that seems to have cleared out the settings errors.

Now looking at the movie The Sea of Genkai, there is only one poster available. It is marked as Japanese. You have your scraper set to English, so you won't get a poster for that movie.
https://www.themoviedb.org/movie/169923-...es/posters

You will need to download it manually and save it next to your movie file and name it The Sea of Genkai (1976) - [II]-poster.jpg
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#18
Hmm. Is there a way to override this behavior, or set multiple languages?

From what you're saying, I can only get posters in English, i.e., Japanese, French, Italian, Polish, etc. won't download.

If it's not possible to change this, it's hugely inconvenient. :/
Reply
#19
(2021-02-02, 07:05)mrob Wrote: If it's not possible to change this, it's hugely inconvenient. :/
No. Languages are difficult to work around. It requires multiple API calls, multiple settings in the scraper and would be unreasonable to accommodate for both our developers and the API site hosting the content with the dramatic increase in traffic. Remember it won't be only you that gets these changes, millions of users will get the changes.

It is expected that if you want English language, then you want English posters. If you want German language, you want German posters. You can set a language for artwork, and if your language is not available, then it will fall back to English. With 200+ languages, try and imagine the code required to fallback and keep falling back to a different language until it finds a poster.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#20
Thanks for clarifying this. The issue I see here is that there are countless films for which there is only a poster in the original language. The way the scrapers work now, posters for these films must all be downloaded and set up manually.

I looked at the TMDB API and it seems the query parameter for language is optional for both /movie/{movie_id} and /movie/{movie_id}/images.

I'm assuming it returns JSON array that contains file_paths, not actual poster objects, and that if no language parameter is set, it will just return everything.

It seems like it should only require one API call to /movie/{movie_id} and /movie/{movie_id}/images to get all the data to build the poster URLs. The actual posters don't need to be downloaded yet.

What about a setting in the scraper to just default to the first available poster? In that way, no language settings would need to be used.
Reply
#21
(2021-02-02, 07:44)mrob Wrote: It seems like it should only require one API call to /movie/{movie_id} and /movie/{movie_id}/images to get all the data to build the poster URLs. The actual posters don't need to be downloaded yet.

What about a setting in the scraper to just default to the first available poster? In that way, no language settings would need to be used.
That would be a question for @rmrector the developer of the scraper.

There have been changes to artwork at TheMovieDB since this scraper was created back in 2019 (which is why a couple of months ago we were having so much trouble with posters) so maybe it is now possible, I don't know.

But you seem to know your way around the code, a PR would always be welcome if you find a way to do what you need and does not negatively affect the scraper.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#22
@Karellen

Thanks for cc'ing the developer. Actually, I just looked at the TMDB API. I haven't peeked at the actual code for the scraper, and am not familiar with how it works inside.

So, I hope the developer will weigh in on this.
Reply
#23
This one I'll pass to @pkscout. That is how it was originally designed, but it seems the new API wrapper doesn't play along.
Reply
#24
(2021-02-03, 02:51)rmrector Wrote: This one I'll pass to @pkscout. That is how it was originally designed, but it seems the new API wrapper doesn't play along.

What is the expected behavior? Is the expectation that you will get back all images in all languages all the time, or only if there are no matches for SELECTED LANGUAGE, English, NULL? I see where the wrapper is setting the language, but I'd need to dig into the upstream code a little to figure out if I made an inadvertent change when we updated to the new wrapper or have a mistake in the wrapper. It's going to be a couple days before I can look at this though. I've got a bit of a family emergency and won't be available until later this week at the earliest.
Reply
#25
@pkscout 

Ah, sorry to hear. Hope the emergency can be brought under control.

The expected behavior of the scraper would be that if I have a film in my collection for which there is just one poster available in another language (e.g., Japanese), and thus no poster in my preferred language (e.g., English), that if I enable a setting switch in the scraper, then it will load and show me that poster in Japanese.

The way it works now, many films which do have a poster in the original language just show as blank. The scraper seems to assume that if it's not a poster in my "preferred language" then I don't want to see the poster at all. In fact, I do want to see a poster, and I don't care if it's in my preferred language or not. Seeing something is better than getting nothing at all.

What do you think about a switch to enable this as optional behavior?
Reply
#26
(2021-02-03, 04:09)mrob Wrote: @pkscout 

Ah, sorry to hear. Hope the emergency can be brought under control.

The expected behavior of the scraper would be that if I have a film in my collection for which there is just one poster available in another language (e.g., Japanese), and thus no poster in my preferred language (e.g., English), that if I enable a setting switch in the scraper, then it will load and show me that poster in Japanese.

The way it works now, many films which do have a poster in the original language just show as blank. The scraper seems to assume that if it's not a poster in my "preferred language" then I don't want to see the poster at all. In fact, I do want to see a poster, and I don't care if it's in my preferred language or not. Seeing something is better than getting nothing at all.

What do you think about a switch to enable this as optional behavior?
Thanks for the info, but I'm not looking to add a new behavior. I'm trying to get it to behave the way @rmrector expects it to behave (i.e. how it used to) because it looks like during some other updates I changed the way the scraper behaves.
Reply
#27
I see. Well, that might cover the case I'm facing too. It seems like it used to get posters for everything, but then after an upgrade it stopped working.

If I can provide any other data, please let me know.
Reply
#28
(2021-02-03, 02:51)rmrector Wrote: This one I'll pass to @pkscout. That is how it was originally designed, but it seems the new API wrapper doesn't play along.

@rmrector I have a tentative fix.  In looking through the code, I see that it is expecting the API to deliver all images regardless of language. With the update to remove all the outside Python dependencies, the call for images was combined with the detail call (because I could with the new API wrapper, and thus reduce the API calls), but that then tied the images to the language selected (plus NULL). To resolve this, I added the image call to the fallback call (the one with no language) and then just copy the images from the fallback data into the main movie data.  That seems to have fixed the issue reported in this thread, and in some limited testing has caused no adverse effects on other movies.  I won't be back home for another 10 days, so I can't do extensive tests, but you (and/or the original poster) can test the changes here:

Leia: https://github.com/pkscout/metadata.them...llback-fix
Matrix: https://github.com/pkscout/metadata.them...llback-fix

A quick note for the OP: If you test the Matrix version, the addon may not auto update in the future, at least not until you do one manual update from the repo.
Reply
#29
Thanks for this.

Question: how should I load it in? I tried updating the add-on and now it's Team Kodi - 1.3.1+matrix.1 — is this what I want?

I tried refreshing a movie with a poster that wouldn't load before, but it's still not working.
Reply
#30
(2021-02-06, 14:35)mrob Wrote: Thanks for this.

Question: how should I load it in? I tried updating the add-on and now it's Team Kodi - 1.3.1+matrix.1 — is this what I want?

I tried refreshing a movie with a poster that wouldn't load before, but it's still not working.
You would need to download a zip file from the link I provided (a link to the zip it will appear when you click the CODE button once you get the page). Then you'd have to use the install from ZIP option in the Kodi addons section.  When complete you should have version 1.3.2+matrix.1.  On Matrix you will get a warning about installing from zip stopping autoupdates. So you'd have to periodically check for a new update and then do that update manually to get back on the auto update cycle.  If you aren't familiar with or comfortable with these steps, I'd encourage you to just wait until the update appears in the repo.
Reply

Logout Mark Read Team Forum Stats Members Help
Problem Loading Posters0