Skip to content

Commit

Permalink
Fixing #274: handling subtitle.id when id is not str (itasa sublimina…
Browse files Browse the repository at this point in the history
…l provider)
  • Loading branch information
ratoaq2 committed Apr 5, 2016
1 parent cd36ec8 commit e324b14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sickbeard/subtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def get_subtitle_description(subtitle):
:rtype: str
"""
desc = None
sub_id = str(subtitle.id)
if hasattr(subtitle, 'filename') and subtitle.filename:
desc = subtitle.filename.lower()
elif hasattr(subtitle, 'name') and subtitle.name:
Expand All @@ -490,9 +491,9 @@ def get_subtitle_description(subtitle):
desc = str(subtitle.releases).lower()

if not desc:
desc = subtitle.id
desc = sub_id

return subtitle.id + '-' + desc if desc not in subtitle.id else desc
return sub_id + '-' + desc if desc not in sub_id else desc


def get_video(video_path, subtitles_dir=None, subtitles=True, embedded_subtitles=None, release_name=None):
Expand Down

0 comments on commit e324b14

Please sign in to comment.