Skip to content

Commit 19591ba

Browse files
supports_hls() method
1 parent 468512b commit 19591ba

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
'dash': 'inputstream.adaptive',
44
'ism': 'inputstream.adaptive',
55
'hls': 'inputstream.adaptive',
6+
'm3u8': 'inputstream.adaptive',
67
'rtmp': 'inputstream.rtmp'
78
}
89

10+
HLS_PROTOCOLS = ['hls', 'm3u8']
11+
912
DRM_SCHEMES = {
1013
'widevine': 'widevine',
1114
'com.widevine.alpha': 'widevine'

lib/inputstreamhelper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import platform
33
import zipfile
44
import json
5+
from distutils.version import LooseVersion
56

67
import config
78
import xbmc
@@ -58,3 +59,9 @@ def has_widevine_cdm(self):
5859

5960
self.log('Widevine is not installed.')
6061
return False
62+
63+
def supports_hls(self):
64+
if self.protocol in config.HLS_PROTOCOLS and LooseVersion(self._inputstream_version()) >= LooseVersion(config.HLS_MINIMUM_IA_VERSION):
65+
return True
66+
else:
67+
return False

0 commit comments

Comments
 (0)