Skip to content

Fix TypeError when tvdbseason/TVDBid is None in anime-list mappings#600

Open
tsannie wants to merge 1 commit intoZeroQI:masterfrom
tsannie:fix/none-tvdbseason-crash
Open

Fix TypeError when tvdbseason/TVDBid is None in anime-list mappings#600
tsannie wants to merge 1 commit intoZeroQI:masterfrom
tsannie:fix/none-tvdbseason-crash

Conversation

@tsannie
Copy link
Copy Markdown

@tsannie tsannie commented Apr 9, 2026

Problem

Some entries in anime-list-master.xml (ScudLee) have tvdbseason set to None
notably One Piece (tvdb-81797) which has dozens of AniDB sub-entries. This causes
TypeError: cannot concatenate 'str' and 'NoneType' objects when fetching metadata.

Changes

  • TVDBid.isdigit()(TVDBid or "").isdigit() — guard against None
  • 's'+tvdbseason+'e'+...'s'+str(tvdbseason or '1')+'e'+... — fallback to season 1
    when mapping is absent
  • 's'+defaulttvdbseason's'+str(defaulttvdbseason or '1') — same concatenation fix
  • int(season.get("tvdbseason")) → added is not None guard — int(None) crashes
  • Sanitize anime name in SCUDLEE_FEEDBACK.format() to prevent KeyError from curly
    braces in titles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant