<commit_before>/**
 * XPCOM STB constructor.
 * @constructor
 */
function common_xpcom(){
    
    this.user = {};
    this.mac = '';
    this.ip  = '';
    this.hd  = 0;
    this.type  = '';
    this.version    = '';
    this.ajax_loader  = '';
    this.images   = [];
    this.storages = {};
    this.player;
    this.key_lock = true;
    this.channels_inited = 0;
    this.aspect_idx = 0;
    this.aspect_array = [
        {"alias": "fit", "mode": 0x10},
        {"alias": "big", "mode": 0x40},
        {"alias": "opt", "mode": 0x50},
        {"alias": "exp", "mode": 0x00}
    ];
    this.player;
    this.video_mode = 1080;
    
    this.notice;
    
    //this.menu_clock = new main_menu_clock();
    
    this.init = function(){
        _debug('stb.init');
        
        this.player = new player();
        this.player.bind();
        this.get_stb_params();
        this.get_server_params();
        this.get_user_profile();
        this.epg_loader.start();
        
        this.notice = new _alert();
    }
    
    this.get_server_params = function(){
        
        var pattern = /http:\/\/([\w\.\-]*)\/([\w\/]+)*\/([\w\/]+)\/(.)*/;

        this.ajax_loader = 'http://'+document.URL.replace(pattern, "$1")+'/'+document.URL.replace(pattern, "$2")+'/server/load.php';
        
        _debug('stb.ajax_loader:', this.ajax_loader);
    }
    
    this.get_stb_params = function (){
        
        try{
            
            this.video_mode = stb.RDir('vmode');
            
            this.mac = stb.RDir('MACAddress').toUpperCase().clearnl();
            
            this.ip  = stb.RDir('IPAddress').clearnl();
            
            this.type = stb.RDir('Model').clearnl();
            
            this.version = 'PORTAL version: '+ver+'; '+stb.Version();
            
            if (this.type == 'MAG200'){
                this.hd = 1;<commit_msg>"Init watchdog"<commit_after>/**
 * XPCOM STB constructor.
 * @constructor
 */
function common_xpcom(){
    
    this.user = {};
    this.mac = '';
    this.ip  = '';
    this.hd  = 0;
    this.type  = '';
    this.version    = '';
    this.ajax_loader  = '';
    this.images   = [];
    this.storages = {};
    this.player;
    this.key_lock = true;
    this.channels_inited = 0;
    this.aspect_idx = 0;
    this.aspect_array = [
        {"alias": "fit", "mode": 0x10},
        {"alias": "big", "mode": 0x40},
        {"alias": "opt", "mode": 0x50},
        {"alias": "exp", "mode": 0x00}
    ];
    this.player;
    this.video_mode = 1080;
    
    this.notice;
    
    //this.menu_clock = new main_menu_clock();
    
    this.init = function(){
        _debug('stb.init');
        
        this.player = new player();
        this.player.bind();
        this.get_stb_params();
        this.get_server_params();
        this.get_user_profile();
        this.epg_loader.start();
        
        this.notice = new _alert();
        
        this.watchdog = new watchdog();
        this.watchdog.run();
    }
    
    this.get_server_params = function(){
        
        var pattern = /http:\/\/([\w\.\-]*)\/([\w\/]+)*\/([\w\/]+)\/(.)*/;

        this.ajax_loader = 'http://'+document.URL.replace(pattern, "$1")+'/'+document.URL.replace(pattern, "$2")+'/server/load.php';
        
        _debug('stb.ajax_loader:', this.ajax_loader);
    }
    
    this.get_stb_params = function (){
        
        try{
            
            this.video_mode = stb.RDir('vmode');
            
            this.mac = stb.RDir('MACAddress').toUpperCase().clearnl();
            
            this.ip  = stb.RDir('IPAddress').clearnl();
            
            this.type = stb.RDir('Model').clearnl();
            
            this.version = 'PORTAL version: '+ver+'; '+stb.Version();
            
            if (this.type == 'MAG200'){
                this.hd = 1;
{'fraction_non_alphanumeric': 0.18694516971279374, 'fraction_numerical': 0.013054830287206266, 'mean_word_length': 1.6475466482377332, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '63097', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1282, 'n_words': 192}