-
Notifications
You must be signed in to change notification settings - Fork 28
/
constants.py
40 lines (34 loc) · 1.36 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
from streamlink.compat import is_win32
if is_win32:
APPDATA = os.environ['APPDATA']
CONFIG_FILES = [os.path.join(APPDATA, 'streamlink', 'streamlinkrc')]
PLUGINS_DIR = [os.path.join(APPDATA, 'streamlink', 'plugins')]
else:
XDG_CONFIG_HOME = os.environ.get('XDG_CONFIG_HOME', '~/.config')
CONFIG_FILES = [
os.path.expanduser(XDG_CONFIG_HOME + '/streamlink/config'),
os.path.expanduser('~/.streamlinkrc')
]
PLUGINS_DIR = [os.path.expanduser(XDG_CONFIG_HOME + '/streamlink/plugins')]
STREAM_SYNONYMS = ['best', 'worst', 'best-unfiltered', 'worst-unfiltered']
STREAM_PASSTHROUGH = ['hls', 'http', 'rtmp']
try:
# Kodi - service.liveproxy
import xbmc
CONFIG_FILES.extend([xbmc.translatePath('special://profile/addon_data/service.liveproxy/config').encode('utf-8')])
PLUGINS_DIR.extend([
xbmc.translatePath('special://profile/addon_data/service.liveproxy/plugins/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.back-to-plugins/lib/data/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.streamlink-plugins/lib/data/').encode('utf-8'),
])
except ImportError:
pass
FILE_OUTPUT_LIST = ['.m3u', '.m3u8', '.new', '.txt']
__all__ = [
'CONFIG_FILES',
'PLUGINS_DIR',
'STREAM_PASSTHROUGH',
'STREAM_SYNONYMS',
'FILE_OUTPUT_LIST',
]