Don't cast season to an int since it can be a string (#54)

This commit is contained in:
Michaël Arnauts 2020-11-10 10:52:06 +01:00 committed by GitHub
parent f54622f930
commit 209edde50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class IPTVManager:
title=program.program_title,
subtitle=program.episode_title,
description=program.description,
episode='S%dE%d' % (program.season, program.number) if program.season and program.number else None,
episode='S%sE%s' % (program.season, program.number) if program.season and program.number else None,
genre=program.genre,
genre_id=program.genre_id,
image=program.cover,

View File

@ -138,7 +138,7 @@ class EpgApi:
episode_title=data.get('episode_title'),
episode_title_original=data.get('original_title'),
number=int(data.get('episode_nr')) if data.get('episode_nr') else None,
season=int(data.get('season')) if data.get('season') else None,
season=data.get('season'),
genre=data.get('genre'),
start=start,
won_id=int(data.get('won_id')) if data.get('won_id') else None,