ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.21k stars 113 forks source link

Failsafe when season posters aren't available is not working #288

Open KurtzPT opened 5 years ago

KurtzPT commented 5 years ago

This was talked before in #239.

While adding https://www.thetvdb.com/series/detroit-metal-city I noticed season 0 (Specials) on plex didn't download any poster from TVDB (TVDB special season doesn't have posters on it) and thus is using whatever main serie poster I have.

Wasn't it supposed to download all the main serie posters in case there's no season posters?

EndOfLine369 commented 5 years ago

please provide the agent log

KurtzPT commented 5 years ago

Forgot the log, sorry. Detroit Metal City [anidb-5587].agent-update.log

ZeroQI commented 5 years ago

Notes

So i see few possibilities:

KurtzPT commented 5 years ago

The main idea of having all main serie posters in those single seasons that don't have any posters, is that I can then choose one of my liking, instead of having the same exact one that is chosen to be the main serie poster.

Like it is, I have to go search for the tvdb link open their page, go to the main posters and copy the link of one of them of my liking. It's too much work when hama could just put them on all on plex to be chosen from.

ZeroQI commented 5 years ago

Or select in library settings to hide single seasons folders... Yes we need to add series posters in case of no season posters.

EndOfLine369 commented 5 years ago

I would not want other posters added for two reasons. I want it to stay empty.

  1. I actually want them to just default to the series' poster otherwise it is not obvious the poster does just not exist instead of loading what looks like a bad poster that does not match the season or series poster.
  2. If we put in posters and we eventually get a proper poster for that season, Plex will not change it to it once it is loaded so we would never know right?

If we really want this done, I would think this requires to be a bool pref entry with default being like it is now w/no posters.

ZeroQI commented 5 years ago

@EndOfLine369

@KurtzPT

The issue is, what would make a special poster more suited to be a season poster than a series poster for thetvdb? The live action is easy and found a poster that had anime on the left live on the right, so i have added a live action poster to TheTVDB solving this issue specifically. Closing this feature request query

KurtzPT commented 5 years ago

I would not want other posters added for two reasons. I want it to stay empty.

  1. I actually want them to just default to the series' poster otherwise it is not obvious the poster does just not exist instead of loading what looks like a bad poster that does not match the season or series poster.
    • You can also make the same argument that the default series poster might also not be the right one for that season that has no posters.
  2. If we put in posters and we eventually get a proper poster for that season, Plex will not change it to it once it is loaded so we would never know right?
    • Why would it not change it? IIRC, the default TV agent for Plex does change the covers of TV seasons once they have a more updated/higher weight poster available, you just need to force a metadata refresh. If we really want this done, I would think this requires to be a bool pref entry with default being like it is now w/no posters.

I like that idea, having a checkbox to allow the user to choose their preference.

I don't understand the first point you made @ZeroQI, This is the default case at the moment that hama does. But with this checkbox idea, the season would still use the same exact main poster, but would also have more options for the user to change it. I don't see why you think it would break support for other series.

@KurtzPT

  • Yes would be easier for this series but would break support for others series by putting non adequate posters the selected one not removable if posters were, and the same is true if we had a bolean setting, would only benefit those in one situation but not the other.
  • If a season does not have posters it will automatically use the one Plex have on the main series (which would the one hama puts it there, unless the user changes it). Now with this boolean idea, it would still use the exact same poster but it would allow the user to change it to another poster associated with the main series. I don't see where it would break anything.
  • you care enough about specials to download them and wanting a season poster, but they are a re-cut end of ep1 and beginning of ep2 and a live action
  • Again, I just gave an example where it's just a special, but there are plenty of seasons on TVDB without posters that default wrongly to whatever I have on the main series, and gives me no alternative than go find an URL to fix it manually.
  • in similar situation, please find adequate specials poster and resize with paint to 680x1000 (despite TheTVDB for season posters indicating a lower resolution in guidelines as it will be rejected at upload time otherwise)

The issue is, what would make a special poster more suited to be a season poster than a series poster for thetvdb? The live action is easy and found a poster that had anime on the left live on the right, so i have added a live action poster to TheTVDB solving this issue specifically. Closing this feature request query

KurtzPT commented 5 years ago

I'm going to make a simple example using numbers, so I can clarify that it wouldn't break anything adding it (also having it as an checkbox would let the users choose what they want)

I add an anime called "XPTO" that has some episodes specials.

AniDB - TheTVDB Main Anime - Season 1 Specials - Season 0

TheTVDB has the following posters, ordered all by weight (from the biggest weight until the smallest one):

Main Serie Page - PosterMain001,PosterMain002,PosterMain003 Season 1 - PosterS01001,PosterS01002,PosterS01003 Specials - No posters.

So the default Hama logic would create on plex the following entry:

XPTO (Using PosterMain001 as default poster, with PosterMain002 and PosterMain003 as choices to change)

Now with the failback logic in it, it would change the above to this:

XPTO (No changes)

@ZeroQI where would this break anything?

ZeroQI commented 5 years ago

Some series have different character or settings per season and if we use the same rules for all seasons like it is now (including season 0), it would use wrong posters, however Plex will show the series poster as season without adding it in the season poster list

Now we could have a fallback just for specials season only with the series posters added and same selected poster as the series poster, so that would warn there was no season poster found

When a specials season poster is added then we can remove all posters but the active one (series if unchanged) would stay as it is active, which is an issue.

@EndOfLine369 i understand the legitimate concern for series poster not matching the season, but seem mitigated for specials season. What's your position on importing series poster for special seasons leaving thye same selected poster as the series?

ZeroQI commented 5 years ago

Some series have different character or settings per season and if we use the same rules for all seasons like it is now (including season 0), it would use wrong posters, however Plex will show the series poster as season without adding it in the season poster list

Now we could have a fallback just for specials season only with the series posters added and same selected poster as the series poster, so that would warn there was no season poster found

When a specials season poster is added then we can remove all posters but the active one (series if unchanged) would stay as it is active, which is an issue.

@EndOfLine369 i understand the legitimate concern for series poster not matching the season, but seem mitigated for specials season. What's your position on importing series poster for special seasons leaving thye same selected poster as the series?

KurtzPT commented 5 years ago

Some series have different character or settings per season and if we use the same rules for all seasons like it is now (including season 0), it would use wrong posters, however Plex will show the series poster as season without adding it in the season poster list Now we could have a fallback just for specials season only with the series posters added and same selected poster as the series poster, so that would warn there was no season poster found

When a specials season poster is added then we can remove all posters but the active one (series if unchanged) would stay as it is active, which is an issue.

@EndOfLine369 i understand the legitimate concern for series poster not matching the season, but seem mitigated for specials season. What's your position on importing series poster for special seasons leaving thye same selected poster as the series?

Maybe I'm not understanding because of some language barrier, but with the example I gave above (Instead of specials it would be lets say season 2 that would correspond to another anime related to the main series), the only thing that would change is Plex would give more options to choose from (while manually editing the season poster), and it would be using by default the same exact poster that Plex would choose for the main series.

Possible problems:

Anyway, these possible problems would just be applicable to the users who would opt in on the library Hama settings like @EndOfLine369 suggested. This setting would be turned off by default so most users would still have the default logic, while allowing users like me to choose the failsafe logic.

EndOfLine369 commented 5 years ago

Would also say to put the current logic into the pref option as well. What was it? It will currently dl the series posters to S1 if S1 has no posters? So the option would be to use series posters on empty seasons S0 & S1 when anidb_numbering.

ZeroQI commented 5 years ago

Notes:

tvdb line 276-279 this manages anidb numbering season posters.

                  if str(image['subKey']) in ('1' if Dict(mappingList, 'defaulttvdbseason')=='a' else Dict(mappingList, 'defaulttvdbseason')):
                    SaveDict(('TheTVDB/'+image['fileName'], rank, thumbnail), TheTVDB_dict, 'posters', TVDB_IMG_ROOT + image['fileName'])
                  if str(image['subKey']) in ('0', '1' if Dict(mappingList, 'defaulttvdbseason')=='a' else Dict(mappingList, 'defaulttvdbseason')):
                    SaveDict(('TheTVDB/'+image['fileName'], 1 if rank==3 else 3 if rank==1 else rank, thumbnail), TheTVDB_dict, 'seasons', '0' if str(image['subKey'])=='0' else '1', 'posters', TVDB_IMG_ROOT + image['fileName'])  #if anidb_numbering else str(image['subKey'])

Notes:

@EndOfLine369 Thx, editing my post so removing yours but looks weird now...

ZeroQI commented 5 years ago

Looking at fixing this and the other image related bug after a long hiatus... I can't think about it clearly so will write out my thoughts to simplify the process hopefully Please point out any flaw in the below details:

tvdb line 294-297 this manages anidb numbering season posters from

                  if str(image['subKey']) in ('1' if Dict(mappingList, 'defaulttvdbseason')=='a' else Dict(mappingList, 'defaulttvdbseason')):
                    SaveDict(('TheTVDB/'+image['fileName'], rank, thumbnail), TheTVDB_dict, 'posters', TVDB_IMG_ROOT + image['fileName'])
                  if str(image['subKey']) in ('0', '1' if Dict(mappingList, 'defaulttvdbseason')=='a' else Dict(mappingList, 'defaulttvdbseason')):
                    SaveDict(('TheTVDB/'+image['fileName'], 1 if rank==3 else 3 if rank==1 else rank, thumbnail), TheTVDB_dict, 'seasons', '0' if str(image['subKey'])=='0' else '1', 'posters', TVDB_IMG_ROOT + image['fileName'])  #if anidb_numbering else str(image['subKey'])

to:

season_str = '0' if str(image['subKey'])=='0' else '1' if Dict(mappingList, 'defaulttvdbseason')=='a' else Dict(mappingList, 'defaulttvdbseason')
if str(image['subKey']) == season_str):
  SaveDict(('TheTVDB/'+image['fileName'], rank, thumbnail), TheTVDB_dict, 'seasons', season_str, 'posters', TVDB_IMG_ROOT + image['fileName'])

Then add the setting in the code:

Agent setting 'season_poster_failover' drop-down menu to add:

For each season (0/1 if anidb numbering, all if tvdb numbering), if no season poster present and 'season_poster_failover' is not 'none':

Need:

ZeroQI commented 5 years ago

@EndOfLine369 any feedback on the above? Shouldn't have deleted your comment to edit my post above trying to keep the number of posts down, looks messy now... Anything else to code i forgot?

EndOfLine369 commented 4 years ago

Will try and take the time and reread this wordy thread and get back to you.