How to change the portal URL on all set-top boxes?
A change of the portal URL could be required in case, for example, of a company rebranding, when it is necessary to replace the portal address with another one. This is done remotely and is applied to all set-top boxes.
1. Edit
2. Find a part of code:
this.type = stb.RDir('Model').clearnl();
}
this.header_ua_ext.push('Model: ' + this.type);
this.stb_lang = stb.RDir('getenv language').clearnl();
3. Add the following code:
var new_portal = 'http://example.com/stalker_portal/c/index.html';
var current_portal = stb.RDir('getenv portal1').clearnl();
if (current_portal != new_portal){
_debug('setenv portal1 ' + new_portal);
stb.RDir('setenv portal1 ' + new_portal);
stb.ExecAction('reboot');
return;
}
here
}
>>>adding code<<<
this.header_ua_ext.push('Model: ' + this.type);
where
http://example.com/stalker_portal/c/index.html - new portal URL .
In this case, set-top box when loading the current portal will replace the variable value with a new URL, automatically reload, and, upon reloading, upload a new portal.
For example:
this.type = stb.RDir('Model').clearnl();
}
var new_portal = 'http://example.com/stalker_portal/c/index.html';
var current_portal = stb.RDir('getenv portal1').clearnl();
if (current_portal != new_portal){
_debug('setenv portal1 ' + new_portal);
stb.RDir('setenv portal1 ' + new_portal);
stb.ExecAction('reboot');
return;
}
this.header_ua_ext.push('Model: ' + this.type);
this.stb_lang = stb.RDir('getenv language').clearnl();

