Skip to content

Commit

Permalink
fix Hama Movies 'no attribute 'seasons'
Browse files Browse the repository at this point in the history
2016-07-09 12:01:17,644 (7f9501ffb700) :  CRITICAL (agentkit:1067) - Exception in the update function of agent named 'HamaMovies', called with guid 'com.plexapp.agents.hama://anidb-8821?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-a17e99e/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1065, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 878, in update
    def update(self, metadata, media, lang, force ): self.Update(metadata, media, lang, force,  True )
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/__init__.py", line 643, in Update
    elif len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1:  keys = ["tvdbid: %s"  % (WEB_LINK % (TVDB_SERIE_URL  % tvdbid,  tvdbid) )]
AttributeError: 'MediaTree' object has no attribute 'seasons'
  • Loading branch information
ZeroQI committed Jul 10, 2016
1 parent ea29c41 commit ef17712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def Update(self, metadata, media, lang, force, movie):
else: summary_missing.append(numbering)

### Check for Missing Episodes ###
if len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1 or metadata_id_source_core == "tvdb":
if not movie and len(media.seasons)>2 or max(map(int, media.seasons.keys()))>1 or metadata_id_source_core == "tvdb":
if currentSeasonNum and not (
((not metadata_id_source in ["tvdb3","tvdb4"] or currentSeasonNum==0) and currentSeasonNum in media.seasons and currentEpNum in media.seasons[currentSeasonNum].episodes) or
(metadata_id_source in ["tvdb3","tvdb4"] and [currentAbsNum in media.seasons[season].episodes for season in media.seasons].count(True) > 0)
Expand Down

0 comments on commit ef17712

Please sign in to comment.