Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tv show episode doesn't get an overlay score #2291

Open
rafapirotto opened this issue Oct 21, 2024 · 38 comments
Open

Tv show episode doesn't get an overlay score #2291

rafapirotto opened this issue Oct 21, 2024 · 38 comments
Assignees
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet

Comments

@rafapirotto
Copy link

Version Number

Version: 2.0.2 (Docker: master)

What branch are you on?

master

Describe the Bug

For some reason the last episode of the second season of "Tell me lies" doesn't get an imdb score overlay. I've noticed that the other episodes get updated but this last one has never got a score overlay.
image
image

I've checked the imdb page and it has always had a score

Relevant Collection/Overlay/Playlist Definition

libraries:
  Movies:
    reapply_overlays: true
    remove_overlays: false
    collection_files:
    - folder: collections/movies
    - folder: collections/common
    - default: golden
      template_variables:
        use_year_collections: false
        use_best_picture: true
        use_best_director: true
        collection_order: release.desc
    - default: oscars
      template_variables:
        use_year_collections: false
        use_best_picture: true
        use_best_director: true
        collection_order: release.desc
    - default: cannes
      template_variables:
        use_year_collections: false
        collection_order: release.desc
    - default: bafta
      template_variables:
        use_year_collections: false
        collection_order: release.desc
    - default: sundance
      template_variables:
        use_year_collections: false
        collection_order: release.desc
    - default: venice
      template_variables:
        use_year_collections: false
        collection_order: release.desc
    overlay_files:
    - folder: overlays/common
    - default: runtimes
      template_variables:
        vertical_align: bottom
        horizontal_align: center
    - default: ribbon
      template_variables:
        use_imdb: false
        use_rotten: false
        use_metacritic: false
        use_common: false
    - default: ratings
      template_variables:
        rating1: critic
        rating1_image: rt_tomato
        rating2: audience
        rating2_image: rt_popcorn
        rating3: user
        rating3_image: imdb
    operations:
      mass_user_rating_update: imdb
      mass_audience_rating_update: mdb_tomatoesaudience
      mass_critic_rating_update: mdb_tomatoes
      split_duplicates: true
  TV Shows:
    reapply_overlays: true
    remove_overlays: false
    collection_files:
    - folder: collections/common
    - default: golden
      template_variables:
        use_year_collections: false
        use_best_picture: true
        use_best_director: true
        collection_order: release.desc
    - default: emmy
      template_variables:
        use_year_collections: false
        use_best_picture: true
        use_best_director: true
        collection_order: release.desc
    overlay_files:
    - folder: overlays/common
    - default: runtimes
      template_variables:
        builder_level: episode
        vertical_align: top
        horizontal_align: left
    - default: ratings
      template_variables:
        builder_level: episode
        rating3: user
        rating3_image: imdb
        vertical_position: bottom
        horizontal_position: left
        rating3_font_size: 120
    - default: streaming
      template_variables:
        vertical_align: bottom
        horizontal_align: right
    - default: ratings
      template_variables:
        rating3: user
        rating3_image: imdb
        vertical_position: bottom
        horizontal_position: left
    operations:
      mass_user_rating_update: imdb
      mass_episode_user_rating_update: imdb
      split_duplicates: false
settings:
  cache: true
  cache_expiration: 60
  asset_directory: config/assets
  asset_folders: true
  asset_depth: 0
  create_asset_folders: false
  prioritize_assets: false
  dimensional_asset_rename: false
  download_url_assets: false
  show_missing_season_assets: false
  show_missing_episode_assets: false
  show_asset_not_needed: true
  sync_mode: append
  minimum_items: 1
  default_collection_order:
  delete_below_minimum: true
  delete_not_scheduled: false
  run_again_delay: 2
  missing_only_released: false
  only_filter_missing: false
  show_unmanaged: true
  show_unconfigured: true
  show_filtered: false
  show_options: false
  show_missing: true
  show_missing_assets: false
  save_report: false
  tvdb_language: eng
  ignore_ids:
  ignore_imdb_ids:
  item_refresh_delay: 0
  playlist_sync_to_user: all
  playlist_exclude_users:
  playlist_report: false
  verify_ssl: true
  custom_repo:
  check_nightly: false
  run_order:
  - operations
  - metadata
  - collections
  - overlays
  overlay_artwork_filetype: jpg
  overlay_artwork_quality:
plex:
  url: <<PLEX_URLL>>
  token: <<PLEX_TOKENN>>
  timeout: 60
  clean_bundles: false
  empty_trash: false
  optimize: false
  db_cache:
  verify_ssl:
tmdb:
  apikey: <<TMDB_API_KEY>>
  language: en
  cache_expiration: 60
  region:
mdblist:
  apikey: <<MDB_API_KEY>>
  cache_expiration: 60

Logs

https://gist.github.com/rafapirotto/e2b37800001e370a7cf1423224e0416f

@rafapirotto rafapirotto added bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Oct 21, 2024
@YozoraXCII
Copy link
Contributor

Your log is also saying you should update to 2.1.0

[2024-10-20 17:45:52,187] [kometa.py:273]             [INFO]     |     Version: 2.0.2 (Docker: master)                                                                |
[2024-10-20 17:45:52,356] [kometa.py:275]             [INFO]     |     Newest Version: 2.1.0    

@rafapirotto
Copy link
Author

Doing the plex dance fixed the issue. I do however think that the cache issue is worth being investigated. It appears that I'm not the only one with this issue. @antwanchild said yesterday to me in discord that he has had this issue in the past before as well as I have had this issue a couple of times.

@antwanchild
Copy link
Contributor

I had the issue, not related specifically to an episode, but an issue where renaming the cache fixed what i was having issue with

@rafapirotto
Copy link
Author

I had the issue, not related specifically to an episode, but an issue where renaming the cache fixed what i was having issue with

The problem with that fix is that renaming the cache forces a new cache to be built which takes way too much time. I don't consider that to be an optimal solution. I rather believe that investigation the cause of the cache issue is worth pursuing.

@antwanchild
Copy link
Contributor

The problem with that fix is that renaming the cache forces a new cache to be built which takes way too much time. I don't consider that to be an optimal solution. I rather believe that investigation the cause of the cache issue is worth pursuing.

This is the reason you were asked for logs of when it was added Kometa and when Kometa updated the rating and stated it applied an overlay when it actually didn't

@chazlarson
Copy link
Contributor

chazlarson commented Oct 21, 2024

When Kometa applies an overlay, it saves a record of all aspects of the overlay in the cache.

For example:

"1080Presolution100left1515top305105center(0, 0, 0, 153)3000"

On subsequent runs, if that record has not changed, Kometa figures that the current overlay matches the one it's about to apply, so "No Overlay Update Needed"

If you delete the cache, nothing matches so everything gets updated.
When you Plex dance, now the item no longer has an overlay, so it gets regenerated and updated.

For some reason, Kometa thought that the thing already had the overlays it was supposed to have.

Perhaps there was some inconsistency, perhaps the "what overlay did I apply" is incomplete [I think only position changes aren't captured for some overlays, for example].

@rafapirotto
Copy link
Author

rafapirotto commented Oct 21, 2024

When Kometa applies an overlay, it saves a record of all aspects of the overlay in the cache.

For example:

"1080Presolution100left1515top305105center(0, 0, 0, 153)3000"

On subsequent runs, if that record has not changed, Kometa figures that the current overlay matches the one it's about to apply, so "No Overlay Update Needed"

If you delete the cache, nothing matches so everything gets updated. When you Plex dance, now the item no longer has an overlay, so it gets regenerated and updated.

For some reason, Kometa thought that the thing already had the overlays it was supposed to have.

Perhaps there was some inconsistency, perhaps the "what overlay did I apply" is incomplete [I think only position changes aren't captured for some overlays, for example].

For more background, the episode was added to plex on october the 16th. The problematic episode was the 8th episode of the second season of Tell me Lies
I have found old logs in my backups which may help debug this @antwanchild :
image

old logs.zip

Hope this helps!

@rafapirotto
Copy link
Author

I have more recent logs if those are neede

@chazlarson
Copy link
Contributor

Seems like there's some logic error in there. Once it gets an overlay future changes in the rating don't apply a new overlay.

episode arrives:
| Processing Tell Me Lies S02E08
| No imdb User Rating Found

| Tell Me Lies S02E08
|   Overlay Warning: No <<user_rating>> found
|   Overlays Applied: Overlay File (1) runtime_info, Overlay File (2) Rating3Fresh

11 hours later:
| Processing Tell Me Lies S02E08
| No imdb User Rating Found

| Tell Me Lies S02E08
|   Overlay Warning: No <<user_rating>> found
|   Overlays Applied: Overlay File (1) runtime_info, Overlay File (2) Rating3Fresh

three hours later:
| Processing Tell Me Lies S02E08
| No imdb User Rating Found

LOG ENDS PREMATURELY

9 hours later:
| Processing Tell Me Lies S02E08
| Item Edits:
| Update User Rating (Batched) | 8.8

| Tell Me Lies S02E08
|   Overlay Update Not Needed

12 hours later:
| Processing Tell Me Lies S02E08
| Item Edits:
| Update User Rating (Batched) | 8.8

| Tell Me Lies S02E08
|   Overlay Update Not Needed

12 hours later:
| Processing Tell Me Lies S02E08
| Item Edits:
| Update User Rating (Batched) | 8.9

| Tell Me Lies S02E08
|   Overlay Update Not Needed

12 hours later:
| Processing Tell Me Lies S02E08

| Tell Me Lies S02E08
|   Overlay Update Not Needed

12 hours later:
| Processing Tell Me Lies S02E08
| Item Edits:
| Update User Rating (Batched) | 9.1

| Tell Me Lies S02E08
|   Overlay Update Not Needed

@chazlarson
Copy link
Contributor

What's in overlays/common?

@rafapirotto
Copy link
Author

What's in overlays/common?

overlays:
  4K:
    overlay:
      name: 4K
      file: overlays/common/4K.png
    plex_search:
      all:
        resolution: 4K

@rafapirotto
Copy link
Author

rafapirotto commented Oct 21, 2024

Seems like there's some logic error in there. Once it gets an overlay future changes in the rating don't apply a new overlay.

So you are confirming this is indeed a bug and that it can be fixed in a future release?

@chazlarson
Copy link
Contributor

I'm just commenting on what I'm seeing in your logs. That's data from your log files. I haven't reproduced it, though those tests are ongoing.

@chazlarson
Copy link
Contributor

It looks like there's an issue going to or from a null rating:
https://docs.google.com/document/d/1cexxP_tyINM3oy1yYVkn0hEAjN-Kt94aK78X-GC4YpM/edit?usp=sharing

@rafapirotto
Copy link
Author

It looks like there's an issue going to or from a null rating: https://docs.google.com/document/d/1cexxP_tyINM3oy1yYVkn0hEAjN-Kt94aK78X-GC4YpM/edit?usp=sharing

Interesting. So it is looking like an interesting bug. I'm happy to hear that, I thought I was crazy cause it was happening to me and not everyone else

@rafapirotto
Copy link
Author

Is there anything else you need from my side? More logs or something? Also, which is the next step for this? Will this be treated as a bug? @chazlarson

@chazlarson
Copy link
Contributor

Nothing else needed here. Future action is dependent on the author reviewing it.

@rafapirotto
Copy link
Author

Nothing else needed here. Future action is dependent on the author reviewing it.

Should I tag him?

@chazlarson
Copy link
Contributor

chazlarson commented Oct 22, 2024

No need, this issue is assigned to him.

@YozoraXCII
Copy link
Contributor

This is ready to be tested using the overlay-episode-fix branch. #2296

If testing works as expected we will push this into nightly.

@rafapirotto
Copy link
Author

This is ready to be tested using the overlay-episode-fix branch. #2296

If testing works as expected we will push this into nightly.

Excellent! Once I see it happening again, I will try it out! Big thank you!

@rafapirotto
Copy link
Author

rafapirotto commented Nov 18, 2024

@YozoraXCII @chazlarson @antwanchild @meisnate12 I think may still be happening:
I'm using nightly (since this was merged in #2296) and I still don't get the overlay for some tv shows:
https://www.imdb.com/title/tt33366664/episodes/?ref_=tt_eps_sm
image
image
https://www.imdb.com/title/tt15469618/episodes/?season=2
As you can see from imdb, these already have scores, however they don't appear to have an imdb score overlay
Here are the logs:
meta.log

@YozoraXCII
Copy link
Contributor

YozoraXCII commented Nov 18, 2024

Neither Cromañon nor Bad Sisters appear in that log file

@chazlarson
Copy link
Contributor

@rafapirotto That log contains no references to a show called "Bad Sisters".

@rafapirotto
Copy link
Author

Let me correct that

@rafapirotto
Copy link
Author

There you go @YozoraXCII @chazlarson

@rafapirotto
Copy link
Author

Just to double check, were you able to see the updated link? If you need anything else like more logs just ask!
@YozoraXCII @chazlarson
Thanks!

@YozoraXCII
Copy link
Contributor

Just to double check, were you able to see the updated link? If you need anything else like more logs just ask!
@YozoraXCII @chazlarson
Thanks!

Got the link but I can't personally look until tomorrow

I tested earlier and confirmed the issue of null ratings appears to be fixed in nightly. Are you running the latest nightly build?

If yes, try deleting your config.cache and doing another run. If that doesn't work, maybe try removing your overlays and letting it start from scratch

@rafapirotto
Copy link
Author

Just to double check, were you able to see the updated link? If you need anything else like more logs just ask!
@YozoraXCII @chazlarson
Thanks!

Got the link but I can't personally look until tomorrow

I tested earlier and confirmed the issue of null ratings appears to be fixed in nightly. Are you running the latest nightly build?

If yes, try deleting your config.cache and doing another run. If that doesn't work, maybe try removing your overlays and letting it start from scratch

Hey!

I am using the latest nightly build. I don't think delete the cache or removing the overlays is the solution. This shouldn't happen in the first place. This has been happening to me lately, before and after the fix. Also, I specifically ran another run and I had the results you are seeing. I am running docker with the latest nightly build

@chazlarson
Copy link
Contributor

All the log shows is that Kometa thinks the ratings are up to date and Kometa sees no reason to update the overlays.

Perhaps running in trace mode would provide more specifics about why exactly Kometa doesn't think it has to update the ratings.

Perhaps hiding the cache would show if there's a cache issue that needs to be addressed.

Perhaps forcing a reapply of the overlays [or removing and reapplying] would clear whatever is telling Kometa that it doesn't need to.

These are tests you can run to try to reproduce a problem which we cannot, in an effort to try to determine the cause.

All we can see form that log is:

  1. Kometa thinks the ratings are up to date
  2. Kometa doesn't think the overlays have changed.

The log doesn't show why Kometa may think that; some of these other tests may.

@rafapirotto
Copy link
Author

All the log shows is that Kometa thinks the ratings are up to date and Kometa sees no reason to update the overlays.

Perhaps running in trace mode would provide more specifics about why exactly Kometa doesn't think it has to update the ratings.

Perhaps hiding the cache would show if there's a cache issue that needs to be addressed.

Perhaps forcing a reapply of the overlays [or removing and reapplying] would clear whatever is telling Kometa that it doesn't need to.

These are tests you can run to try to reproduce a problem which we cannot, in an effort to try to determine the cause.

All we can see form that log is:

  1. Kometa thinks the ratings are up to date
  2. Kometa doesn't think the overlays have changed.

The log doesn't show why Kometa may think that; some of these other tests may.

Hey! Thanks for the reply.

As I said before, I have tried both hiding/deleting the cache and force the overlays in the past and both solve my problem. The thing is that I need to be manually checking each time to see if overlays are missing and then manually either delete the cache and wait for that run to run (which in my experience takes longer than a normal run because of course it does not have any cached stuff). Or, manually run a reapply overlay. My gut tells me it is something either cache related or related to the logic behind how kometa decides if something needs an update. I have yet to find the exact way to recreate this issue. What I know is that is happens with episodes that have aired recently. Like I download an episode and it doesn’t yet have a rating in imdb, and it gets stuck like that even after imdb gets a rating. I can run trace mode and provide the logs, but if I reapply overlays or delete/hide the cache I will solve my problem but I will also reset the current conditions that depict my problem and I would have to wait for another episode or tv show to air and also the imdb rating would have to be missing. This all is a bit time consuming 😓

@chazlarson
Copy link
Contributor

The recent-episode situation is exactly what led to this initially and is the situation which is believed to have been fixed.

Coming up with a repeatable recipe is a requirement for fixing whatever may still remain.

@chazlarson
Copy link
Contributor

Perhaps uploading your cache file would be a thing that would be useful.

@rafapirotto
Copy link
Author

The recent-episode situation is exactly what led to this initially and is the situation which is believed to have been fixed.

Coming up with a repeatable recipe is a requirement for fixing whatever may still remain.

I know that was the case, but the fact that I am running the nightly build and this still happens show that there is still something wrong.

@rafapirotto
Copy link
Author

Perhaps uploading your cache file would be a thing that would be useful.

Sure! I will get that tomorrow!

@rafapirotto
Copy link
Author

@chazlarson here is my cache
config.cache.zip

@rafapirotto
Copy link
Author

I'm also running with trace mode, will provide the logs soon

@rafapirotto
Copy link
Author

Here is the logs with trace enabled:

meta.log

CC: @chazlarson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet
Projects
None yet
Development

No branches or pull requests

5 participants