Komet / MediaElch

Media Manager for Kodi
https://mediaelch.github.io/mediaelch-doc/about.html
GNU Lesser General Public License v3.0
832 stars 93 forks source link

Incorrect Year in Scraper Results and Failing to Save Year in .nfo File #1728

Open vodknuckles opened 6 months ago

vodknuckles commented 6 months ago

When scraping a movie, MediaElch often shows incorrect year in the search results and is failing to save the year to the .nfo file. Usually displaying "2024" in the Information tab. Both symptoms persist through a restart of the software and my computer.

Symptom No. 1:

  1. Single-click on an unscraped movie in the movie list: Ex. Movie (2014)
  2. Ctrl+F to open the scraper dialog
  3. Result shows the movie in question, but with the incorrect year: Ex. Movie (2003)
  4. Click Close and then Ctrl+F again to open the scraper dialog
  5. Result shows the movie in question, but with the correct year: Ex. Movie (2014)

Symptom No. 2:

  1. Single-click on an unscraped movie in the movie list: Ex. Movie (2014)
  2. Ctrl+F to open the scraper dialog
  3. Result shows the movie in question
  4. Double-click result
  5. The "Released" field is populated with the current year: Ex. 2024, not the year of the movie
  6. Save the scraping result
  7. Check the .nfo file
  8. No data between the <year></year> tags

Expected behavior I expect the scraper to return a year that matched TMDB's database and to save that information to the .nfo file.

Screenshots I am able to reproduce Symptom No. 2 consistently, I've attached an example (I outlined the issue in red). I am unable to consistently reproduce Symptom No. 1, but the next time it happens, I'll add it to a follow-up comment.

screenshot

MediaElch Version:

Operating System:

Additional context I manage files from a network drive.

Symptom No. 1: This happens most frequently when MediaElch is hanging considerably (usually for 5-10 seconds in between actions) but it has happened when MediaElch was working at a normal speed.

Symptom No. 2: Manually adding the year in the "Released" field and saving it will populate the .nfo file with the year specified. However, I noticed that if I scraped a movie that came out in 2024, it filled in the correct year of 2024 into the "Released" field, but when I save and check the .nfo, there is no year information there. I then entered a random year, saved, checked the .nfo, and the random year was there. I enter 2024 again, save, and the .nfo then displayed the correct year.

vodknuckles commented 6 months ago

I was able to capture an example of Symptom No. 1.

From Symptom No. 1, Step 03 above: symptom-1_before

From Symptom No. 1, Step 05 above: symptom-1_after

bugwelle commented 6 months ago

Thanks for reporting this bug. I'm currently not able to look into this (due to time constraints; please see #1710).

bugwelle commented 5 months ago

Hi,

I looked into it and it could be an issue with TheMovieDb / TMDB:

If you're logged into TMDB and go to https://www.themoviedb.org/search?query=Byzantium you will see that the search result entry says "2013". If you then go to https://www.themoviedb.org/movie/102780-byzantium , it says 2012.

Reason is that TMDB respects your current region. MediaElch does the same (it uses the language setting for that, e.g. for English (US), the region will be US. And for US, the release date was 2013).

Screenshot_20240406_162808 Screenshot_20240406_162750

I don't know what exactly it is that makes TMDB return different results for the same query. Via MediaElch, I get 2013 for English (US):

{"adult":false,"backdrop_path":"/65Hu40ajfe7PTB5W0pYBSWTfwTq.jpg","genre_ids":[18,14,53],"id":102780,"original_language":"en","original_title":"Byzantium","overview":"Residents of a coastal town learn, with deadly consequences, the secret shared by the two mysterious women who have sought refuge at a local resort.","popularity":21.273,"poster_path":"/6s6vOLSJ1sfF4Xzjdo3CopcL4Ox.jpg","release_date":"2013-06-28","title":"Byzantium","video":false,"vote_average":6.279,"vote_count":802})

The reason why you see the difference is that with the first query, MediaElch actually searches on TMDB. With the second query (using the IMDb ID), we load the movie directly. And even though we pass the same region parameter, TMDB returns a different "released" date.

MediaElch does not use the movie's release date for the requested region.

Regards, Andre


Internal Notes:

curl https://api.themoviedb.org/3/movie/102780\?api_key\=KEY\&language\=en-US | jq