1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

Adjust 'end_time_stamp' for tv4 live, to avid fetching before the stream is publlished

This commit is contained in:
dalgr 2018-03-24 18:43:05 +01:00
parent 8b25a606ee
commit e77b5e12cd
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ class HLS(VideoRetriever):
if self.options.hls_time_stamp:
end_time_stamp = (datetime.utcnow() - timedelta(seconds=max_duration * 2)).replace(microsecond=0)
end_time_stamp = (datetime.utcnow() - timedelta(minutes=1, seconds=max_duration * 2)).replace(microsecond=0)
start_time_stamp = end_time_stamp - timedelta(minutes=1)
base_url = url.split(".m3u8")[0]

View File

@ -26,7 +26,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
parse = urlparse(self.url)
if parse.path[:8] == "/kanaler":
end_time_stamp = (datetime.utcnow() - timedelta(seconds=20)).replace(microsecond=0)
end_time_stamp = (datetime.utcnow() - timedelta(minutes=1, seconds=20)).replace(microsecond=0)
start_time_stamp = end_time_stamp - timedelta(minutes=1)
url = "https://bbr-l2v.akamaized.net/live/{0}/master.m3u8?in={1}&out={2}?".format(parse.path[9:],