diff --git a/admin/app.php b/admin/app.php
index 15ff2c6..42e1ca9 100644
--- a/admin/app.php
+++ b/admin/app.php
@@ -15,6 +15,7 @@ require_once PROJECT_PATH . '/../server/lib/core/stb.class.php';
 require_once PROJECT_PATH . '/../server/lib/core/cacheresult.class.php';
 require_once PROJECT_PATH . '/../server/lib/core/cache.class.php';
 require_once PROJECT_PATH . '/../server/lib/core/licensemanager.class.php';
+require_once PROJECT_PATH . '/../server/lib/oauth/accesshandler.class.php';
 require_once PROJECT_PATH . '/../server/lib/oauth/authaccesshandler.class.php';
 require_once PROJECT_PATH . '/../server/lib/core/advertising.class.php';
 require_once PROJECT_PATH . '/../server/lib/core/smacaccess.class.php';
diff --git a/admin/resources/views/Events_index.twig b/admin/resources/views/Events_index.twig
index bf797fd..efae8ba 100644
--- a/admin/resources/views/Events_index.twig
+++ b/admin/resources/views/Events_index.twig
@@ -151,20 +151,57 @@
                                             <option value="MAG255">MAG255</option>
                                             <option value="MAG256">MAG256</option>
                                             <option value="MAG257">MAG257</option>
+                                            <option value="MAG260">MAG260</option>
                                             <option value="MAG270">MAG270</option>
                                             <option value="MAG275">MAG275</option>
                                             <option value="MAG322">MAG322</option>
+                                            <option value="MAG322w1">MAG322w1</option>
                                             <option value="MAG323">MAG323</option>
                                             <option value="MAG324">MAG324</option>
                                             <option value="MAG324C">MAG324C</option>
+                                            <option value="MAG324w2">MAG324w2</option>
                                             <option value="MAG325">MAG325</option>
                                             <option value="MAG349">MAG349</option>
                                             <option value="MAG350">MAG350</option>
                                             <option value="MAG351">MAG351</option>
                                             <option value="MAG352">MAG352</option>
+                                            <option value="MAG420">MAG420</option>
+                                            <option value="MAG420w1">MAG420w1</option>
+                                            <option value="MAG422">MAG422</option>
+                                            <option value="MAG422А">MAG422А</option>
+                                            <option value="MAG422Аw1">MAG422Аw1</option>
+                                            <option value="MAG424">MAG424</option>
+                                            <option value="MAG424w3">MAG424w3</option>
+                                            <option value="MAG424А">MAG424А</option>
+                                            <option value="MAG424Аw3">MAG424Аw3</option>
+                                            <option value="MAG425">MAG425</option>
+                                            <option value="MAG425А">MAG425А</option>
+                                            <option value="AuraHD">AuraHD</option>
                                             <option value="AuraHD0">AuraHD0</option>
                                             <option value="AuraHD1">AuraHD1</option>
+                                            <option value="AuraHD2">AuraHD2</option>
+                                            <option value="AuraHD3">AuraHD3</option>
+                                            <option value="AuraHD4">AuraHD4</option>
+                                            <option value="AuraHD8">AuraHD8</option>
                                             <option value="AuraHD9">AuraHD9</option>
+                                            <option value="WR320">WR320</option>
+                                            <option value="IM2100">IM2100</option>
+                                            <option value="IM2100w1">IM2100w1</option>
+                                            <option value="IM2100V">IM2100V</option>
+                                            <option value="IM2100VI">IM2100VI</option>
+                                            <option value="IM2101">IM2101</option>
+                                            <option value="IM2101V">IM2101V</option>
+                                            <option value="IM2101VI">IM2101VI</option>
+                                            <option value="IM2101VO">IM2101VO</option>
+                                            <option value="IM2101w2">IM2101w2</option>
+                                            <option value="IM2102">IM2102</option>
+                                            <option value="IM4410">IM4410</option>
+                                            <option value="IM4410w3">IM4410w3</option>
+                                            <option value="IM4411">IM4411</option>
+                                            <option value="IM4411w1">IM4411w1</option>
+                                            <option value="IM4412">IM4412</option>
+                                            <option value="IM4414">IM4414</option>
+                                            <option value="IM4414w1">IM4414w1</option>
                                             <option value="IP_STB_HD">IP_STB_HD</option>
                                         </select>
                                     </div>
diff --git a/admin/resources/views/default/Settings/common/common.twig b/admin/resources/views/default/Settings/common/common.twig
index b3ff318..586efa4 100644
--- a/admin/resources/views/default/Settings/common/common.twig
+++ b/admin/resources/views/default/Settings/common/common.twig
@@ -96,6 +96,7 @@
                                     <div class=" col-xs-10 col-sm-10">
                                         <input class="form-control own_fields" type="hidden" title="" value="" name="id">
                                         <select name="stb_type" class="populate placeholder own_fields" data-validation=required id="s2_stb_type" required="required">
+                                            <option value="MAG100">MAG100</option>
                                             <option value="MAG200">MAG200</option>
                                             <option value="MAG245">MAG245</option>
                                             <option value="MAG245D">MAG245D</option>
@@ -104,22 +105,58 @@
                                             <option value="MAG255">MAG255</option>
                                             <option value="MAG256">MAG256</option>
                                             <option value="MAG257">MAG257</option>
+                                            <option value="MAG260">MAG260</option>
                                             <option value="MAG270">MAG270</option>
                                             <option value="MAG275">MAG275</option>
                                             <option value="MAG322">MAG322</option>
+                                            <option value="MAG322w1">MAG322w1</option>
                                             <option value="MAG323">MAG323</option>
                                             <option value="MAG324">MAG324</option>
                                             <option value="MAG324C">MAG324C</option>
+                                            <option value="MAG324w2">MAG324w2</option>
                                             <option value="MAG325">MAG325</option>
                                             <option value="MAG349">MAG349</option>
                                             <option value="MAG350">MAG350</option>
                                             <option value="MAG351">MAG351</option>
                                             <option value="MAG352">MAG352</option>
-                                            <option value="WR320">WR320</option>
-                                            <option value="IP_STB_HD">IP_STB_HD</option>
+                                            <option value="MAG420">MAG420</option>
+                                            <option value="MAG420w1">MAG420w1</option>
+                                            <option value="MAG422">MAG422</option>
+                                            <option value="MAG422А">MAG422А</option>
+                                            <option value="MAG422Аw1">MAG422Аw1</option>
+                                            <option value="MAG424">MAG424</option>
+                                            <option value="MAG424w3">MAG424w3</option>
+                                            <option value="MAG424А">MAG424А</option>
+                                            <option value="MAG424Аw3">MAG424Аw3</option>
+                                            <option value="MAG425">MAG425</option>
+                                            <option value="MAG425А">MAG425А</option>
+                                            <option value="AuraHD">AuraHD</option>
                                             <option value="AuraHD0">AuraHD0</option>
                                             <option value="AuraHD1">AuraHD1</option>
+                                            <option value="AuraHD2">AuraHD2</option>
+                                            <option value="AuraHD3">AuraHD3</option>
+                                            <option value="AuraHD4">AuraHD4</option>
+                                            <option value="AuraHD8">AuraHD8</option>
                                             <option value="AuraHD9">AuraHD9</option>
+                                            <option value="WR320">WR320</option>
+                                            <option value="IM2100">IM2100</option>
+                                            <option value="IM2100w1">IM2100w1</option>
+                                            <option value="IM2100V">IM2100V</option>
+                                            <option value="IM2100VI">IM2100VI</option>
+                                            <option value="IM2101">IM2101</option>
+                                            <option value="IM2101V">IM2101V</option>
+                                            <option value="IM2101VI">IM2101VI</option>
+                                            <option value="IM2101VO">IM2101VO</option>
+                                            <option value="IM2101w2">IM2101w2</option>
+                                            <option value="IM2102">IM2102</option>
+                                            <option value="IM4410">IM4410</option>
+                                            <option value="IM4410w3">IM4410w3</option>
+                                            <option value="IM4411">IM4411</option>
+                                            <option value="IM4411w1">IM4411w1</option>
+                                            <option value="IM4412">IM4412</option>
+                                            <option value="IM4414">IM4414</option>
+                                            <option value="IM4414w1">IM4414w1</option>
+                                            <option value="IP_STB_HD">IP_STB_HD</option>
                                         </select>
                                     </div>
                                 </div>
diff --git a/admin/resources/views/default/Users/users_list/users_list.twig b/admin/resources/views/default/Users/users_list/users_list.twig
index 7b17e0d..9d40a32 100644
--- a/admin/resources/views/default/Users/users_list/users_list.twig
+++ b/admin/resources/views/default/Users/users_list/users_list.twig
@@ -164,17 +164,65 @@
                                         <select class="populate placeholder" name="pattern" id="s2_pattern">
                                             <option value="MAG100">MAG100</option>
                                             <option value="MAG200">MAG200</option>
+                                            <option value="MAG245">MAG245</option>
+                                            <option value="MAG245D">MAG245D</option>
                                             <option value="MAG250">MAG250</option>
+                                            <option value="MAG254">MAG254</option>
                                             <option value="MAG255">MAG255</option>
                                             <option value="MAG256">MAG256</option>
                                             <option value="MAG257">MAG257</option>
+                                            <option value="MAG260">MAG260</option>
                                             <option value="MAG270">MAG270</option>
                                             <option value="MAG275">MAG275</option>
+                                            <option value="MAG322">MAG322</option>
+                                            <option value="MAG322w1">MAG322w1</option>
+                                            <option value="MAG323">MAG323</option>
+                                            <option value="MAG324">MAG324</option>
+                                            <option value="MAG324C">MAG324C</option>
+                                            <option value="MAG324w2">MAG324w2</option>
+                                            <option value="MAG325">MAG325</option>
+                                            <option value="MAG349">MAG349</option>
+                                            <option value="MAG350">MAG350</option>
                                             <option value="MAG351">MAG351</option>
                                             <option value="MAG352">MAG352</option>
+                                            <option value="MAG420">MAG420</option>
+                                            <option value="MAG420w1">MAG420w1</option>
+                                            <option value="MAG422">MAG422</option>
+                                            <option value="MAG422А">MAG422А</option>
+                                            <option value="MAG422Аw1">MAG422Аw1</option>
+                                            <option value="MAG424">MAG424</option>
+                                            <option value="MAG424w3">MAG424w3</option>
+                                            <option value="MAG424А">MAG424А</option>
+                                            <option value="MAG424Аw3">MAG424Аw3</option>
+                                            <option value="MAG425">MAG425</option>
+                                            <option value="MAG425А">MAG425А</option>
+                                            <option value="AuraHD">AuraHD</option>
                                             <option value="AuraHD0">AuraHD0</option>
                                             <option value="AuraHD1">AuraHD1</option>
+                                            <option value="AuraHD2">AuraHD2</option>
+                                            <option value="AuraHD3">AuraHD3</option>
+                                            <option value="AuraHD4">AuraHD4</option>
+                                            <option value="AuraHD8">AuraHD8</option>
                                             <option value="AuraHD9">AuraHD9</option>
+                                            <option value="WR320">WR320</option>
+                                            <option value="IM2100">IM2100</option>
+                                            <option value="IM2100w1">IM2100w1</option>
+                                            <option value="IM2100V">IM2100V</option>
+                                            <option value="IM2100VI">IM2100VI</option>
+                                            <option value="IM2101">IM2101</option>
+                                            <option value="IM2101V">IM2101V</option>
+                                            <option value="IM2101VI">IM2101VI</option>
+                                            <option value="IM2101VO">IM2101VO</option>
+                                            <option value="IM2101w2">IM2101w2</option>
+                                            <option value="IM2102">IM2102</option>
+                                            <option value="IM4410">IM4410</option>
+                                            <option value="IM4410w3">IM4410w3</option>
+                                            <option value="IM4411">IM4411</option>
+                                            <option value="IM4411w1">IM4411w1</option>
+                                            <option value="IM4412">IM4412</option>
+                                            <option value="IM4414">IM4414</option>
+                                            <option value="IM4414w1">IM4414w1</option>
+                                            <option value="IP_STB_HD">IP_STB_HD</option>
                                         </select>
                                     </div>
                                     <span class="help-inline col-xs-12 col-sm-12">
diff --git a/admin/resources/views/default/basic_templates/events_menu.twig b/admin/resources/views/default/basic_templates/events_menu.twig
index a4f18d5..418b012 100644
--- a/admin/resources/views/default/basic_templates/events_menu.twig
+++ b/admin/resources/views/default/basic_templates/events_menu.twig
@@ -83,20 +83,57 @@
                                         <option value="MAG255">MAG255</option>
                                         <option value="MAG256">MAG256</option>
                                         <option value="MAG257">MAG257</option>
+                                        <option value="MAG260">MAG260</option>
                                         <option value="MAG270">MAG270</option>
                                         <option value="MAG275">MAG275</option>
                                         <option value="MAG322">MAG322</option>
+                                        <option value="MAG322w1">MAG322w1</option>
                                         <option value="MAG323">MAG323</option>
                                         <option value="MAG324">MAG324</option>
                                         <option value="MAG324C">MAG324C</option>
+                                        <option value="MAG324w2">MAG324w2</option>
                                         <option value="MAG325">MAG325</option>
                                         <option value="MAG349">MAG349</option>
                                         <option value="MAG350">MAG350</option>
                                         <option value="MAG351">MAG351</option>
                                         <option value="MAG352">MAG352</option>
+                                        <option value="MAG420">MAG420</option>
+                                        <option value="MAG420w1">MAG420w1</option>
+                                        <option value="MAG422">MAG422</option>
+                                        <option value="MAG422А">MAG422А</option>
+                                        <option value="MAG422Аw1">MAG422Аw1</option>
+                                        <option value="MAG424">MAG424</option>
+                                        <option value="MAG424w3">MAG424w3</option>
+                                        <option value="MAG424А">MAG424А</option>
+                                        <option value="MAG424Аw3">MAG424Аw3</option>
+                                        <option value="MAG425">MAG425</option>
+                                        <option value="MAG425А">MAG425А</option>
+                                        <option value="AuraHD">AuraHD</option>
                                         <option value="AuraHD0">AuraHD0</option>
                                         <option value="AuraHD1">AuraHD1</option>
+                                        <option value="AuraHD2">AuraHD2</option>
+                                        <option value="AuraHD3">AuraHD3</option>
+                                        <option value="AuraHD4">AuraHD4</option>
+                                        <option value="AuraHD8">AuraHD8</option>
                                         <option value="AuraHD9">AuraHD9</option>
+                                        <option value="WR320">WR320</option>
+                                        <option value="IM2100">IM2100</option>
+                                        <option value="IM2100w1">IM2100w1</option>
+                                        <option value="IM2100V">IM2100V</option>
+                                        <option value="IM2100VI">IM2100VI</option>
+                                        <option value="IM2101">IM2101</option>
+                                        <option value="IM2101V">IM2101V</option>
+                                        <option value="IM2101VI">IM2101VI</option>
+                                        <option value="IM2101VO">IM2101VO</option>
+                                        <option value="IM2101w2">IM2101w2</option>
+                                        <option value="IM2102">IM2102</option>
+                                        <option value="IM4410">IM4410</option>
+                                        <option value="IM4410w3">IM4410w3</option>
+                                        <option value="IM4411">IM4411</option>
+                                        <option value="IM4411w1">IM4411w1</option>
+                                        <option value="IM4412">IM4412</option>
+                                        <option value="IM4414">IM4414</option>
+                                        <option value="IM4414w1">IM4414w1</option>
                                         <option value="IP_STB_HD">IP_STB_HD</option>
                                     </select>
                                 </div>
diff --git a/admin/src/Controller/BaseStalkerController.php b/admin/src/Controller/BaseStalkerController.php
index e93d2c4..f859a50 100644
--- a/admin/src/Controller/BaseStalkerController.php
+++ b/admin/src/Controller/BaseStalkerController.php
@@ -734,7 +734,8 @@ class BaseStalkerController {
                     setcookie('last_location', json_encode($last_location_array), time()+60*60*24, "/");
                 }
             } else {
-                $refferer = end(explode('/', $this->refferer));
+                $refferer = explode('/', $this->refferer);
+                $refferer = end($refferer);
                 if ($refferer == 'login' && !empty($this->app['userlogin'])) {
                     $last_location = $this->request->cookies->get("last_location");
                     if (($parsed_json = json_decode($last_location, TRUE)) && $parsed_json && json_last_error() == JSON_ERROR_NONE) {
diff --git a/c/player.js b/c/player.js
index b8e61d6..a9190da 100644
--- a/c/player.js
+++ b/c/player.js
@@ -1778,17 +1778,23 @@ player.prototype.event_callback = function(event, params){
                 break;
             }
 
-            _debug('stb.power_off', stb.power_off);
+            var multiplier=1000, corrupted_event = false;
+            if (['MAG256','MAG257','MAG322','MAG323', 'MAG424', 'IM4412'].indexOf(stb.type.toUpperCase()) != -1){
+                multiplier=100;
+            } else if (['MAG420','IM4411'].indexOf(stb.type.toUpperCase()) != -1){
+                multiplier=300;
+            }
 
-            module && module.tv && module.tv.recalculate_preview_mode();
+            _debug('stb.power_off', stb.power_off);
 
-            if (stb.type == 'MAG256' || stb.type == 'MAG257'){
+            if (['MAG256','MAG257','MAG322','MAG323'].indexOf(stb.type.toUpperCase()) != -1){
                 if (stb.power_off && event == 33){
                     _debug('ignore event');
                     break;
                 }else if (!stb.power_off && event == 32){
-                    _debug('ignore event');
-                    break;
+                    corrupted_event = true;
+                    /*_debug('ignore event');
+                    break;*/
                 }
             }
 
@@ -1801,7 +1807,7 @@ player.prototype.event_callback = function(event, params){
 
             if (stb.profile['hdmi_event_reaction'] >= 1 && !module.blocking.on){
 
-                var hdmi_reaction_timeout = (stb.profile['hdmi_event_reaction'] == 1 || !stb.hdmi_on ? 5 : stb.profile['hdmi_event_reaction']) * 1000;
+                var hdmi_reaction_timeout = (stb.profile['hdmi_event_reaction'] == 1 || !stb.hdmi_on ? 5 : stb.profile['hdmi_event_reaction']) * multiplier;
 
                 _debug('hdmi_reaction_timeout', hdmi_reaction_timeout);
 
@@ -1810,45 +1816,51 @@ player.prototype.event_callback = function(event, params){
                     _debug('stb.power_off', stb.power_off);
                     _debug('stb.cur_place', stb.cur_place);
                     _debug('stb.hdmi_on', stb.hdmi_on);
+                    _debug('corrupted_event', corrupted_event);
 
-                    if (stb.hdmi_on){
+                    if (!corrupted_event) {
 
-                        stb.hdmi_on = false;
+                        if (stb.hdmi_on){
 
-                        if (self.on) {
-                            if (stb.cur_place == 'tv' && self.is_tv) {
-                                stb.player.stop();
-                            } else if (!self.pause.on) {
-                                keydown_observer.emulate_key(key.EXIT);
+                            stb.hdmi_on = false;
+
+                            if (self.on) {
+                                if (stb.cur_place == 'tv' && self.is_tv) {
+                                    stb.player.stop();
+                                } else if (!self.pause.on) {
+                                    keydown_observer.emulate_key(key.EXIT);
+                                }
                             }
-                        }
 
-                        if (stb.profile['standby_on_hdmi_off'] && !stb.power_off){
-                            stb.power_off = true;
-                            stb.StandBy(1);
-                        }
-                    }else{
+                            if (stb.profile['standby_on_hdmi_off'] && !stb.power_off){
+                                stb.power_off = true;
+                                stb.StandBy(1);
+                            }
+                        }else{
 
-                        stb.hdmi_on = true;
+                            stb.hdmi_on = true;
 
-                        if (stb.power_off) {
-                            stb.power_off = false;
-                            stb.StandBy(0);
-                        }
+                            if (stb.power_off) {
+                                stb.power_off = false;
+                                stb.StandBy(0);
+                            }
 
-                        if (stb.cur_place == 'tv' && self.is_tv) {
+                            if (stb.cur_place == 'tv' && self.is_tv) {
 
-                            _debug('module.tv.on', module.tv.on);
+                                _debug('module.tv.on', module.tv.on);
 
-                            if (module.tv.on) {
-                                module.tv.cur_page = 0;
-                                module.tv.load_data();
-                            } else {
-                                stb.player.play_last();
+                                if (module.tv.on) {
+                                    module.tv.cur_page = 0;
+                                    module.tv.load_data();
+                                } else {
+                                    stb.player.play_last();
+                                }
                             }
                         }
                     }
 
+                    module && module.tv && module.tv.recalculate_preview_mode();
+
                 }, hdmi_reaction_timeout);
 
             }
diff --git a/c/xpcom.common.js b/c/xpcom.common.js
index b1c62e1..e6a516c 100644
--- a/c/xpcom.common.js
+++ b/c/xpcom.common.js
@@ -1048,7 +1048,7 @@ function common_xpcom(){
 
             _debug('checking conditions 2');
 
-            if ((this.num_banks == 2 || ['MAG256', 'MAG257', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352'].indexOf(this.type) >= 0) && params.update_type == 'http_update'){
+            if ((this.num_banks == 2 || ['MAG256', 'MAG257', 'MAG322', 'MAG322w1', 'MAG323', 'MAG324', 'MAG324C', 'MAG324w2', 'IM2100w1', 'IM2100V', 'IM2100VI', 'IM2101', 'IM2101V', 'IM2101VI', 'IM2101VO', 'IM2101w2', 'IM2102', 'IM4410', 'IM4410w3', 'IM4411', 'IM4411w1', 'IM4412', 'IM4414', 'IM4414w1', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG420', 'MAG420w1', 'MAG422', 'MAG422А', 'MAG422Аw1', 'MAG424', 'MAG424w3', 'MAG424А', 'MAG424Аw3', 'MAG425', 'MAG425А'].indexOf(this.type) >= 0) && params.update_type == 'http_update'){
                 try{
                     _debug('this.user[update_url]', this.user['update_url']);
 
@@ -1114,7 +1114,7 @@ function common_xpcom(){
             return;
         }
 
-        if (['MAG200', 'MAG256', 'MAG257', 'MAG260', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352'].indexOf(this.type) === -1  && !_GET['debug_key']){
+        if (['MAG200', 'MAG245', 'MAG245D', 'MAG250', 'MAG254', 'MAG255', 'MAG256', 'MAG257', 'MAG260', 'MAG270', 'MAG275', 'MAG322', 'MAG322w1', 'MAG323', 'MAG324', 'MAG324C', 'MAG324w2', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG420', 'MAG420w1', 'MAG422', 'MAG422А', 'MAG422Аw1', 'MAG424', 'MAG424w3', 'MAG424А', 'MAG424Аw3', 'MAG425', 'MAG425А', 'AuraHD', 'AuraHD0', 'AuraHD1', 'AuraHD2', 'AuraHD3', 'AuraHD4', 'AuraHD8', 'AuraHD9', 'WR320', 'IM2100', 'IM2100w1', 'IM2100V', 'IM2100VI', 'IM2101', 'IM2101V', 'IM2101VI', 'IM2101VO', 'IM2101w2', 'IM2102', 'IM4410', 'IM4410w3', 'IM4411', 'IM4411w1', 'IM4412', 'IM4414', 'IM4414w1'].indexOf(this.type) === -1  && !_GET['debug_key']){
             var match = /Player Engine version: (\S+)/.exec(this.version);
             _debug('match', match);
 
@@ -1128,7 +1128,7 @@ function common_xpcom(){
                 stb.loader.stop();
                 this.cut_off(get_word('outdated_firmware'));
 
-                if (['MAG200', 'MAG245','MAG245D', 'MAG250', 'MAG254', 'MAG255', 'MAG256', 'MAG257', 'MAG270', 'MAG275', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'WR320', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1){
+                if (['MAG200', 'MAG245', 'MAG245D', 'MAG250', 'MAG254', 'MAG255', 'MAG256', 'MAG257', 'MAG260', 'MAG270', 'MAG275', 'MAG322', 'MAG322w1', 'MAG323', 'MAG324', 'MAG324C', 'MAG324w2', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG420', 'MAG420w1', 'MAG422', 'MAG422А', 'MAG422Аw1', 'MAG424', 'MAG424w3', 'MAG424А', 'MAG424Аw3', 'MAG425', 'MAG425А', 'AuraHD', 'AuraHD0', 'AuraHD1', 'AuraHD2', 'AuraHD3', 'AuraHD4', 'AuraHD8', 'AuraHD9', 'WR320', 'IM2100', 'IM2100w1', 'IM2100V', 'IM2100VI', 'IM2101', 'IM2101V', 'IM2101VI', 'IM2101VO', 'IM2101w2', 'IM2102', 'IM4410', 'IM4410w3', 'IM4411', 'IM4411w1', 'IM4412', 'IM4414', 'IM4414w1', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1){
                     this.check_image_version();
                 }
 
@@ -1245,7 +1245,7 @@ function common_xpcom(){
 
                 _debug('this.user[update_url]', this.user['update_url']);
 
-                if (['MAG200', 'MAG245','MAG245D', 'MAG250', 'MAG254', 'MAG255', 'MAG256', 'MAG257', 'MAG270', 'MAG275', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'WR320', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1){
+                if (['MAG200', 'MAG245', 'MAG245D', 'MAG250', 'MAG254', 'MAG255', 'MAG256', 'MAG257', 'MAG260', 'MAG270', 'MAG275', 'MAG322', 'MAG322w1', 'MAG323', 'MAG324', 'MAG324C', 'MAG324w2', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG420', 'MAG420w1', 'MAG422', 'MAG422А', 'MAG422Аw1', 'MAG424', 'MAG424w3', 'MAG424А', 'MAG424Аw3', 'MAG425', 'MAG425А', 'AuraHD', 'AuraHD0', 'AuraHD1', 'AuraHD2', 'AuraHD3', 'AuraHD4', 'AuraHD8', 'AuraHD9', 'WR320', 'IM2100', 'IM2100w1', 'IM2100V', 'IM2100VI', 'IM2101', 'IM2101V', 'IM2101VI', 'IM2101VO', 'IM2101w2', 'IM2102', 'IM4410', 'IM4410w3', 'IM4411', 'IM4411w1', 'IM4412', 'IM4414', 'IM4414w1', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1){
                     this.check_image_version();
                 }
 
diff --git a/deploy/build.xml b/deploy/build.xml
index 4ddb7ba..7fb26f9 100644
--- a/deploy/build.xml
+++ b/deploy/build.xml
@@ -265,6 +265,37 @@
             </then>
         </if>
 
+        <if>
+            <versioncompare version="${php_version}" desiredVersion="5.6" operator="ge" />
+            <then>
+                <exec
+                        command="cp -r -v ${project_path}/deploy/src/core/56/* ${project_path}"
+                        returnProperty="copyReturn"
+                        outputProperty="copyOutput"
+                        level="info"/>
+            </then>
+            <else>
+                <exec
+                        command="cp -r -v ${project_path}/deploy/src/core/53/* ${project_path}"
+                        returnProperty="copyReturn"
+                        outputProperty="copyOutput"
+                        level="info"/>
+            </else>
+        </if>
+
+        <if>
+            <not>
+                <equals arg1="${copyReturn}" arg2="0"/>
+            </not>
+            <then>
+                <echo msg="Failed to update the core!" level="warning"/>
+                <echo msg="Reason: ${copyOutput}" level="warning"/>
+            </then>
+            <else>
+                <echo msg="The core was successfully updated!" level="info"/>
+            </else>
+        </if>
+
         <chmod file="${project_path}/screenshots" mode="0777" />
         <chmod file="${project_path}/misc/logos" mode="0777" />
         <chmod file="${project_path}/misc/audio_covers" mode="0777" />
diff --git a/external/settings/g_video.html b/external/settings/g_video.html
index db2f7a6..7738f65 100644
--- a/external/settings/g_video.html
+++ b/external/settings/g_video.html
@@ -26,9 +26,9 @@
 
             if (['mag254', 'mag255', 'mag270', 'mag275', 'mag350'].indexOf(model.toLowerCase()) != -1){
                 menuT[0] = ['select', parent.t('Video output mode:'), "Auto", "Auto", "PAL", "PAL", "576-50", "576-50", "720p-50", "720p-50", "1080i-50", "1080i-50", "1080p-50", "1080p-50", "NTSC", "NTSC", "720p-60", "720p-60", "1080i-60", "1080i-60", "1080p-60", "1080p-60"];
-            }else if (['mag256', 'mag257'].indexOf(model.toLowerCase()) != -1){
+            }else if (['mag256', 'mag257', 'mag322', 'mag323', 'im2100', 'im2100w1', 'im2100v', 'im2100vi', 'im2101', 'im2101v', 'im2101vi', 'im2101vo', 'im2101w2', 'im2102'].indexOf(model.toLowerCase()) != -1){
                 menuT[0] = ['select', parent.t('Video output mode:'), "Auto", "Auto", "PAL", "PAL", "720p-50", "720p-50", "1080i-50", "1080i-50", "1080p-50", "1080p-50", "NTSC", "NTSC", "720p-60", "720p-60", "1080i-60", "1080i-60", "1080p-60", "1080p-60"];
-            }else if (['mag351', 'mag352'].indexOf(model.toLowerCase()) != -1){
+            }else if (['mag351', 'mag352', 'mag420', 'mag420w1', 'mag422', 'mag422а', 'mag422аw1', 'mag424', 'mag424w3', 'mag424а', 'mag424аw3', 'im4410', 'im4410w3', 'im4411', 'im4411w1', 'im4412', 'im4414', 'im4414w1'].indexOf(model.toLowerCase()) != -1){
                 menuT[0] = ['select', parent.t('Video output mode:'), "Auto", "Auto", "PAL", "PAL", "576-50", "576-50", "720p-50", "720p-50", "1080i-50", "1080i-50", "1080p-50", "1080p-50", "NTSC", "NTSC", "720p-60", "720p-60", "1080i-60", "1080i-60", "1080p-60", "1080p-60", "3840x2160p25", "3840x2160p25", "3840x2160p30", "3840x2160p30", "3840x2160p50", "3840x2160p50", "3840x2160p60", "3840x2160p60"];
             }
         }
diff --git a/server/administrator/events.php b/server/administrator/events.php
index 4b1fe84..65ea1b9 100644
--- a/server/administrator/events.php
+++ b/server/administrator/events.php
@@ -65,44 +65,127 @@ if (!empty($_POST['user_list_type']) && !empty($_POST['event'])){
         
         if (@$_POST['pattern'] == 'mag100'){
             $user_list = Middleware::getUidsByPattern(array('hd' => 0));
-        }else if (@$_POST['pattern'] == 'mag200'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG200'));
-        }else if (@$_POST['pattern'] == 'mag245'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG245'));
-        }else if (@$_POST['pattern'] == 'mag245d'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG245D'));
-        }else if (@$_POST['pattern'] == 'mag250'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG250'));
-        }else if (@$_POST['pattern'] == 'mag254'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG254'));
-        }else if (@$_POST['pattern'] == 'mag255'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG255'));
-        }else if (@$_POST['pattern'] == 'mag256'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG256'));
-        }else if (@$_POST['pattern'] == 'mag257'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG257'));
-        }else if (@$_POST['pattern'] == 'mag260'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG260'));
-        }else if (@$_POST['pattern'] == 'mag270'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG270'));
-        }else if (@$_POST['pattern'] == 'mag275'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG275'));
-        }else if (@$_POST['pattern'] == 'mag351'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG351'));
-        }else if (@$_POST['pattern'] == 'mag352'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'MAG352'));
-        }else if (@$_POST['pattern'] == 'wr320'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'WR320'));
-        }else if (@$_POST['pattern'] == 'ip_stb_hd'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'IP_STB_HD'));
-        }else if (@$_POST['pattern'] == 'aurahd0'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'AuraHD0'));
-        }else if (@$_POST['pattern'] == 'aurahd1'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'AuraHD1'));
-        }else if (@$_POST['pattern'] == 'aurahd9'){
-            $user_list = Middleware::getUidsByPattern(array('stb_type' => 'AuraHD9'));
-        }
-        else{
+        } else if (@$_POST['pattern'] == 'mag200') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag200'));
+        } else if (@$_POST['pattern'] == 'mag245') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag245'));
+        } else if (@$_POST['pattern'] == 'mag245d') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag245d'));
+        } else if (@$_POST['pattern'] == 'mag250') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag250'));
+        } else if (@$_POST['pattern'] == 'mag254') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag254'));
+        } else if (@$_POST['pattern'] == 'mag255') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag255'));
+        } else if (@$_POST['pattern'] == 'mag256') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag256'));
+        } else if (@$_POST['pattern'] == 'mag257') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag257'));
+        } else if (@$_POST['pattern'] == 'mag260') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag260'));
+        } else if (@$_POST['pattern'] == 'mag270') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag270'));
+        } else if (@$_POST['pattern'] == 'mag275') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag275'));
+        } else if (@$_POST['pattern'] == 'mag322') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag322'));
+        } else if (@$_POST['pattern'] == 'mag322w1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag322w1'));
+        } else if (@$_POST['pattern'] == 'mag323') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag323'));
+        } else if (@$_POST['pattern'] == 'mag324') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag324'));
+        } else if (@$_POST['pattern'] == 'mag324c') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag324c'));
+        } else if (@$_POST['pattern'] == 'mag324w2') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag324w2'));
+        } else if (@$_POST['pattern'] == 'mag325') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag325'));
+        } else if (@$_POST['pattern'] == 'mag349') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag349'));
+        } else if (@$_POST['pattern'] == 'mag350') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag350'));
+        } else if (@$_POST['pattern'] == 'mag351') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag351'));
+        } else if (@$_POST['pattern'] == 'mag352') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag352'));
+        } else if (@$_POST['pattern'] == 'mag420') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag420'));
+        } else if (@$_POST['pattern'] == 'mag420w1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag420w1'));
+        } else if (@$_POST['pattern'] == 'mag422') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag422'));
+        } else if (@$_POST['pattern'] == 'mag422а') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag422а'));
+        } else if (@$_POST['pattern'] == 'mag422аw1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag422аw1'));
+        } else if (@$_POST['pattern'] == 'mag424') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag424'));
+        } else if (@$_POST['pattern'] == 'mag424w3') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag424w3'));
+        } else if (@$_POST['pattern'] == 'mag424а') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag424а'));
+        } else if (@$_POST['pattern'] == 'mag424аw3') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag424аw3'));
+        } else if (@$_POST['pattern'] == 'mag425') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag425'));
+        } else if (@$_POST['pattern'] == 'mag425а') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'mag425а'));
+        } else if (@$_POST['pattern'] == 'aurahd') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd'));
+        } else if (@$_POST['pattern'] == 'aurahd0') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd0'));
+        } else if (@$_POST['pattern'] == 'aurahd1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd1'));
+        } else if (@$_POST['pattern'] == 'aurahd2') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd2'));
+        } else if (@$_POST['pattern'] == 'aurahd3') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd3'));
+        } else if (@$_POST['pattern'] == 'aurahd4') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd4'));
+        } else if (@$_POST['pattern'] == 'aurahd8') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd8'));
+        } else if (@$_POST['pattern'] == 'aurahd9') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'aurahd9'));
+        } else if (@$_POST['pattern'] == 'wr320') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'wr320'));
+        } else if (@$_POST['pattern'] == 'im2100') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2100'));
+        } else if (@$_POST['pattern'] == 'im2100w1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2100w1'));
+        } else if (@$_POST['pattern'] == 'im2100v') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2100v'));
+        } else if (@$_POST['pattern'] == 'im2100vi') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2100vi'));
+        } else if (@$_POST['pattern'] == 'im2101') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2101'));
+        } else if (@$_POST['pattern'] == 'im2101v') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2101v'));
+        } else if (@$_POST['pattern'] == 'im2101vi') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2101vi'));
+        } else if (@$_POST['pattern'] == 'im2101vo') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2101vo'));
+        } else if (@$_POST['pattern'] == 'im2101w2') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2101w2'));
+        } else if (@$_POST['pattern'] == 'im2102') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im2102'));
+        } else if (@$_POST['pattern'] == 'im4410') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4410'));
+        } else if (@$_POST['pattern'] == 'im4410w3') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4410w3'));
+        } else if (@$_POST['pattern'] == 'im4411') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4411'));
+        } else if (@$_POST['pattern'] == 'im4411w1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4411w1'));
+        } else if (@$_POST['pattern'] == 'im4412') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4412'));
+        } else if (@$_POST['pattern'] == 'im4414') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4414'));
+        } else if (@$_POST['pattern'] == 'im4414w1') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'im4414w1'));
+        } else if (@$_POST['pattern'] == 'ip_stb_hd') {
+            $user_list = middleware::getuidsbypattern(array('stb_type' => 'ip_stb_hd'));
+        } else{
             $user_list = array();
         }
 
@@ -420,19 +503,54 @@ function fill_msg(){
             <option value="mag270">MAG270</option>
             <option value="mag275">MAG275</option>
             <option value="mag322">MAG322</option>
+            <option value="mag322w1">MAG322w1</option>
             <option value="mag323">MAG323</option>
             <option value="mag324">MAG324</option>
             <option value="mag324c">MAG324C</option>
+            <option value="mag324w2">MAG324w2</option>
             <option value="mag325">MAG325</option>
             <option value="mag349">MAG349</option>
             <option value="mag350">MAG350</option>
             <option value="mag351">MAG351</option>
             <option value="mag352">MAG352</option>
-            <option value="wr320">WR320</option>
-            <option value="ip_stb_hd">IP_STB_HD</option>
+            <option value="mag420">MAG420</option>
+            <option value="mag420w1">MAG420w1</option>
+            <option value="mag422">MAG422</option>
+            <option value="mag422а">MAG422А</option>
+            <option value="mag422аw1">MAG422Аw1</option>
+            <option value="mag424">MAG424</option>
+            <option value="mag424w3">MAG424w3</option>
+            <option value="mag424а">MAG424А</option>
+            <option value="mag424аw3">MAG424Аw3</option>
+            <option value="mag425">MAG425</option>
+            <option value="mag425а">MAG425А</option>
+            <option value="aurahd">AuraHD</option>
             <option value="aurahd0">AuraHD0</option>
             <option value="aurahd1">AuraHD1</option>
+            <option value="aurahd2">AuraHD2</option>
+            <option value="aurahd3">AuraHD3</option>
+            <option value="aurahd4">AuraHD4</option>
+            <option value="aurahd8">AuraHD8</option>
             <option value="aurahd9">AuraHD9</option>
+            <option value="wr320">WR320</option>
+            <option value="im2100">IM2100</option>
+            <option value="im2100w1">IM2100w1</option>
+            <option value="im2100v">IM2100V</option>
+            <option value="im2100vi">IM2100VI</option>
+            <option value="im2101">IM2101</option>
+            <option value="im2101v">IM2101V</option>
+            <option value="im2101vi">IM2101VI</option>
+            <option value="im2101vo">IM2101VO</option>
+            <option value="im2101w2">IM2101w2</option>
+            <option value="im2102">IM2102</option>
+            <option value="im4410">IM4410</option>
+            <option value="im4410w3">IM4410w3</option>
+            <option value="im4411">IM4411</option>
+            <option value="im4411w1">IM4411w1</option>
+            <option value="im4412">IM4412</option>
+            <option value="im4414">IM4414</option>
+            <option value="im4414w1">IM4414w1</option>
+            <option value="ip_stb_hd">IP_STB_HD</option>
         </select>
     </td>
 </tr>
diff --git a/server/administrator/setting_common.php b/server/administrator/setting_common.php
index 793d6c7..7e8d038 100644
--- a/server/administrator/setting_common.php
+++ b/server/administrator/setting_common.php
@@ -142,6 +142,7 @@ h3{
                     <td><?= _('STB Model')?></td>
                     <td>
                         <select name="stb_type" class="stb-type">
+                            <option value="MAG100" {{if stb_type==="MAG100"}}selected{{/if}} >MAG100</option>
                             <option value="MAG200" {{if stb_type==="MAG200"}}selected{{/if}} >MAG200</option>
                             <option value="MAG245" {{if stb_type==="MAG245"}}selected{{/if}} >MAG245</option>
                             <option value="MAG245D" {{if stb_type==="MAG245D"}}selected{{/if}} >MAG245D</option>
@@ -150,22 +151,58 @@ h3{
                             <option value="MAG255" {{if stb_type==="MAG255"}}selected{{/if}} >MAG255</option>
                             <option value="MAG256" {{if stb_type==="MAG256"}}selected{{/if}} >MAG256</option>
                             <option value="MAG257" {{if stb_type==="MAG257"}}selected{{/if}} >MAG257</option>
+                            <option value="MAG260" {{if stb_type==="MAG260"}}selected{{/if}} >MAG260</option>
                             <option value="MAG270" {{if stb_type==="MAG270"}}selected{{/if}} >MAG270</option>
                             <option value="MAG275" {{if stb_type==="MAG275"}}selected{{/if}} >MAG275</option>
                             <option value="MAG322" {{if stb_type==="MAG322"}}selected{{/if}} >MAG322</option>
+                            <option value="MAG322w1" {{if stb_type==="MAG322w1"}}selected{{/if}} >MAG322w1</option>
                             <option value="MAG323" {{if stb_type==="MAG323"}}selected{{/if}} >MAG323</option>
                             <option value="MAG324" {{if stb_type==="MAG324"}}selected{{/if}} >MAG324</option>
                             <option value="MAG324C" {{if stb_type==="MAG324C"}}selected{{/if}} >MAG324C</option>
+                            <option value="MAG324w2" {{if stb_type==="MAG324w2"}}selected{{/if}} >MAG324w2</option>
                             <option value="MAG325" {{if stb_type==="MAG325"}}selected{{/if}} >MAG325</option>
                             <option value="MAG349" {{if stb_type==="MAG349"}}selected{{/if}} >MAG349</option>
                             <option value="MAG350" {{if stb_type==="MAG350"}}selected{{/if}} >MAG350</option>
                             <option value="MAG351" {{if stb_type==="MAG351"}}selected{{/if}} >MAG351</option>
                             <option value="MAG352" {{if stb_type==="MAG352"}}selected{{/if}} >MAG352</option>
-                            <option value="WR320" {{if stb_type==="WR320"}}selected{{/if}} >WR320</option>
-                            <option value="IP_STB_HD" {{if stb_type==="IP_STB_HD"}}selected{{/if}} >IP_STB_HD</option>
+                            <option value="MAG420" {{if stb_type==="MAG420"}}selected{{/if}} >MAG420</option>
+                            <option value="MAG420w1" {{if stb_type==="MAG420w1"}}selected{{/if}} >MAG420w1</option>
+                            <option value="MAG422" {{if stb_type==="MAG422"}}selected{{/if}} >MAG422</option>
+                            <option value="MAG422А" {{if stb_type==="MAG422А"}}selected{{/if}} >MAG422А</option>
+                            <option value="MAG422Аw1" {{if stb_type==="MAG422Аw1"}}selected{{/if}} >MAG422Аw1</option>
+                            <option value="MAG424" {{if stb_type==="MAG424"}}selected{{/if}} >MAG424</option>
+                            <option value="MAG424w3" {{if stb_type==="MAG424w3"}}selected{{/if}} >MAG424w3</option>
+                            <option value="MAG424А" {{if stb_type==="MAG424А"}}selected{{/if}} >MAG424А</option>
+                            <option value="MAG424Аw3" {{if stb_type==="MAG424Аw3"}}selected{{/if}} >MAG424Аw3</option>
+                            <option value="MAG425" {{if stb_type==="MAG425"}}selected{{/if}} >MAG425</option>
+                            <option value="MAG425А" {{if stb_type==="MAG425А"}}selected{{/if}} >MAG425А</option>
+                            <option value="AuraHD" {{if stb_type==="AuraHD"}}selected{{/if}} >AuraHD</option>
                             <option value="AuraHD0" {{if stb_type==="AuraHD0"}}selected{{/if}} >AuraHD0</option>
                             <option value="AuraHD1" {{if stb_type==="AuraHD1"}}selected{{/if}} >AuraHD1</option>
+                            <option value="AuraHD2" {{if stb_type==="AuraHD2"}}selected{{/if}} >AuraHD2</option>
+                            <option value="AuraHD3" {{if stb_type==="AuraHD3"}}selected{{/if}} >AuraHD3</option>
+                            <option value="AuraHD4" {{if stb_type==="AuraHD4"}}selected{{/if}} >AuraHD4</option>
+                            <option value="AuraHD8" {{if stb_type==="AuraHD8"}}selected{{/if}} >AuraHD8</option>
                             <option value="AuraHD9" {{if stb_type==="AuraHD9"}}selected{{/if}} >AuraHD9</option>
+                            <option value="WR320" {{if stb_type==="WR320"}}selected{{/if}} >WR320</option>
+                            <option value="IM2100" {{if stb_type==="IM2100"}}selected{{/if}} >IM2100</option>
+                            <option value="IM2100w1" {{if stb_type==="IM2100w1"}}selected{{/if}} >IM2100w1</option>
+                            <option value="IM2100V" {{if stb_type==="IM2100V"}}selected{{/if}} >IM2100V</option>
+                            <option value="IM2100VI" {{if stb_type==="IM2100VI"}}selected{{/if}} >IM2100VI</option>
+                            <option value="IM2101" {{if stb_type==="IM2101"}}selected{{/if}} >IM2101</option>
+                            <option value="IM2101V" {{if stb_type==="IM2101V"}}selected{{/if}} >IM2101V</option>
+                            <option value="IM2101VI" {{if stb_type==="IM2101VI"}}selected{{/if}} >IM2101VI</option>
+                            <option value="IM2101VO" {{if stb_type==="IM2101VO"}}selected{{/if}} >IM2101VO</option>
+                            <option value="IM2101w2" {{if stb_type==="IM2101w2"}}selected{{/if}} >IM2101w2</option>
+                            <option value="IM2102" {{if stb_type==="IM2102"}}selected{{/if}} >IM2102</option>
+                            <option value="IM4410" {{if stb_type==="IM4410"}}selected{{/if}} >IM4410</option>
+                            <option value="IM4410w3" {{if stb_type==="IM4410w3"}}selected{{/if}} >IM4410w3</option>
+                            <option value="IM4411" {{if stb_type==="IM4411"}}selected{{/if}} >IM4411</option>
+                            <option value="IM4411w1" {{if stb_type==="IM4411w1"}}selected{{/if}} >IM4411w1</option>
+                            <option value="IM4412" {{if stb_type==="IM4412"}}selected{{/if}} >IM4412</option>
+                            <option value="IM4414" {{if stb_type==="IM4414"}}selected{{/if}} >IM4414</option>
+                            <option value="IM4414w1" {{if stb_type==="IM4414w1"}}selected{{/if}} >IM4414w1</option>
+                            <option value="IP_STB_HD" {{if stb_type==="IP_STB_HD"}}selected{{/if}} >IP_STB_HD</option>
                         </select>
                     </td>
                 </tr>
diff --git a/server/config.ini b/server/config.ini
index 8648d6a..29bf632 100644
--- a/server/config.ini
+++ b/server/config.ini
@@ -181,7 +181,7 @@ daemon_api_url = http://localhost:3000/
 stalker_api_url = http://localhost/stalker_portal/api/
 
 strict_stb_type_check = false
-;allowed_stb_types = MAG200,MAG245,MAG245D,MAG250,MAG254,MAG255,MAG256,MAG257,MAG260,MAG270,MAG275,MAG322,MAG323,MAG324,MAG324C,MAG325,MAG349,MAG350,MAG351,MAG352,AuraHD,WR320
+;allowed_stb_types = MAG100,MAG200,MAG245,MAG245D,MAG250,MAG254,MAG255,MAG256,MAG257,MAG260,MAG270,MAG275,MAG322,MAG322w1,MAG323,MAG324,MAG324C,MAG324w2,MAG325,MAG349,MAG350,MAG351,MAG352,MAG420,MAG420w1,MAG422,MAG422А,MAG422Аw1,MAG424,MAG424w3,MAG424А,MAG424Аw3,MAG425,MAG425А,AuraHD,AuraHD0,AuraHD1,AuraHD2,AuraHD3,AuraHD4,AuraHD8,AuraHD9,WR320,IM2100,IM2100w1,IM2100V,IM2100VI,IM2101,IM2101V,IM2101VI,IM2101VO,IM2101w2,IM2102,IM4410,IM4410w3,IM4411,IM4411w1,IM4412,IM4414,IM4414w1,IP_STB_HD
 
 ; Middleware server http proxy
 ;http_proxy = tcp://10.128.1.1:8000
@@ -388,7 +388,7 @@ record_max_length = 180
 ; Per one user
 total_records_length = 600
 
-allowed_stb_types_for_local_recording = MAG245,MAG245D,MAG250,MAG254,MAG255,MAG256,MAG257,MAG270,MAG260,MAG275,MAG322,MAG323,MAG324,MAG324C,MAG325,MAG349,MAG350,MAG351,MAG352,AuraHD,WR320,IP_STB_HD
+allowed_stb_types_for_local_recording = MAG245,MAG245D,MAG250,MAG254,MAG255,MAG256,MAG257,MAG260,MAG270,MAG275,MAG322,MAG322w1,MAG323,MAG324,MAG324C,MAG324w2,MAG325,MAG349,MAG350,MAG351,MAG352,MAG420,MAG420w1,MAG422,MAG422А,MAG422Аw1,MAG424,MAG424w3,MAG424А,MAG424Аw3,MAG425,MAG425А,AuraHD,AuraHD0,AuraHD1,AuraHD2,AuraHD3,AuraHD4,AuraHD8,AuraHD9,WR320,IM2100,IM2100w1,IM2100V,IM2100VI,IM2101,IM2101V,IM2101VI,IM2101VO,IM2101w2,IM2102,IM4410,IM4410w3,IM4411,IM4411w1,IM4412,IM4414,IM4414w1,IP_STB_HD
 
 max_local_recordings = 10
 
diff --git a/server/lib/npm.class.php b/server/lib/npm.class.php
index 3f1d423..5ae9ab9 100644
--- a/server/lib/npm.class.php
+++ b/server/lib/npm.class.php
@@ -97,7 +97,7 @@ class Npm
             return;
         }
 
-        $scanned_directory = array_diff(scandir($packages_path), array('..', '.'));
+        $scanned_directory = array_diff(scandir($packages_path), array('..', '.', '.bin'));
 
         $scanned_directory = array_merge($package_order, array_diff($scanned_directory, $package_order));
 
@@ -144,16 +144,38 @@ class Npm
                     $target_path = $this->app_path.'/'.$dir.'/'.$ver;
                 }
 
-                if (!is_dir($target_path)){
+                if ($dir == 'magcore-theme-base'){
                     mkdir($target_path, 0777, true);
-                    rename($full_path, $target_path);
+                    self::copyRecursive($full_path, $target_path);
                 }else{
-                    self::delTree($full_path);
+                    if (!is_dir($target_path)){
+                        mkdir($target_path, 0777, true);
+                        rename($full_path, $target_path);
+                    }else{
+                        self::delTree($full_path);
+                    }
                 }
 
-                SmartLauncherAppsManager::getInstance()->addApplication($dir, true, false, $ver);
+                SmartLauncherAppsManager::getInstance()->addApplication($dir, true, false, $ver, true);
+            }
+        }
+    }
+
+    private static function copyRecursive($src, $dst) {
+
+        $dir = opendir($src);
+        @mkdir($dst);
+        while(false !== ( $file = readdir($dir)) ) {
+            if (( $file != '.' ) && ( $file != '..' )) {
+                if ( is_dir($src . '/' . $file) ) {
+                    self::copyRecursive($src . '/' . $file,$dst . '/' . $file);
+                }
+                else {
+                    copy($src . '/' . $file,$dst . '/' . $file);
+                }
             }
         }
+        closedir($dir);
     }
 
     private static function delTree($dir) {
diff --git a/server/lib/smartlauncherappsmanager.class.php b/server/lib/smartlauncherappsmanager.class.php
index 59aaa96..81721ab 100644
--- a/server/lib/smartlauncherappsmanager.class.php
+++ b/server/lib/smartlauncherappsmanager.class.php
@@ -39,17 +39,21 @@ class SmartLauncherAppsManager
 
     public static function getLauncherUrl(){
 
-        $core = Mysql::getInstance()->from('launcher_apps')->where(array('type' => 'core'))->get()->first();
+        $core = Mysql::getInstance()->from('launcher_apps')->where(array('type' => 'core', 'status' => 1))->get()->first();
 
         if (empty($core)){
             return false;
         }
 
+        if (!empty($core['config'])) {
+            $core['config'] = json_decode($core['config'], true);
+        }
+
         $url = 'http'.(((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? 's' : '')
         .'://'.(strpos($_SERVER['HTTP_HOST'], ':') > 0 ? $_SERVER['HTTP_HOST'] : $_SERVER['HTTP_HOST'].':'.$_SERVER['SERVER_PORT'])
         .'/'.Config::getSafe('launcher_apps_path', 'stalker_launcher_apps/')
         .$core['alias']
-        .'/'.$core['current_version'].'/app/';
+        .'/'.$core['current_version'].'/'.(isset($core['config']['uris']['app']) ? $core['config']['uris']['app'].'/' : 'app/');
 
         return $url;
     }
@@ -62,6 +66,17 @@ class SmartLauncherAppsManager
             .'/server/api/launcher_profile.php';
     }
 
+    public function getAppInfoByUrl($url, $force_npm = false) {
+
+        $app = $original_app = Mysql::getInstance()->from('launcher_apps')->where(array('url' => $url))->get()->first();
+
+        if (empty($app)){
+            return null;
+        }
+
+        return $this->getAppInfo($app['id'], $force_npm);
+    }
+
     /**
      * @param int $app_id
      * @param bool $force_npm
@@ -145,6 +160,8 @@ class SmartLauncherAppsManager
                 .$app['url']
                 .'/'.$app['current_version']);
 
+            $app['app_path'] = $app_path;
+
             $app['installed'] = $app_path && is_dir($app_path);
 
             if ($app['installed'] && isset($app['config']['uris']['icons']['720']['logoNormal']) && !empty($_SERVER['HTTP_HOST'])){
@@ -296,10 +313,11 @@ class SmartLauncherAppsManager
      * @param int $app_id
      * @param string $version
      * @param bool $skip_info_check
+     * @param bool $fake_install
      * @return bool
      * @throws SmartLauncherAppsManagerException
      */
-    public function installApp($app_id, $version = null, $skip_info_check = false){
+    public function installApp($app_id, $version = null, $skip_info_check = false, $fake_install = false){
 
         $app = $original_app = Mysql::getInstance()->from('launcher_apps')->where(array('id' => $app_id))->get()->first();
 
@@ -332,10 +350,14 @@ class SmartLauncherAppsManager
 
         $this->sendToCallback("Installing ".$app['url']."...");
 
-        $result = $npm->install($app['url'], $version);
+        if (!$fake_install) {
+            $result = $npm->install($app['url'], $version);
 
-        if (empty($result)){
-            throw new SmartLauncherAppsManagerException('Unable to install application');
+            if (empty($result)) {
+                throw new SmartLauncherAppsManagerException('Unable to install application ' . $app['url'] . '@' . $version);
+            }
+        }else{
+            $result = true;
         }
 
         $update_data = array('current_version' => isset($info['version']) ? $info['version'] : '');
@@ -494,7 +516,7 @@ class SmartLauncherAppsManager
         return $app_localizations;
     }
 
-    public function addApplication($url, $autoinstall = false, $skip_info_check = false, $version = null){
+    public function addApplication($url, $autoinstall = false, $skip_info_check = false, $version = null, $fake_install = false){
 
         $app = Mysql::getInstance()->from('launcher_apps')->where(array('url' => $url))->get()->first();
 
@@ -508,7 +530,7 @@ class SmartLauncherAppsManager
         ))->insert_id();
 
         if ($autoinstall){
-            $this->installApp($app_id, $version, $skip_info_check);
+            $this->installApp($app_id, $version, $skip_info_check, $fake_install);
         }else{
             $this->getAppInfo($app_id, true);
         }
@@ -591,7 +613,7 @@ class SmartLauncherAppsManager
             }elseif(!$dep_app['is_unique']){
                 $dep_app_path = realpath(PROJECT_PATH.'/../../'
                     .Config::getSafe('launcher_apps_path', 'stalker_launcher_apps/')
-                    .($app['type'] == 'plugin' ? 'plugins/' : '')
+                    .($dep_app['type'] == 'plugin' ? 'plugins/' : '')
                     .$dep_app['alias']);
 
                 if (!$dep_app_path){
@@ -925,6 +947,10 @@ class SmartLauncherAppsManager
                 $this->sendToCallback("Removing package ".$file."...");
                 self::delTree($apps_path.'/'.$file);
             }
+
+            if (is_file($apps_path.'/package.json')){
+                unlink($apps_path.'/package.json');
+            }
         }
 
         $this->sendToCallback("Installing metapackage ".$metapackage_name.(is_null($orig_metapackage) ? '@'.$stalker_version : '')."...");
