Skip to content
Permalink
Browse files

Added: Add season/episode info instead of "del #" to TV4 (See #1271)

  • Loading branch information
basrieter committed Dec 29, 2019
1 parent 9985328 commit ee9358b0de6b42834123ca369762ebdccb8d19a7
@@ -14,4 +14,5 @@ This update mainly contains channel fixes for the SVT and UR Play channel.
* Fixed: Timestamp issue with SVT
* Fixed: SVT live streams (Fixes #1266)
* Fixed: UR Play did not list (Fixes #1267)
* Updated: thumbs/fanart for SVT, TV4 and DPlay (See #1268)
* Updated: thumbs/fanart for SVT, TV4 and DPlay (See #1268)
* Added: Add season/episode info instead of "del #" to TV4 (See #1271)
@@ -1,7 +1,6 @@
[B]Changelog[/B]
* Updated: thumbs/fanart for SVT, TV4 and DPlay (See #1268)
* Fixed: UR Play did not list (Fixes #1267)
* Fixed: SVT live streams (Fixes #1266)
* Added: Add season/episode info instead of "del #" to TV4 (See #1271)

[I]Previous changes[/I]
* Fixed: SVT "trailer" type was not recognised
@@ -488,11 +488,19 @@ def create_video_item(self, result_set):
# url = "https://playback-api.b17g.net/media/%s?service=tv4&device=browser&protocol=hls" % (program_id,)
url = "https://playback-api.b17g.net/media/%s?service=tv4&device=browser&protocol=dash" % (program_id,)
name = result_set["title"]
season = result_set.get("season", 0)
episode = result_set.get("episode", 0)
is_episodic = 0 < season < 1900 and not episode == 0
if is_episodic:
name = result_set["title"].split("del")[0]
name = "{} - s{:02d}e{:02d}".format(name, season, episode)

item = MediaItem(name, url)
item.description = result_set["description"]
if item.description is None:
item.description = item.name
if is_episodic:
item.set_season_info(season, episode)

# premium_expire_date_time=2099-12-31T00:00:00+01:00
date = result_set["broadcast_date_time"]

0 comments on commit ee9358b

Please sign in to comment.
You can’t perform that action at this time.