From 6d6760df18a633b2773e20d0b5e21bb3ad0cbf9f Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sat, 7 Jun 2014 20:48:44 +0200 Subject: [PATCH] nrk: remove obsolete options.hls --- lib/svtplay_dl/service/nrk.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/svtplay_dl/service/nrk.py b/lib/svtplay_dl/service/nrk.py index c205270..0ca27b4 100644 --- a/lib/svtplay_dl/service/nrk.py +++ b/lib/svtplay_dl/service/nrk.py @@ -4,6 +4,7 @@ from __future__ import absolute_import import re import sys import json +import copy from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils import get_http_data @@ -40,13 +41,13 @@ class Nrk(Service, OpenGraphThumbMixin): data = json.loads(get_http_data(dataurl)) manifest_url = data["mediaUrl"] options.live = data["isLive"] - if options.hls: - manifest_url = manifest_url.replace("/z/", "/i/").replace("manifest.f4m", "master.m3u8") - streams = hlsparse(manifest_url) - for n in list(streams.keys()): - yield HLS(copy.copy(options), streams[n], n) - else: - manifest_url = "%s?hdcore=2.8.0&g=hejsan" % manifest_url - streams = hdsparse(copy.copy(options), manifest_url) - for n in list(streams.keys()): - yield streams[n] + + hlsurl = manifest_url.replace("/z/", "/i/").replace("manifest.f4m", "master.m3u8") + streams = hlsparse(hlsurl) + for n in list(streams.keys()): + yield HLS(copy.copy(options), streams[n], n) + + manifest_url = "%s?hdcore=2.8.0&g=hejsan" % manifest_url + streams = hdsparse(copy.copy(options), manifest_url) + for n in list(streams.keys()): + yield streams[n]