Skip to content

Commit 6a0e1fc

Browse files
committed
Fixing issue with None series description after API change
1 parent 5ff4b65 commit 6a0e1fc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/ruvsarpur.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3-
__version__ = "13.0.0"
3+
__version__ = "13.0.1"
44
# When modifying remember to issue a new tag command in git before committing, then push the new tag
5-
# git tag -a v13.0.0 -m "v13.0.0"
5+
# git tag -a v13.0.1 -m "v13.0.1"
66
# git push origin master --tags
77
"""
88
Python script that allows you to download TV shows off the Icelandic RÚV Sarpurinn website.
@@ -513,9 +513,10 @@ def download_m3u8_playlist_using_ffmpeg(ffmpegexec, playlist_url, playlist_fragm
513513
ep_description = ''
514514

515515
# Find the series description and favour the longer description
516-
series_description = videoInfo['desc']
517-
if( len(videoInfo['series_sdesc']) > len(series_description)):
518-
series_description = videoInfo['series_sdesc']
516+
series_description = videoInfo['desc'] if videoInfo['desc'] is not None else videoInfo['series_desc'] if 'series_desc' in videoInfo else None
517+
if 'series_sdesc' in videoInfo and videoInfo['series_sdesc'] is not None:
518+
if( series_description is None or (videoInfo['series_sdesc'] is not None and len(videoInfo['series_sdesc']) > len(series_description))):
519+
series_description = videoInfo['series_sdesc']
519520

520521
# Description for movies, we want the longer version of
521522
if videoInfo['is_movie'] or videoInfo['is_docu']:
@@ -1061,7 +1062,7 @@ def getVodSeriesSchedule(sid, _, imdb_cache, imdb_orignal_titles):
10611062
series_title = prog['title'] if isMovie else trimSeasonNumberSuffix(prog['title'])
10621063
series_title_wseason = prog['title']
10631064
series_description = prog['short_description']
1064-
series_shortdescription = prog['description']
1065+
series_shortdescription = prog['description'] if prog['description'] is not None else series_description
10651066
series_image = formatCoverArtResolutionMacro(prog['image']) if 'image' in prog else None
10661067
portrait_image = formatCoverArtResolutionMacro(prog['portrait_image']) if 'portrait_image' in prog else None
10671068
foreign_title = prog['foreign_title']

0 commit comments

Comments
 (0)