Skip to content

Commit 09451fc

Browse files
author
Ross
committed
Fix(API): Add token and client ID
App was broken prior to this patch due to changing Twitch api. Also added a new stream quality called super (720p60) Reviewed-by: @ross Ceballo
1 parent 92e5176 commit 09451fc

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

twitchy/twitchy_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
def api_call(url, params=None):
2222
try:
2323
headers = {
24-
'Client-ID': 'guulhcvqo9djhuyhb2vi56wqnglc351'}
24+
'Client-ID': 'ikqljee10yj4aew72d0zr5qiihqlsn',
25+
'Authorization': 'Bearer bhhy9gfnkhkyb1gagro1a42x2ofbhd'}
2526

2627
def make_request():
2728
r = requests.get(

twitchy/twitchy_config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def configure_options(self):
7777
' is not in $PATH. Please check if this is what you want.')
7878
raise KeyboardInterrupt
7979

80-
self.default_quality = input(' Default stream quality [low/medium/HIGH/source]: ')
80+
self.default_quality = input(' Default stream quality [low/medium/HIGH/super/source]: ')
8181
if (self.default_quality == '' or
82-
self.default_quality not in ['low', 'medium', 'source']):
82+
self.default_quality not in ['low', 'medium','super' 'source']):
8383
self.default_quality = 'high'
8484

8585
try:
@@ -149,7 +149,7 @@ def write_to_config_file(self, test_config=False):
149149
'# Valid options are: False, <hw. acceleration method>\n'
150150
'# Valid methods are: vaapi (Intel), vdpau (Nvidia) etc.\n'
151151
'MPVHardwareAcceleration = False\n'
152-
'# Valid options are: low, mid, high, source\n'
152+
'# Valid options are: low, mid, high, super ,source\n'
153153
f'DefaultQuality = {self.default_quality}\n'
154154
'\n'
155155
'\n'
@@ -236,7 +236,7 @@ def parse_options(self):
236236
player_final = 'mpv --cache=auto'
237237

238238
default_quality = video_section.get('DefaultQuality', 'high')
239-
if default_quality not in ['low', 'medium', 'high', 'source']:
239+
if default_quality not in ['low', 'medium', 'high', 'super','source']:
240240
default_quality = 'high'
241241

242242
# Which columns to display
@@ -338,6 +338,7 @@ def parse_options(self):
338338
'low': '360p',
339339
'medium': '480p',
340340
'high': '720p',
341+
'super': '720p60',
341342
'source': 'best'}
342343

343344
self.non_int_display_scheme = display_scheme

0 commit comments

Comments
 (0)