Skip to content

Commit

Permalink
Secret Idx changed again, add fallback for newly changed index
Browse files Browse the repository at this point in the history
  • Loading branch information
knaerzche committed Oct 23, 2019
1 parent 9e4eda2 commit ecb7a9f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.joyn" name="Joyn" version="1.1.3" provider-name="knaerzche">
<addon id="plugin.video.joyn" name="Joyn" version="1.1.4" provider-name="knaerzche">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="inputstream.adaptive" version="2.2.21"/>
Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ new: option to disable folder cache
new: some performance improvements
v1.1.3
fix: Secret Idx changed
v1.1.4
fix: Secret Idx changed again, add fallback for newly changed index
4 changes: 3 additions & 1 deletion resources/lib/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
'IP_API_URL' : 'http://ip-api.com/json?lang={:s}&fields=status,country,countryCode',

'PSF_VARS_IDX' : {
'SECRET' : 1186
'SECRET' : 1192,
},

'FALLBACK_SECRET' : '5C7838365C7864665C786638265C783064595C783935245C7865395C7838323F5C7866333D3B5C78386635',

'COUNTRIES' : {
'DE' : {
'language' : 'de',
Expand Down
4 changes: 4 additions & 0 deletions resources/lib/lib_joyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ def get_config(default_icon):
xbmc_helper.log_error('Could not extract psf var ' + psf_vars_index_name + ' from js url ' + CONST['PSF_URL'] + ' compete list : ' + dumps(config['PSF_VARS']))
exit(0)

if len(config['PSF_VARS']) > CONST['PSF_VARS_IDX']['SECRET'] or len(config['PSF_VARS'][CONST['PSF_VARS_IDX']['SECRET']]) != len(CONST['FALLBACK_SECRET']):
xbmc_helper.log_debug('Using Fallback Secret, since index seems to have changed again.')
config['PSF_VARS'][CONST['PSF_VARS_IDX']['SECRET']] = CONST['FALLBACK_SECRET']

if (cached_config is not None and
cached_config['PSF_VARS'][CONST['PSF_VARS_IDX']['SECRET']] == config['PSF_VARS'][CONST['PSF_VARS_IDX']['SECRET']] and
cached_config['PLAYER_CONFIG']['toolkit']['psf'] == config['PLAYER_CONFIG']['toolkit']['psf']):
Expand Down

0 comments on commit ecb7a9f

Please sign in to comment.