diff --git a/admin/resources/cache/sidebar/1546573628_.side_bar b/admin/resources/cache/sidebar/1546573628_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1546573628_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1546589674_1.side_bar b/admin/resources/cache/sidebar/1546589674_1.side_bar
new file mode 100644
index 0000000..7c1895b
--- /dev/null
+++ b/admin/resources/cache/sidebar/1546589674_1.side_bar
@@ -0,0 +1 @@
+a:18:{i:1;a:5:{s:4:"name";s:13:"IPTV channels";s:5:"alias";s:11:"tv-channels";s:4:"icon";s:13:"fa fa-desktop";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:8:"Channels";s:5:"alias";s:9:"iptv-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:17:"Organize channels";s:5:"alias";s:12:"move-channel";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:3:"EPG";s:5:"alias";s:3:"epg";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:9:"tv-genres";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:15:"Import from m3u";s:5:"alias";s:10:"m3u-import";s:4:"icon";s:0:"";}}}i:2;a:5:{s:4:"name";s:10:"Video club";s:5:"alias";s:14:"new-video-club";s:4:"icon";s:18:"fa fa-video-camera";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:10:"Movie list";s:5:"alias";s:10:"video-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:14:"video-schedule";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"Advertising";s:5:"alias";s:15:"video-advertise";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:10:"Moderators";s:5:"alias";s:26:"video-moderators-addresses";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:12:"Activity log";s:5:"alias";s:10:"video-logs";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:10:"Categories";s:5:"alias";s:16:"video-categories";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"video-genres";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:7:"Watched";s:5:"alias";s:16:"watched-settings";s:4:"icon";s:0:"";}}}i:3;a:5:{s:4:"name";s:10:"Audio club";s:5:"alias";s:10:"audio-club";s:4:"icon";s:11:"fa fa-music";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:6:"Albums";s:5:"alias";s:12:"audio-albums";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Artists";s:5:"alias";s:13:"audio-artists";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"audio-genres";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:9:"Languages";s:5:"alias";s:15:"audio-languages";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:5:"Years";s:5:"alias";s:11:"audio-years";s:4:"icon";s:0:"";}}}i:4;a:5:{s:4:"name";s:7:"Karaoke";s:5:"alias";s:7:"karaoke";s:4:"icon";s:16:"fa fa-microphone";s:5:"icon2";s:0:"";s:6:"action";a:0:{}}i:5;a:5:{s:4:"name";s:5:"Radio";s:5:"alias";s:5:"radio";s:4:"icon";s:14:"fa fa-bullhorn";s:5:"icon2";s:11:"pull-right ";s:6:"action";a:0:{}}i:6;a:5:{s:4:"name";s:7:"Tariffs";s:5:"alias";s:7:"tariffs";s:4:"icon";s:16:"fa fa-calculator";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:16:"Service packages";s:5:"alias";s:16:"service-packages";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Tariff plans";s:5:"alias";s:12:"tariff-plans";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:13:"Subscribe log";s:5:"alias";s:13:"subscribe-log";s:4:"icon";s:0:"";}}}i:7;a:5:{s:4:"name";s:5:"Users";s:5:"alias";s:5:"users";s:4:"icon";s:12:"fa  fa-users";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:6:{i:1;a:3:{s:4:"name";s:10:"Users list";s:5:"alias";s:10:"users-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Filters";s:5:"alias";s:17:"users-filter-list";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"User groups";s:5:"alias";s:21:"users-consoles-groups";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:19:"users-consoles-logs";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:21:"users-consoles-report";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:12:"Support info";s:5:"alias";s:12:"support-info";s:4:"icon";s:0:"";}}}i:8;a:5:{s:4:"name";s:12:"Applications";s:5:"alias";s:19:"application-catalog";s:4:"icon";s:12:"fa fa-rocket";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Classic apps";s:5:"alias";s:16:"application-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:19:"Smart Launcher apps";s:5:"alias";s:22:"smart-application-list";s:4:"icon";s:0:"";}}}i:9;a:5:{s:4:"name";s:6:"Events";s:5:"alias";s:6:"events";s:4:"icon";s:14:"fa fa-calendar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Users events";s:5:"alias";s:6:"events";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:15:"event-scheduler";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"Templates of messages";s:5:"alias";s:17:"message-templates";s:4:"icon";s:0:"";}}}i:10;a:5:{s:4:"name";s:14:"Administrators";s:5:"alias";s:6:"admins";s:4:"icon";s:17:"fa fa-user-secret";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:19:"Administrators list";s:5:"alias";s:11:"admins-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Groups";s:5:"alias";s:13:"admins-groups";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:9:"Resellers";s:5:"alias";s:14:"resellers-list";s:4:"icon";s:0:"";}}}i:11;a:5:{s:4:"name";s:5:"Tasks";s:5:"alias";s:5:"tasks";s:4:"icon";s:11:"fa fa-check";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Tasks list";s:5:"alias";s:10:"tasks-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:12:"tasks-report";s:4:"icon";s:0:"";}}}i:12;a:5:{s:4:"name";s:18:"Information portal";s:5:"alias";s:10:"infoportal";s:4:"icon";s:10:"fa fa-info";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Phone book";s:5:"alias";s:10:"phone-book";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:5:"Humor";s:5:"alias";s:5:"humor";s:4:"icon";s:0:"";}}}i:13;a:5:{s:4:"name";s:10:"Statistics";s:5:"alias";s:10:"statistics";s:4:"icon";s:15:"fa fa-pie-chart";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:16:"Movie statistics";s:5:"alias";s:10:"stat-video";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:13:"TV statistics";s:5:"alias";s:7:"stat-tv";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"TV archive statistics";s:5:"alias";s:15:"stat-tv-archive";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:20:"TimeShift statistics";s:5:"alias";s:14:"stat-timeshift";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:21:"Moderators statistics";s:5:"alias";s:15:"stat-moderators";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:21:"Subscribers statistic";s:5:"alias";s:13:"stat-abonents";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:20:"Inactive subscribers";s:5:"alias";s:22:"stat-abonents-unactive";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:21:"Complaints statistics";s:5:"alias";s:11:"stat-claims";s:4:"icon";s:0:"";}}}i:14;a:5:{s:4:"name";s:7:"Storage";s:5:"alias";s:8:"storages";s:4:"icon";s:13:"fa fa-archive";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Storage list";s:5:"alias";s:13:"storages-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Video search";s:5:"alias";s:21:"storages-video-search";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:13:"storages-logs";s:4:"icon";s:0:"";}}}i:15;a:5:{s:4:"name";s:17:"Streaming servers";s:5:"alias";s:17:"broadcast-servers";s:4:"icon";s:12:"fa fa-server";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Servers list";s:5:"alias";s:22:"broadcast-servers-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Streaming areas";s:5:"alias";s:19:"broadcast-zone-list";s:4:"icon";s:0:"";}}}i:16;a:5:{s:4:"name";s:8:"Settings";s:5:"alias";s:8:"settings";s:4:"icon";s:10:"fa fa-cogs";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Appearance";s:5:"alias";s:6:"themes";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Firmware update";s:5:"alias";s:6:"common";s:4:"icon";s:0:"";}}}i:17;a:5:{s:4:"name";s:11:"Advertising";s:5:"alias";s:20:"external-advertising";s:4:"icon";s:12:"fa fa-dollar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:17:"List of campaigns";s:5:"alias";s:12:"company-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:9:"Source ID";s:5:"alias";s:8:"settings";s:4:"icon";s:0:"";}}}i:18;a:6:{s:4:"name";s:12:"License keys";s:3:"new";b:1;s:5:"alias";s:12:"license-keys";s:4:"icon";s:9:"fa fa-key";s:5:"icon2";s:0:"";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:18:"About License keys";s:5:"alias";s:18:"about-license-keys";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"License keys";s:5:"alias";s:17:"license-keys-list";s:4:"icon";s:0:"";}}}}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1546831743_.side_bar b/admin/resources/cache/sidebar/1546831743_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1546831743_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1546844507_1.side_bar b/admin/resources/cache/sidebar/1546844507_1.side_bar
new file mode 100644
index 0000000..7c1895b
--- /dev/null
+++ b/admin/resources/cache/sidebar/1546844507_1.side_bar
@@ -0,0 +1 @@
+a:18:{i:1;a:5:{s:4:"name";s:13:"IPTV channels";s:5:"alias";s:11:"tv-channels";s:4:"icon";s:13:"fa fa-desktop";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:8:"Channels";s:5:"alias";s:9:"iptv-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:17:"Organize channels";s:5:"alias";s:12:"move-channel";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:3:"EPG";s:5:"alias";s:3:"epg";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:9:"tv-genres";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:15:"Import from m3u";s:5:"alias";s:10:"m3u-import";s:4:"icon";s:0:"";}}}i:2;a:5:{s:4:"name";s:10:"Video club";s:5:"alias";s:14:"new-video-club";s:4:"icon";s:18:"fa fa-video-camera";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:10:"Movie list";s:5:"alias";s:10:"video-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:14:"video-schedule";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"Advertising";s:5:"alias";s:15:"video-advertise";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:10:"Moderators";s:5:"alias";s:26:"video-moderators-addresses";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:12:"Activity log";s:5:"alias";s:10:"video-logs";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:10:"Categories";s:5:"alias";s:16:"video-categories";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"video-genres";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:7:"Watched";s:5:"alias";s:16:"watched-settings";s:4:"icon";s:0:"";}}}i:3;a:5:{s:4:"name";s:10:"Audio club";s:5:"alias";s:10:"audio-club";s:4:"icon";s:11:"fa fa-music";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:6:"Albums";s:5:"alias";s:12:"audio-albums";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Artists";s:5:"alias";s:13:"audio-artists";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"audio-genres";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:9:"Languages";s:5:"alias";s:15:"audio-languages";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:5:"Years";s:5:"alias";s:11:"audio-years";s:4:"icon";s:0:"";}}}i:4;a:5:{s:4:"name";s:7:"Karaoke";s:5:"alias";s:7:"karaoke";s:4:"icon";s:16:"fa fa-microphone";s:5:"icon2";s:0:"";s:6:"action";a:0:{}}i:5;a:5:{s:4:"name";s:5:"Radio";s:5:"alias";s:5:"radio";s:4:"icon";s:14:"fa fa-bullhorn";s:5:"icon2";s:11:"pull-right ";s:6:"action";a:0:{}}i:6;a:5:{s:4:"name";s:7:"Tariffs";s:5:"alias";s:7:"tariffs";s:4:"icon";s:16:"fa fa-calculator";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:16:"Service packages";s:5:"alias";s:16:"service-packages";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Tariff plans";s:5:"alias";s:12:"tariff-plans";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:13:"Subscribe log";s:5:"alias";s:13:"subscribe-log";s:4:"icon";s:0:"";}}}i:7;a:5:{s:4:"name";s:5:"Users";s:5:"alias";s:5:"users";s:4:"icon";s:12:"fa  fa-users";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:6:{i:1;a:3:{s:4:"name";s:10:"Users list";s:5:"alias";s:10:"users-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Filters";s:5:"alias";s:17:"users-filter-list";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"User groups";s:5:"alias";s:21:"users-consoles-groups";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:19:"users-consoles-logs";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:21:"users-consoles-report";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:12:"Support info";s:5:"alias";s:12:"support-info";s:4:"icon";s:0:"";}}}i:8;a:5:{s:4:"name";s:12:"Applications";s:5:"alias";s:19:"application-catalog";s:4:"icon";s:12:"fa fa-rocket";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Classic apps";s:5:"alias";s:16:"application-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:19:"Smart Launcher apps";s:5:"alias";s:22:"smart-application-list";s:4:"icon";s:0:"";}}}i:9;a:5:{s:4:"name";s:6:"Events";s:5:"alias";s:6:"events";s:4:"icon";s:14:"fa fa-calendar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Users events";s:5:"alias";s:6:"events";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:15:"event-scheduler";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"Templates of messages";s:5:"alias";s:17:"message-templates";s:4:"icon";s:0:"";}}}i:10;a:5:{s:4:"name";s:14:"Administrators";s:5:"alias";s:6:"admins";s:4:"icon";s:17:"fa fa-user-secret";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:19:"Administrators list";s:5:"alias";s:11:"admins-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Groups";s:5:"alias";s:13:"admins-groups";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:9:"Resellers";s:5:"alias";s:14:"resellers-list";s:4:"icon";s:0:"";}}}i:11;a:5:{s:4:"name";s:5:"Tasks";s:5:"alias";s:5:"tasks";s:4:"icon";s:11:"fa fa-check";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Tasks list";s:5:"alias";s:10:"tasks-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:12:"tasks-report";s:4:"icon";s:0:"";}}}i:12;a:5:{s:4:"name";s:18:"Information portal";s:5:"alias";s:10:"infoportal";s:4:"icon";s:10:"fa fa-info";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Phone book";s:5:"alias";s:10:"phone-book";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:5:"Humor";s:5:"alias";s:5:"humor";s:4:"icon";s:0:"";}}}i:13;a:5:{s:4:"name";s:10:"Statistics";s:5:"alias";s:10:"statistics";s:4:"icon";s:15:"fa fa-pie-chart";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:16:"Movie statistics";s:5:"alias";s:10:"stat-video";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:13:"TV statistics";s:5:"alias";s:7:"stat-tv";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"TV archive statistics";s:5:"alias";s:15:"stat-tv-archive";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:20:"TimeShift statistics";s:5:"alias";s:14:"stat-timeshift";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:21:"Moderators statistics";s:5:"alias";s:15:"stat-moderators";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:21:"Subscribers statistic";s:5:"alias";s:13:"stat-abonents";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:20:"Inactive subscribers";s:5:"alias";s:22:"stat-abonents-unactive";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:21:"Complaints statistics";s:5:"alias";s:11:"stat-claims";s:4:"icon";s:0:"";}}}i:14;a:5:{s:4:"name";s:7:"Storage";s:5:"alias";s:8:"storages";s:4:"icon";s:13:"fa fa-archive";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Storage list";s:5:"alias";s:13:"storages-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Video search";s:5:"alias";s:21:"storages-video-search";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:13:"storages-logs";s:4:"icon";s:0:"";}}}i:15;a:5:{s:4:"name";s:17:"Streaming servers";s:5:"alias";s:17:"broadcast-servers";s:4:"icon";s:12:"fa fa-server";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Servers list";s:5:"alias";s:22:"broadcast-servers-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Streaming areas";s:5:"alias";s:19:"broadcast-zone-list";s:4:"icon";s:0:"";}}}i:16;a:5:{s:4:"name";s:8:"Settings";s:5:"alias";s:8:"settings";s:4:"icon";s:10:"fa fa-cogs";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Appearance";s:5:"alias";s:6:"themes";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Firmware update";s:5:"alias";s:6:"common";s:4:"icon";s:0:"";}}}i:17;a:5:{s:4:"name";s:11:"Advertising";s:5:"alias";s:20:"external-advertising";s:4:"icon";s:12:"fa fa-dollar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:17:"List of campaigns";s:5:"alias";s:12:"company-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:9:"Source ID";s:5:"alias";s:8:"settings";s:4:"icon";s:0:"";}}}i:18;a:6:{s:4:"name";s:12:"License keys";s:3:"new";b:1;s:5:"alias";s:12:"license-keys";s:4:"icon";s:9:"fa fa-key";s:5:"icon2";s:0:"";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:18:"About License keys";s:5:"alias";s:18:"about-license-keys";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"License keys";s:5:"alias";s:17:"license-keys-list";s:4:"icon";s:0:"";}}}}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547084927_.side_bar b/admin/resources/cache/sidebar/1547084927_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547084927_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547084927_1.side_bar b/admin/resources/cache/sidebar/1547084927_1.side_bar
new file mode 100644
index 0000000..7c1895b
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547084927_1.side_bar
@@ -0,0 +1 @@
+a:18:{i:1;a:5:{s:4:"name";s:13:"IPTV channels";s:5:"alias";s:11:"tv-channels";s:4:"icon";s:13:"fa fa-desktop";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:8:"Channels";s:5:"alias";s:9:"iptv-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:17:"Organize channels";s:5:"alias";s:12:"move-channel";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:3:"EPG";s:5:"alias";s:3:"epg";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:9:"tv-genres";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:15:"Import from m3u";s:5:"alias";s:10:"m3u-import";s:4:"icon";s:0:"";}}}i:2;a:5:{s:4:"name";s:10:"Video club";s:5:"alias";s:14:"new-video-club";s:4:"icon";s:18:"fa fa-video-camera";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:10:"Movie list";s:5:"alias";s:10:"video-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:14:"video-schedule";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"Advertising";s:5:"alias";s:15:"video-advertise";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:10:"Moderators";s:5:"alias";s:26:"video-moderators-addresses";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:12:"Activity log";s:5:"alias";s:10:"video-logs";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:10:"Categories";s:5:"alias";s:16:"video-categories";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"video-genres";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:7:"Watched";s:5:"alias";s:16:"watched-settings";s:4:"icon";s:0:"";}}}i:3;a:5:{s:4:"name";s:10:"Audio club";s:5:"alias";s:10:"audio-club";s:4:"icon";s:11:"fa fa-music";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:6:"Albums";s:5:"alias";s:12:"audio-albums";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Artists";s:5:"alias";s:13:"audio-artists";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"audio-genres";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:9:"Languages";s:5:"alias";s:15:"audio-languages";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:5:"Years";s:5:"alias";s:11:"audio-years";s:4:"icon";s:0:"";}}}i:4;a:5:{s:4:"name";s:7:"Karaoke";s:5:"alias";s:7:"karaoke";s:4:"icon";s:16:"fa fa-microphone";s:5:"icon2";s:0:"";s:6:"action";a:0:{}}i:5;a:5:{s:4:"name";s:5:"Radio";s:5:"alias";s:5:"radio";s:4:"icon";s:14:"fa fa-bullhorn";s:5:"icon2";s:11:"pull-right ";s:6:"action";a:0:{}}i:6;a:5:{s:4:"name";s:7:"Tariffs";s:5:"alias";s:7:"tariffs";s:4:"icon";s:16:"fa fa-calculator";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:16:"Service packages";s:5:"alias";s:16:"service-packages";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Tariff plans";s:5:"alias";s:12:"tariff-plans";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:13:"Subscribe log";s:5:"alias";s:13:"subscribe-log";s:4:"icon";s:0:"";}}}i:7;a:5:{s:4:"name";s:5:"Users";s:5:"alias";s:5:"users";s:4:"icon";s:12:"fa  fa-users";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:6:{i:1;a:3:{s:4:"name";s:10:"Users list";s:5:"alias";s:10:"users-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Filters";s:5:"alias";s:17:"users-filter-list";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"User groups";s:5:"alias";s:21:"users-consoles-groups";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:19:"users-consoles-logs";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:21:"users-consoles-report";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:12:"Support info";s:5:"alias";s:12:"support-info";s:4:"icon";s:0:"";}}}i:8;a:5:{s:4:"name";s:12:"Applications";s:5:"alias";s:19:"application-catalog";s:4:"icon";s:12:"fa fa-rocket";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Classic apps";s:5:"alias";s:16:"application-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:19:"Smart Launcher apps";s:5:"alias";s:22:"smart-application-list";s:4:"icon";s:0:"";}}}i:9;a:5:{s:4:"name";s:6:"Events";s:5:"alias";s:6:"events";s:4:"icon";s:14:"fa fa-calendar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Users events";s:5:"alias";s:6:"events";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:15:"event-scheduler";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"Templates of messages";s:5:"alias";s:17:"message-templates";s:4:"icon";s:0:"";}}}i:10;a:5:{s:4:"name";s:14:"Administrators";s:5:"alias";s:6:"admins";s:4:"icon";s:17:"fa fa-user-secret";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:19:"Administrators list";s:5:"alias";s:11:"admins-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Groups";s:5:"alias";s:13:"admins-groups";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:9:"Resellers";s:5:"alias";s:14:"resellers-list";s:4:"icon";s:0:"";}}}i:11;a:5:{s:4:"name";s:5:"Tasks";s:5:"alias";s:5:"tasks";s:4:"icon";s:11:"fa fa-check";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Tasks list";s:5:"alias";s:10:"tasks-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:12:"tasks-report";s:4:"icon";s:0:"";}}}i:12;a:5:{s:4:"name";s:18:"Information portal";s:5:"alias";s:10:"infoportal";s:4:"icon";s:10:"fa fa-info";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Phone book";s:5:"alias";s:10:"phone-book";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:5:"Humor";s:5:"alias";s:5:"humor";s:4:"icon";s:0:"";}}}i:13;a:5:{s:4:"name";s:10:"Statistics";s:5:"alias";s:10:"statistics";s:4:"icon";s:15:"fa fa-pie-chart";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:16:"Movie statistics";s:5:"alias";s:10:"stat-video";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:13:"TV statistics";s:5:"alias";s:7:"stat-tv";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"TV archive statistics";s:5:"alias";s:15:"stat-tv-archive";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:20:"TimeShift statistics";s:5:"alias";s:14:"stat-timeshift";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:21:"Moderators statistics";s:5:"alias";s:15:"stat-moderators";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:21:"Subscribers statistic";s:5:"alias";s:13:"stat-abonents";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:20:"Inactive subscribers";s:5:"alias";s:22:"stat-abonents-unactive";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:21:"Complaints statistics";s:5:"alias";s:11:"stat-claims";s:4:"icon";s:0:"";}}}i:14;a:5:{s:4:"name";s:7:"Storage";s:5:"alias";s:8:"storages";s:4:"icon";s:13:"fa fa-archive";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Storage list";s:5:"alias";s:13:"storages-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Video search";s:5:"alias";s:21:"storages-video-search";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:13:"storages-logs";s:4:"icon";s:0:"";}}}i:15;a:5:{s:4:"name";s:17:"Streaming servers";s:5:"alias";s:17:"broadcast-servers";s:4:"icon";s:12:"fa fa-server";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Servers list";s:5:"alias";s:22:"broadcast-servers-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Streaming areas";s:5:"alias";s:19:"broadcast-zone-list";s:4:"icon";s:0:"";}}}i:16;a:5:{s:4:"name";s:8:"Settings";s:5:"alias";s:8:"settings";s:4:"icon";s:10:"fa fa-cogs";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Appearance";s:5:"alias";s:6:"themes";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Firmware update";s:5:"alias";s:6:"common";s:4:"icon";s:0:"";}}}i:17;a:5:{s:4:"name";s:11:"Advertising";s:5:"alias";s:20:"external-advertising";s:4:"icon";s:12:"fa fa-dollar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:17:"List of campaigns";s:5:"alias";s:12:"company-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:9:"Source ID";s:5:"alias";s:8:"settings";s:4:"icon";s:0:"";}}}i:18;a:6:{s:4:"name";s:12:"License keys";s:3:"new";b:1;s:5:"alias";s:12:"license-keys";s:4:"icon";s:9:"fa fa-key";s:5:"icon2";s:0:"";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:18:"About License keys";s:5:"alias";s:18:"about-license-keys";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"License keys";s:5:"alias";s:17:"license-keys-list";s:4:"icon";s:0:"";}}}}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547100562_.side_bar b/admin/resources/cache/sidebar/1547100562_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547100562_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547102995_.side_bar b/admin/resources/cache/sidebar/1547102995_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547102995_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547102995_1.side_bar b/admin/resources/cache/sidebar/1547102995_1.side_bar
new file mode 100644
index 0000000..7c1895b
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547102995_1.side_bar
@@ -0,0 +1 @@
+a:18:{i:1;a:5:{s:4:"name";s:13:"IPTV channels";s:5:"alias";s:11:"tv-channels";s:4:"icon";s:13:"fa fa-desktop";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:8:"Channels";s:5:"alias";s:9:"iptv-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:17:"Organize channels";s:5:"alias";s:12:"move-channel";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:3:"EPG";s:5:"alias";s:3:"epg";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:9:"tv-genres";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:15:"Import from m3u";s:5:"alias";s:10:"m3u-import";s:4:"icon";s:0:"";}}}i:2;a:5:{s:4:"name";s:10:"Video club";s:5:"alias";s:14:"new-video-club";s:4:"icon";s:18:"fa fa-video-camera";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:10:"Movie list";s:5:"alias";s:10:"video-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:14:"video-schedule";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"Advertising";s:5:"alias";s:15:"video-advertise";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:10:"Moderators";s:5:"alias";s:26:"video-moderators-addresses";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:12:"Activity log";s:5:"alias";s:10:"video-logs";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:10:"Categories";s:5:"alias";s:16:"video-categories";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"video-genres";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:7:"Watched";s:5:"alias";s:16:"watched-settings";s:4:"icon";s:0:"";}}}i:3;a:5:{s:4:"name";s:10:"Audio club";s:5:"alias";s:10:"audio-club";s:4:"icon";s:11:"fa fa-music";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:5:{i:1;a:3:{s:4:"name";s:6:"Albums";s:5:"alias";s:12:"audio-albums";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Artists";s:5:"alias";s:13:"audio-artists";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:6:"Genres";s:5:"alias";s:12:"audio-genres";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:9:"Languages";s:5:"alias";s:15:"audio-languages";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:5:"Years";s:5:"alias";s:11:"audio-years";s:4:"icon";s:0:"";}}}i:4;a:5:{s:4:"name";s:7:"Karaoke";s:5:"alias";s:7:"karaoke";s:4:"icon";s:16:"fa fa-microphone";s:5:"icon2";s:0:"";s:6:"action";a:0:{}}i:5;a:5:{s:4:"name";s:5:"Radio";s:5:"alias";s:5:"radio";s:4:"icon";s:14:"fa fa-bullhorn";s:5:"icon2";s:11:"pull-right ";s:6:"action";a:0:{}}i:6;a:5:{s:4:"name";s:7:"Tariffs";s:5:"alias";s:7:"tariffs";s:4:"icon";s:16:"fa fa-calculator";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:16:"Service packages";s:5:"alias";s:16:"service-packages";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Tariff plans";s:5:"alias";s:12:"tariff-plans";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:13:"Subscribe log";s:5:"alias";s:13:"subscribe-log";s:4:"icon";s:0:"";}}}i:7;a:5:{s:4:"name";s:5:"Users";s:5:"alias";s:5:"users";s:4:"icon";s:12:"fa  fa-users";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:6:{i:1;a:3:{s:4:"name";s:10:"Users list";s:5:"alias";s:10:"users-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:7:"Filters";s:5:"alias";s:17:"users-filter-list";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:11:"User groups";s:5:"alias";s:21:"users-consoles-groups";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:19:"users-consoles-logs";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:21:"users-consoles-report";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:12:"Support info";s:5:"alias";s:12:"support-info";s:4:"icon";s:0:"";}}}i:8;a:5:{s:4:"name";s:12:"Applications";s:5:"alias";s:19:"application-catalog";s:4:"icon";s:12:"fa fa-rocket";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Classic apps";s:5:"alias";s:16:"application-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:19:"Smart Launcher apps";s:5:"alias";s:22:"smart-application-list";s:4:"icon";s:0:"";}}}i:9;a:5:{s:4:"name";s:6:"Events";s:5:"alias";s:6:"events";s:4:"icon";s:14:"fa fa-calendar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Users events";s:5:"alias";s:6:"events";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:8:"Schedule";s:5:"alias";s:15:"event-scheduler";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"Templates of messages";s:5:"alias";s:17:"message-templates";s:4:"icon";s:0:"";}}}i:10;a:5:{s:4:"name";s:14:"Administrators";s:5:"alias";s:6:"admins";s:4:"icon";s:17:"fa fa-user-secret";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:19:"Administrators list";s:5:"alias";s:11:"admins-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Groups";s:5:"alias";s:13:"admins-groups";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:9:"Resellers";s:5:"alias";s:14:"resellers-list";s:4:"icon";s:0:"";}}}i:11;a:5:{s:4:"name";s:5:"Tasks";s:5:"alias";s:5:"tasks";s:4:"icon";s:11:"fa fa-check";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Tasks list";s:5:"alias";s:10:"tasks-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:6:"Report";s:5:"alias";s:12:"tasks-report";s:4:"icon";s:0:"";}}}i:12;a:5:{s:4:"name";s:18:"Information portal";s:5:"alias";s:10:"infoportal";s:4:"icon";s:10:"fa fa-info";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Phone book";s:5:"alias";s:10:"phone-book";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:5:"Humor";s:5:"alias";s:5:"humor";s:4:"icon";s:0:"";}}}i:13;a:5:{s:4:"name";s:10:"Statistics";s:5:"alias";s:10:"statistics";s:4:"icon";s:15:"fa fa-pie-chart";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:8:{i:1;a:3:{s:4:"name";s:16:"Movie statistics";s:5:"alias";s:10:"stat-video";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:13:"TV statistics";s:5:"alias";s:7:"stat-tv";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:21:"TV archive statistics";s:5:"alias";s:15:"stat-tv-archive";s:4:"icon";s:0:"";}i:4;a:3:{s:4:"name";s:20:"TimeShift statistics";s:5:"alias";s:14:"stat-timeshift";s:4:"icon";s:0:"";}i:5;a:3:{s:4:"name";s:21:"Moderators statistics";s:5:"alias";s:15:"stat-moderators";s:4:"icon";s:0:"";}i:6;a:3:{s:4:"name";s:21:"Subscribers statistic";s:5:"alias";s:13:"stat-abonents";s:4:"icon";s:0:"";}i:7;a:3:{s:4:"name";s:20:"Inactive subscribers";s:5:"alias";s:22:"stat-abonents-unactive";s:4:"icon";s:0:"";}i:8;a:3:{s:4:"name";s:21:"Complaints statistics";s:5:"alias";s:11:"stat-claims";s:4:"icon";s:0:"";}}}i:14;a:5:{s:4:"name";s:7:"Storage";s:5:"alias";s:8:"storages";s:4:"icon";s:13:"fa fa-archive";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:3:{i:1;a:3:{s:4:"name";s:12:"Storage list";s:5:"alias";s:13:"storages-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"Video search";s:5:"alias";s:21:"storages-video-search";s:4:"icon";s:0:"";}i:3;a:3:{s:4:"name";s:4:"Logs";s:5:"alias";s:13:"storages-logs";s:4:"icon";s:0:"";}}}i:15;a:5:{s:4:"name";s:17:"Streaming servers";s:5:"alias";s:17:"broadcast-servers";s:4:"icon";s:12:"fa fa-server";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:12:"Servers list";s:5:"alias";s:22:"broadcast-servers-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Streaming areas";s:5:"alias";s:19:"broadcast-zone-list";s:4:"icon";s:0:"";}}}i:16;a:5:{s:4:"name";s:8:"Settings";s:5:"alias";s:8:"settings";s:4:"icon";s:10:"fa fa-cogs";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:10:"Appearance";s:5:"alias";s:6:"themes";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:15:"Firmware update";s:5:"alias";s:6:"common";s:4:"icon";s:0:"";}}}i:17;a:5:{s:4:"name";s:11:"Advertising";s:5:"alias";s:20:"external-advertising";s:4:"icon";s:12:"fa fa-dollar";s:5:"icon2";s:29:"pull-right fa fa-chevron-left";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:17:"List of campaigns";s:5:"alias";s:12:"company-list";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:9:"Source ID";s:5:"alias";s:8:"settings";s:4:"icon";s:0:"";}}}i:18;a:6:{s:4:"name";s:12:"License keys";s:3:"new";b:1;s:5:"alias";s:12:"license-keys";s:4:"icon";s:9:"fa fa-key";s:5:"icon2";s:0:"";s:6:"action";a:2:{i:1;a:3:{s:4:"name";s:18:"About License keys";s:5:"alias";s:18:"about-license-keys";s:4:"icon";s:0:"";}i:2;a:3:{s:4:"name";s:12:"License keys";s:5:"alias";s:17:"license-keys-list";s:4:"icon";s:0:"";}}}}
\ No newline at end of file
diff --git a/admin/resources/cache/sidebar/1547187210_.side_bar b/admin/resources/cache/sidebar/1547187210_.side_bar
new file mode 100644
index 0000000..c856afc
--- /dev/null
+++ b/admin/resources/cache/sidebar/1547187210_.side_bar
@@ -0,0 +1 @@
+a:0:{}
\ No newline at end of file
diff --git a/admin/resources/cache/twig/00/006a08489f43b3eacc9160a4b7eeee07ba979814e8cc3472690df122bb9233f8.php b/admin/resources/cache/twig/00/006a08489f43b3eacc9160a4b7eeee07ba979814e8cc3472690df122bb9233f8.php
index 3352e0e..f3ed6fe 100644
--- a/admin/resources/cache/twig/00/006a08489f43b3eacc9160a4b7eeee07ba979814e8cc3472690df122bb9233f8.php
+++ b/admin/resources/cache/twig/00/006a08489f43b3eacc9160a4b7eeee07ba979814e8cc3472690df122bb9233f8.php
@@ -18,10 +18,14 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
         // line 1
         echo "
         var select2Opt = {minimumResultsForSearch: -1, dropdownAutoWidth: false, width: '100%'};
+        var allGenres = ";
+        // line 3
+        echo twig_jsonencode_filter($this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "allGenres", array()));
+        echo ";
         var sendedPic = [];
         var conf = {
             lang : '";
-        // line 5
+        // line 6
         echo twig_escape_filter($this->env, $this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "js_validator_language", array()), "html", null, true);
         echo "',
             showHelpOnFocus : true,
@@ -43,13 +47,13 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
                     if (sendedPic.indexOf(formId) != -1 || counter >= 10 || sendData['logo'].search(/^(http|https)?:\\/\\//ig) != -1) {
                         if (counter >= 10) {
                             JSErrorModalBox({msg: \"";
-        // line 24
+        // line 25
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Image was not uploaded"), "html", null, true);
         echo "\"});
                         }
                         clearInterval(timer);
                         ajaxPostSend(\"";
-        // line 27
+        // line 28
         echo twig_escape_filter($this->env, $this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "controller_alias", array()), "html", null, true);
         echo "/save-m3u-item\", sendData, false, false, true);
                     }
@@ -65,14 +69,14 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
         function initFileUploader(){
             \$('#fileupload').fileupload({
                 url: '";
-        // line 40
+        // line 41
         echo twig_escape_filter($this->env, $this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "controller_alias", array()), "html", null, true);
         echo "/get-m3u-data',
                 type: 'POST',
                 autoUpload: true,
                 multipart: true,
                 ";
-        // line 45
+        // line 46
         echo "                maxFileSize: 1000000,
                 maxNumberOfFiles: 1
             }).bind('fileuploaddone', function (e, data) {
@@ -102,7 +106,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
         function initIconUploader(iconContainer){
             \$(iconContainer).fileupload({
                 url: '";
-        // line 73
+        // line 74
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "request_context", array()), "baseUrl", array()), "html", null, true);
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "controller_alias", array()), "html", null, true);
@@ -172,7 +176,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
 
                 if (typeof (loadFileUploadScripts) != 'function' || !loadFileUploadScripts(initFileUploader)){
                     JSErrorModalBox({msg: \"";
-        // line 138
+        // line 139
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Cannot load File Upload plugin"), "html", null, true);
         echo "\"})
                 }
@@ -222,7 +226,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
                     sendData['logo_container_id'] = \$(this).closest('div.m3u_logo_container').children('.fileupload').attr('id');
                     if (sendData['logo_id']) {
                         ajaxPostSend('";
-        // line 185
+        // line 186
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "request_context", array()), "baseUrl", array()), "html", null, true);
         echo "/";
         echo twig_escape_filter($this->env, $this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "controller_alias", array()), "html", null, true);
@@ -241,7 +245,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
                 var auto_fill = obj.data.channels.length;
                 if ( (obj.data.last_channel_number + obj.data.channels.length) >= 99999 ){
                     var text_message = \"";
-        // line 199
+        // line 200
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("The maximum number of registered channel"), "html", null, true);
         echo " - \" + obj.data.last_channel_number + \". \";
                     if (obj.data.free_number_exists) {
@@ -253,24 +257,24 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
                         }
 
                         text_message += \"";
-        // line 208
+        // line 209
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("But in the channel list exist skipped numbers"), "html", null, true);
         echo ". \";
                         text_message += auto_fill + \" ";
-        // line 209
+        // line 210
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("channel numbers filled in automatically"), "html", null, true);
         echo ". \";
                         text_message += \"";
-        // line 210
+        // line 211
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Rest of numbers must be filled manually"), "html", null, true);
         echo ".\";
                     } else {
                         text_message += \"";
-        // line 212
+        // line 213
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("No available numbers of channels"), "html", null, true);
         echo ". \";
                         text_message += \"";
-        // line 213
+        // line 214
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("To add more channels, you can delete the unwanted channels in the channel list"), "html", null, true);
         echo ". \";
                     }
@@ -284,6 +288,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
                     var item = this;
                     item['item_number'] = i;
                     item['number'] = (free_number_exists && i < auto_fill) ? last_channel_number + i + 1: '';
+                    item['allGenres'] = allGenres;
                     item['logo_name'] = '';
                     if (item['logo'] != '') {
                         item['logo_name'] = item['logo'].split('/').pop();
@@ -377,7 +382,7 @@ class __TwigTemplate_286434817180651b86aaf6017fdfcbaf921e5f6639c7ad61f3bf22a32df
 
     public function getDebugInfo()
     {
-        return array (  274 => 213,  270 => 212,  265 => 210,  261 => 209,  257 => 208,  245 => 199,  226 => 185,  176 => 138,  106 => 73,  76 => 45,  69 => 40,  53 => 27,  47 => 24,  25 => 5,  19 => 1,);
+        return array (  278 => 214,  274 => 213,  269 => 211,  265 => 210,  261 => 209,  249 => 200,  230 => 186,  180 => 139,  110 => 74,  80 => 46,  73 => 41,  57 => 28,  51 => 25,  29 => 6,  23 => 3,  19 => 1,);
     }
 
     /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
diff --git a/admin/resources/cache/twig/b9/b937e727dbd8f23f2f1e34f18488de3808bd0ab6ce4c2406d912396979a3d43c.php b/admin/resources/cache/twig/b9/b937e727dbd8f23f2f1e34f18488de3808bd0ab6ce4c2406d912396979a3d43c.php
index 0186703..affa86e 100644
--- a/admin/resources/cache/twig/b9/b937e727dbd8f23f2f1e34f18488de3808bd0ab6ce4c2406d912396979a3d43c.php
+++ b/admin/resources/cache/twig/b9/b937e727dbd8f23f2f1e34f18488de3808bd0ab6ce4c2406d912396979a3d43c.php
@@ -207,51 +207,46 @@ class __TwigTemplate_5b6464b5ef45918c5a48a6daa137e676a9fdb3c55de4a76dff3efee34e3
         // line 134
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Genre"), "html", null, true);
         echo "</span>
+                                    </span>
+                                    <select class=\"populate placeholder own_field\" name=\"tv_genre_id\" data-validation=\"required\" id=\"channel_s2_\${item_number}\">
+                                        ";
+        // line 137
+        echo "{{each allGenres}}";
+        echo "
+                                            <option value=\"";
+        // line 138
+        echo "\${id}";
+        echo "\" ";
+        echo "{{if title.toUpperCase()==genre.toUpperCase()}}";
+        echo "selected";
+        echo "{{/if}}";
+        echo ">";
+        echo "\${title}";
+        echo "</option>
                                         ";
-        // line 135
+        // line 139
+        echo "{{/each}}";
+        echo "
+                                    </select>
+                                    ";
+        // line 141
         echo "{{if genre}}";
         echo "
                                         <span class=\" txt-default\">(";
-        // line 136
+        // line 142
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("from file"), "html", null, true);
         echo ": \"\${genre}\")</span>
-                                        ";
-        // line 137
+                                    ";
+        // line 143
         echo "{{/if}}";
         echo "
-                                    </span>
-                                    <select class=\"populate placeholder own_field\" name=\"tv_genre_id\" data-validation=\"required\" id=\"channel_s2_\${item_number}\">
-                                        ";
-        // line 140
-        if ($this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "allGenres", array(), "array")) {
-            // line 141
-            echo "                                            ";
-            $context['_parent'] = $context;
-            $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["app"] ?? $this->getContext($context, "app")), "allGenres", array()));
-            foreach ($context['_seq'] as $context["_key"] => $context["s_item"]) {
-                // line 142
-                echo "                                                <option value=\"";
-                echo twig_escape_filter($this->env, $this->getAttribute($context["s_item"], "id", array()), "html", null, true);
-                echo "\">";
-                echo twig_escape_filter($this->env, $this->getAttribute($context["s_item"], "title", array()), "html", null, true);
-                echo "</option>
-                                            ";
-            }
-            $_parent = $context['_parent'];
-            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s_item'], $context['_parent'], $context['loop']);
-            $context = array_intersect_key($context, $_parent) + $_parent;
-            // line 144
-            echo "                                        ";
-        }
-        // line 145
-        echo "                                    </select>
                                 </div>
                             </div>
                             <div class=\"col-xs-5 no-padding-right\">
                                 <div class=\"form-group\">
                                     <span class=\"help-inline\">
                                         <span class=\" txt-default\">";
-        // line 151
+        // line 149
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("XMLTV ID"), "html", null, true);
         echo "</span>
                                     </span>
@@ -266,7 +261,7 @@ class __TwigTemplate_5b6464b5ef45918c5a48a6daa137e676a9fdb3c55de4a76dff3efee34e3
                                 <div class=\"form-group\">
                                     <span class=\"help-inline\">
                                         <span class=\" txt-default\">";
-        // line 163
+        // line 161
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Basic channel"), "html", null, true);
         echo "</span>
                                     </span>
@@ -282,7 +277,7 @@ class __TwigTemplate_5b6464b5ef45918c5a48a6daa137e676a9fdb3c55de4a76dff3efee34e3
                                 <div class=\"form-group\">
                                     <span class=\"help-inline\">
                                         <span class=\" txt-default\">";
-        // line 176
+        // line 174
         echo twig_escape_filter($this->env, $this->env->getExtension('Lib\EmptyTranslationExtension')->trans("Age restriction"), "html", null, true);
         echo "</span>
                                     </span>
@@ -299,7 +294,7 @@ class __TwigTemplate_5b6464b5ef45918c5a48a6daa137e676a9fdb3c55de4a76dff3efee34e3
                         </div>
                         
                             ";
-        // line 191
+        // line 189
         echo "                            <div class=\"m3u_item_buttons\">
                                 <div class=\"form-group col-xs-6 no-padding-right no-padding-left\">
                                     <button class=\"btn btn-default\" type=\"button\" data-action=\"delete\"><i class=\"fa fa-times\"></i></button>
@@ -329,7 +324,7 @@ class __TwigTemplate_5b6464b5ef45918c5a48a6daa137e676a9fdb3c55de4a76dff3efee34e3
 
     public function getDebugInfo()
     {
-        return array (  303 => 191,  286 => 176,  270 => 163,  255 => 151,  247 => 145,  244 => 144,  233 => 142,  228 => 141,  226 => 140,  220 => 137,  216 => 136,  212 => 135,  208 => 134,  193 => 122,  180 => 112,  166 => 101,  147 => 85,  110 => 51,  106 => 50,  93 => 40,  78 => 27,  75 => 26,  69 => 21,  67 => 20,  60 => 16,  57 => 15,  54 => 14,  49 => 12,  46 => 11,  44 => 10,  40 => 9,  37 => 8,  34 => 7,  30 => 1,  28 => 4,  26 => 2,  20 => 1,);
+        return array (  298 => 189,  281 => 174,  265 => 161,  250 => 149,  241 => 143,  237 => 142,  233 => 141,  228 => 139,  218 => 138,  214 => 137,  208 => 134,  193 => 122,  180 => 112,  166 => 101,  147 => 85,  110 => 51,  106 => 50,  93 => 40,  78 => 27,  75 => 26,  69 => 21,  67 => 20,  60 => 16,  57 => 15,  54 => 14,  49 => 12,  46 => 11,  44 => 10,  40 => 9,  37 => 8,  34 => 7,  30 => 1,  28 => 4,  26 => 2,  20 => 1,);
     }
 
     /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
diff --git a/c/account_menu.js b/c/account_menu.js
old mode 100644
new mode 100755
index e349294..00b27f5
--- a/c/account_menu.js
+++ b/c/account_menu.js
@@ -3,7 +3,9 @@
     var submenu = module.account_menu || [];
 
     main_menu.add(word['account_info_title'], submenu, 'mm_ico_account.png', '', {"layer_name" : "account_menu"});
-
+    var timestamp = Date.parse(new Date());
+    console.log("account menu finished Enter");
+    console.log(timestamp);
 })();
 
 loader.next();
\ No newline at end of file
diff --git a/c/demo.js b/c/demo.js
old mode 100644
new mode 100755
diff --git a/c/index.html b/c/index.html
old mode 100644
new mode 100755
index 5ff298c..ee404e1
--- a/c/index.html
+++ b/c/index.html
@@ -10,6 +10,289 @@
 
 <script type="text/javascript" defer="defer">
 
+// var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase     */
+// var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance  */
+// var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode    */
+// /*
+//  * These are the functions you'll usually want to call
+//  * They take string arguments and return either hex or base-64 encoded strings
+//  */
+// function hex_sha1(s) {
+//     return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
+// }
+// function b64_sha1(s) {
+//     return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
+// }
+// function str_sha1(s) {
+//     return binb2str(core_sha1(str2binb(s), s.length * chrsz));
+// }
+// function hex_hmac_sha1(key, data) {
+//     return binb2hex(core_hmac_sha1(key, data));
+// }
+// function b64_hmac_sha1(key, data) {
+//     return binb2b64(core_hmac_sha1(key, data));
+// }
+// function str_hmac_sha1(key, data) {
+//     return binb2str(core_hmac_sha1(key, data));
+// }
+// /*
+//  * Perform a simple self-test to see if the VM is working
+//  */
+// function sha1_vm_test() {
+//     return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
+// }
+// /*
+//  * Calculate the SHA-1 of an array of big-endian words, and a bit length
+//  */
+// function core_sha1(x, len) {
+//     /* append padding */
+//     x[len >> 5] |= 0x80 << (24 - len % 32);
+//     x[((len + 64 >> 9) << 4) + 15] = len;
+//     var w = Array(80);
+//     var a = 1732584193;
+//     var b = -271733879;
+//     var c = -1732584194;
+//     var d = 271733878;
+//     var e = -1009589776;
+//     for (var i = 0; i < x.length; i += 16) {
+//         var olda = a;
+//         var oldb = b;
+//         var oldc = c;
+//         var oldd = d;
+//         var olde = e;
+//         for (var j = 0; j < 80; j++) {
+//             if (j < 16) w[j] = x[i + j];
+//             else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
+//             var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
+//             e = d;
+//             d = c;
+//             c = rol(b, 30);
+//             b = a;
+//             a = t;
+//         }
+//         a = safe_add(a, olda);
+//         b = safe_add(b, oldb);
+//         c = safe_add(c, oldc);
+//         d = safe_add(d, oldd);
+//         e = safe_add(e, olde);
+//     }
+//     return Array(a, b, c, d, e);
+// }
+// /*
+//  * Perform the appropriate triplet combination function for the current
+//  * iteration
+//  */
+// function sha1_ft(t, b, c, d) {
+//     if (t < 20) return (b & c) | ((~b) & d);
+//     if (t < 40) return b ^ c ^ d;
+//     if (t < 60) return (b & c) | (b & d) | (c & d);
+//     return b ^ c ^ d;
+// }
+// /*
+//  * Determine the appropriate additive constant for the current iteration
+//  */
+// function sha1_kt(t) {
+//     return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514;
+// }
+// /*
+//  * Calculate the HMAC-SHA1 of a key and some data
+//  */
+// function core_hmac_sha1(key, data) {
+//     var bkey = str2binb(key);
+//     if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
+//     var ipad = Array(16),
+//         opad = Array(16);
+//     for (var i = 0; i < 16; i++) {
+//         ipad[i] = bkey[i] ^ 0x36363636;
+//         opad[i] = bkey[i] ^ 0x5C5C5C5C;
+//     }
+//     var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
+//     return core_sha1(opad.concat(hash), 512 + 160);
+// }
+// /*
+//  * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+//  * to work around bugs in some JS interpreters.
+//  */
+// function safe_add(x, y) {
+//     var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+//     var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+//     return (msw << 16) | (lsw & 0xFFFF);
+// }
+// /*
+//  * Bitwise rotate a 32-bit number to the left.
+//  */
+// function rol(num, cnt) {
+//     return (num << cnt) | (num >>> (32 - cnt));
+// }
+// /*
+//  * Convert an 8-bit or 16-bit string to an array of big-endian words
+//  * In 8-bit function, characters >255 have their hi-byte silently ignored.
+//  */
+// function str2binb(str) {
+//     var bin = Array();
+//     var mask = (1 << chrsz) - 1;
+//     for (var i = 0; i < str.length * chrsz; i += chrsz)
+//         bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32);
+//     return bin;
+// }
+// /*
+//  * Convert an array of big-endian words to a string
+//  */
+// function binb2str(bin) {
+//     var str = "";
+//     var mask = (1 << chrsz) - 1;
+//     for (var i = 0; i < bin.length * 32; i += chrsz)
+//         str += String.fromCharCode((bin[i >> 5] >>> (24 - i % 32)) & mask);
+//     return str;
+// }
+// /*
+//  * Convert an array of big-endian words to a hex string.
+//  */
+// function binb2hex(binarray) {
+//     var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+//     var str = "";
+//     for (var i = 0; i < binarray.length * 4; i++) {
+//         str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF);
+//     }
+//     return str;
+// }
+// /*
+//  * Convert an array of big-endian words to a base-64 string
+//  */
+// function binb2b64(binarray) {
+//     var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+//     var str = "";
+//     for (var i = 0; i < binarray.length * 4; i += 3) {
+//         var triplet = (((binarray[i >> 2] >> 8 * (3 - i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4)) & 0xFF) << 8) | ((binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4)) & 0xFF);
+//         for (var j = 0; j < 4; j++) {
+//             if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+//             else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
+//         }
+//     }
+//     return str;
+// }
+//
+//
+// gSTB = {
+//     LoadUserData:function(file){return ""}  ,
+//     SaveUserData:function(file, data){},
+//     Debug:function(txt){console.info(txt)},
+//     GetDeviceSerialNumber:function(){return "012012N01212"},
+//     GetDeviceMacAddress:function(){return "00:1A:79:FF:FF:CD"},
+//     GetDeviceModelExt:function(){return "MAG250"},
+//     GetDeviceVersionHardware:function(){return ""},
+//     SetObjectCacheCapacities:function(a,b,c){return ""},
+//     GetWifiLinkStatus:function(){return 1},
+//     GetLanLinkStatus:function(){return 1},
+//     ConfigNetRc:function(){},
+//     SetNetRcStatus:function(){},
+//     GetHDMIConnectionState:function(){return 1},
+//     Version:function(){return "JS API version: 328; STB API version: 134; Player Engine version: 0x566"},
+//     GetHashVersion1:function(data, key)
+//     {
+//         var salt = "dA0j6HpVFcMgNjUBDr0QhwTBIzLHDIrynuQy4XNJ";
+//         var data_xor = hex_sha1(data);
+//         var prep = hex_sha1(data_xor+salt);
+//         var result = hex_sha1(prep+key);
+//         console.info("hashversion: " + result);
+//         return result;
+//     },
+//     RDir:function(key)
+//     {
+//         var result = "";
+//         switch(key)
+//         {
+//             case "vmode": result = "720"; break;
+//             case "IPAddress": result = "192.168.1.10"; break;
+//             case "SerialNumber": result = "012012N01212"; break;
+//             case "Model": result = "MAG250"; break;
+//             case "ImageDescription": result = "0.2.16-r2"; break;
+//             case "ImageVersion": result = "216"; break;
+//             case "ImageDate": result = "Fri Oct 25 17:28:41 EEST 2013"; break;
+//             case "HardwareVersion": result = "1.17-BD-00"; break;
+//             case "getenv language": result = "en"; break;
+//             case "getenv timezone_conf": result = "Europe/Kiev"; break;
+//             case "getenv ntpurl": result = "pool.ntp.org"; break;
+//             default: result = "";
+//                 break;
+//         }
+//         return result;
+//     },
+//     GetUID:function(mac, token)
+//     {
+//         var code = "";
+//         switch(arguments.length) {
+//             case 0:
+//                 code = "0D1A4F8F7195C4853DDB520CAB6CBC4EB72583E90A558ED349E8935A4FB316EA";
+//                 break;
+//         }
+//         return code;
+//     },
+//     InitPlayer:function(){},
+//     Play:function(uri, proxy_addr){console.info(uri);console.info(proxy_addr);},
+//     SetTopWin:function(itop){console.info("SetTopWin"+itop);},
+//     SetAspect:function(ihex){},
+//     SetPIG:function(a,b,c){},
+//     SetUserFlickerControl:function(ibool){},
+//     SetDefaultFlicker:function(ibool){},
+//     SetMicVolume:function(vol){},
+//     SetLoop:function(ibool){},
+//     IsFileExist:function(ibool){return 1},
+//     SetSubtitlesFont:function(file){},
+//     ExecAction:function(arg){},
+//     GetMediaLen:function(){return 60*120;},
+//     GetMediaLenEx:function(){return 60*120*1000;},
+//     GetPosTime:function(){return 20*120;},
+//     GetPosTimeEx:function(){return 20*120*1000;},
+//     GetPosPercent:function(){return 50;},
+//     GetPosPercentEx:function(){return 50;},
+//     EnableVKButton:function(){},
+//     GetEnv:function(){return '{"result":{}}' ;},
+//     SetEnv:function(){return true ;},
+//     GetDeviceImageVersionCurrent:function(){return ''},
+//     GetDeviceVendor:function(){return ''},
+//     GetDeviceActiveBank:function(){return ''},
+//     GetDeviceImageDesc:function(){return ''},
+//     GetDeviceImageVersion:function(){return ''},
+//     Stop:function(){},
+//     SetVolume:function(vol){},
+//     SetupRTSP:function(rtsp_type, rtsp_flags){},
+//     SetCASDescrambling:function(profile){},
+//     SetAudioLangs:function(lang1, lang2){},
+//     SetSubtitles:function(open){},
+//     GetBrightness:function(){return 0},
+//     GetContrast:function(){return 0},
+//     GetSaturation:function(){return 0},
+//     SetBufferSize:function(x, y){},
+//     SetListFilesExt:function(){},
+//     SetupSPdif:function(){},
+//     SetSubtitlesSize:function(){},
+//     SetSubtitlesColor:function(){},
+//     EnableServiceButton:function(){},
+//     EnableAppButton:function(){},
+//     SetScreenSaverTime:function(){},
+//     SetScreenSaverInitAttr:function(){},
+//     SetAutoPowerDownTime:function(){},
+//     SetAutoPowerDownInitAttr:function(){},
+//     SetSubtitlesColor:function(){},
+//     GetNetworkGateways:function(){ return "192.168.1.1";},
+//     GetNetworkNameServers:function(){ return "8.8.8.8";},
+//
+//     SetMute:function(){},
+//
+//     GetVolume:function(){return 0;},
+//     SetNativeStringMode:function(){},
+// };
+//
+// timeShift = {SetSlidingMode:function(){},SetMaxDuration:function(){},SetTimeShiftFolder:function(){},};
+//
+// stbWindowMgr = {GetFocusedInputInfo:function(){ return '{"result":{"x": 1, "y":1, "w":1, "h":1, "positionHint": "none" }}';}};
+// stbWebWindow = {SetGeometry:function(x,y,w,h){},SendVirtualKeypress:function(text, id){},windowId:function(){return 1;}};
+
+
+
+
+
 var debug = 0;
 var stb;
 var _GET = {};
@@ -59,6 +342,8 @@ var loader = {
     step : 0,
     template : 'default',
     paused : false,
+    loaderCount:-1,
+    finishCount:0,
 
     set_template : function(template){
         _debug('loader.set_template', template);
@@ -82,14 +367,41 @@ var loader = {
 
         this.step = Math.ceil(this.max_load_percent/this.chain.length);
 
-        this.next();
+        this.next1();
     },
 
+    next1 : function(){
+        _debug('loader.next');
+
+        _debug('loader.paused', this.paused);
+
+        if (this.paused){
+            return;
+        }
+
+        if (this.cur_idx < this.chain.length-1){
+            this.cur_idx++;
+            this.append(this.chain[this.cur_idx]);
+        }
+
+        if (this.cur_idx < this.chain.length -1) {
+            this.next1();
+            return;
+        }
+        if (this.cur_idx == this.chain.length -1){
+            console.log("loader bar finish ok");
+            var timestamp = Date.parse(new Date());
+            console.log(timestamp);
+        }
+
+
+    },
     next : function(){
         _debug('loader.next');
 
         _debug('loader.paused', this.paused);
 
+        /*
         if (this.paused){
             return;
         }
@@ -98,13 +410,29 @@ var loader = {
             this.cur_idx++;
             this.append(this.chain[this.cur_idx]);
         }
+        if (this.cur_idx == this.chain.length -1){
+            console.log("loader bar finish ok");
+            var timestamp = Date.parse(new Date());
+            console.log(timestamp);
+        }
+        */
+        // var timestamp = Date.parse(new Date());
+        // if(this.finishCount == 0) {
+        //     console.log("loader bar start:" + timestamp.toString());
+        // }
+        // this.finishCount = this.finishCount + 1;
+        //
+        // if(this.finishCount >= this.chain.length) {
+        //     console.log("loader bar end:" + timestamp.toString());
+        // }
+        stb.loader.add_pos(this.step, 'aaa');
     },
 
     append : function(module){
         _debug('loader.append');
 
-        stb.loader.add_pos(this.step, 'append '+module);
-
+        //stb.loader.add_pos(this.step, 'append '+module);
+        this.loaderCount = this.loaderCount + 1;
         this.append_style(module);
 
         this.append_javascript(module);
@@ -154,9 +482,27 @@ var loader = {
             }
         }
 
+        _script.onload = _script.onreadystatechange = function () {
+                if ( ! this.readyState || this.readyState === "loaded" || this.readyState === "complete"){
+                    loader.finishCount = loader.finishCount + 1;
+                    if(loader.finishCount == loader.loaderCount && (loader.chain.length> 0 &&loader.finishCount >= loader.chain.length)){
+                        console.log(this.src);
+                        console.log(loader.finishCount);
+                        stb.loader.hide_direct();
+                    }
+                }
+
+            };
+
         _script.onerror = function() {
             _debug('Error loading script', _script.src);
             loader.next();
+            loader.finishCount = loader.finishCount + 1;
+            if(loader.finishCount >= loader.loaderCount && loader.finishCount >= loader.chain.length){
+                console.log(loader.src);
+                console.log(loader.finishCount);
+                stb.loader.hide_direct();
+            }
         };
 
         this.head.appendChild(_script);
@@ -240,6 +586,7 @@ function init(){
     );
     
     stb.init();
+    console.log('stb.init finished !');
     
     (function(){
         
@@ -324,7 +671,8 @@ function init(){
 
 </head>
 <body>
-<!--<img src="i/loading_bg.gif" width="0" height="0"/>
-<img src="i/loading.png" width="0" height="0"/>-->
+<img src="template/default/i_720/bg2.png" width="0" height="0"/>
+<img src="template/default/i_720/loading_bg.gif" width="0" height="0"/>
+<img src="template/default/i_720/loading.png" width="0" height="0"/>
 </body>
 </html>
\ No newline at end of file
diff --git a/c/infoportal.js b/c/infoportal.js
old mode 100644
new mode 100755
diff --git a/c/internet.js b/c/internet.js
old mode 100644
new mode 100755
diff --git a/c/keydown.keycodes.js b/c/keydown.keycodes.js
index f039016..a1e6936 100755
--- a/c/keydown.keycodes.js
+++ b/c/keydown.keycodes.js
@@ -32,10 +32,10 @@ var key = {
     PREV  : 33, // Page Up
     VOL_UP    : 107, // NUMPAD +
     VOL_DOWN  : 109, // NUMPAD -
-    RED    : 112, // F1
-    GREEN  : 113, // F2
-    YELLOW : 114, // F3
-    BLUE   : 115, // F4
+    RED    : 2049,//112, // F1
+    GREEN  : 2050,//113, // F2
+    YELLOW : 2051,//114, // F3
+    BLUE   : 2052,//115, // F4
     SERVICES  : 120, // F9
     TV    : 121,  // F10
     PHONE : 119, // F8
diff --git a/c/load_bar.js b/c/load_bar.js
old mode 100644
new mode 100755
index f39841a..39f0930
--- a/c/load_bar.js
+++ b/c/load_bar.js
@@ -13,7 +13,7 @@ function load_bar(){
     this.callback = function(){};
     
     this.cur_pos = 0;
-    
+    this.count = 0;
     this.px_in_percent = 248/100;
     
     this.init();
@@ -62,6 +62,32 @@ load_bar.prototype.t_hide = function(){
     );
 };
 
+load_bar.prototype.hide_direct = function(){
+    _debug('load_bar.t_hide');
+
+    var self = this;
+
+    window.clearTimeout(this.hide_timer);
+    // main_menu.build();
+    // this.hide();
+
+    this.hide_timer = window.setTimeout(
+
+        function(){
+            stb.loader.count ++;
+            if((!stb.player.channels || !module.tv)&& (stb.loader.count<100) ){
+                stb.loader.hide_direct();
+            }
+            else {
+                main_menu.build();
+                self.hide();
+            }
+        },
+
+        200
+    );
+}
+
 load_bar.prototype.hide = function(){
     _debug('load_bar.hide');
     
@@ -72,6 +98,7 @@ load_bar.prototype.hide = function(){
     this.callback = null;
 };
 
+
 load_bar.prototype.stop = function(){
     _debug('load_bar.stop');
     
@@ -125,10 +152,11 @@ load_bar.prototype.set_pos = function(percent, txt){
     }
     
     this.bar_dom_obj.style.width = width + 'px';
-    
+    /*
     if (percent >= 100){
         this.t_hide();
     }
+    */
 };
 
 load_bar.prototype.add_pos = function(percent, txt){
diff --git a/c/logout.js b/c/logout.js
old mode 100644
new mode 100755
diff --git a/c/main_menu.js b/c/main_menu.js
old mode 100644
new mode 100755
index 042a5da..ae97f4a
--- a/c/main_menu.js
+++ b/c/main_menu.js
@@ -221,7 +221,9 @@ var main_menu = {
     
     build : function(){
         _debug('main_menu.build');
-        
+        var timestamp = Date.parse(new Date());
+        console.log("build Enter");
+        console.log(timestamp);
         this.clear_menu();
         
         var sub_menu_item;
@@ -297,6 +299,9 @@ var main_menu = {
         }
         
         _debug('this.active_sub', this.active_sub);
+        var timestamp2 = Date.parse(new Date());
+        console.log("build Exit");
+        console.log(timestamp2);
     },
     
     render : function(){
diff --git a/c/player.js b/c/player.js
old mode 100644
new mode 100755
index 976993e..92d3142
--- a/c/player.js
+++ b/c/player.js
@@ -22,7 +22,8 @@ function player(){
     this.channels;
     this.fav_channels;
     this.fav_channels_ids;
-    
+    this.genre_list;
+
     this.start_time;
     this.cur_media_item = {};
     this.cur_tv_item;
@@ -115,13 +116,136 @@ function player(){
     this.play_continuously = false;
 
     this.pos_by_numbers_input = '';
-    
+
+    this.genresIdx = [];
+    this.pageList = null;
+    this.maxPageNumber = 100;
+
     /*this.con_menu = new context_menu();
     this.con_menu.bind();
     this.con_menu.set_x_offset(100);
     this.con_menu.set_y_offset(100);*/
 }
 
+//manage genresIdx
+player.prototype.genresIdxGetIdxByGenreId = function(genreId,channelNum){
+    for( var i=0;i<this.genresIdx.length;i++){
+        if(genreId == this.genresIdx[i].id)
+            return i;
+    }
+    var genreIdx = {};
+    genreIdx['id'] = genreId;
+    genreIdx['pos'] = [];
+    for (var i=0;i<channelNum;i++){
+        genreIdx['pos'].push("-1");
+    }
+    this.genresIdx.push(genreIdx);
+    return this.genresIdx.length-1;
+};
+
+player.prototype.genresIdxAddPos = function(genreId,number,offset,pos){
+    var idx = this.genresIdxGetByGenreId(genreId,number);
+    this.genresIdx[idx]['pos'][offset] = pos;
+};
+
+player.prototype.genresIdxUpdatePos = function(genreId,result){
+    genreId = result['genreId'];
+    number = result['total_items'];
+    cur_page = result['cur_page'];
+    max_page_items = result['max_page_items'];
+    offset = cur_page * max_page_items;
+    data = result['data'];
+    for(var i=0;i<data['channel'].length;i++){
+        var pos = stb.player.channels_db_insert(data['channel'][i]);
+        this.genresIdxAddPos(genreId,number,i+offset,pos);
+    }
+};
+
+player.prototype.pageListInit = function(number,total){
+    number = number || this.maxPageNumber;
+    var pageNumber = Math.ceil(total/number);
+    this.pageList = [];
+    for(var i=0;i<pageNumber;i++){
+        this.pageList.push(0);
+    }
+};
+
+player.prototype.pageListGetPageStatus = function(page){
+    if(!this.pageList) {
+        return -1;
+    }
+    return this.pageList[page];
+};
+
+player.prototype.pageListSetPageStatus = function(page,status){
+    if(!this.pageList) {
+            return -1;
+    }
+    this.pageList[page] = status;
+    return this.pageList[page];
+};
+
+player.prototype.pageListGetNextLoadPage = function(page){
+    if(!this.pageList)
+        return 0;
+    var length = Math.ceil(this.pageList.length/2);
+    var page_up = -1, page_up_offset = 0;
+    var page_down = -1,page_down_offset = 0;
+
+    for(var i=0; i< length; i++){
+        var pagePos = page + i;
+        pagePos = pagePos >= this.pageList.length ? pagePos - this.pageList.length : pagePos
+        var status = this.pageList[pagePos];
+
+        if (status == 0){
+            page_down = pagePos;
+            break;
+        }
+        else{
+            page_down_offset += 1;
+        }
+    }
+
+    for(var i=0; i< length; i++){
+        var pagePos = page -i ;
+        if (pagePos < 0){
+            pagePos = this.pageList.length + pagePos;
+        }
+        var status = this.pageList[pagePos];
+
+        if (status == 0){
+            page_up = pagePos;
+            break;
+        }
+        else{
+            page_up_offset += 1;
+        }
+    }
+
+
+    if( page_up_offset < page_down_offset)
+        return page_up;
+    else
+        return page_down;
+};
+
+player.prototype.getCurrentPage = function() {
+    var ch_idx = this.channels.getIdxById(stb.user.last_itv_id);
+    ch_idx = ch_idx ? ch_idx : 0;
+    _debug('ch_idx', ch_idx);
+    var page = 0;
+    if (ch_idx) {
+        page = Math.floor(ch_idx / this.maxPageNumber);
+    }
+    return page;
+};
+
+player.prototype.getNextPage = function() {
+    var page = this.getCurrentPage();
+    page = this.pageListGetNextLoadPage(page);
+    return page;
+};
+
 player.prototype.init = function(){
     _debug('player.init');
     try{
@@ -3138,7 +3262,7 @@ player.prototype.init_show_info = function(){
 
 player.prototype.show_info = function(item, direct_call){
     _debug('show_info');
-    
+
     item = item || this.cur_media_item;
     direct_call = direct_call || false;
 
@@ -3332,6 +3456,54 @@ player.prototype.show_info = function(item, direct_call){
     }
 };
 
+player.prototype.show_info_simple = function(item){
+    _debug('show_info');
+
+    item = item || this.cur_media_item;
+
+    if(this.info.on){
+        window.clearTimeout(this.info.hide_timeout);
+        var show_epg_desc = true;
+    }else{
+        this.info.dom_obj.show();
+        this.info.on = true;
+        show_epg_desc = false;
+    }
+
+    _debug('item', item);
+
+    var title = '';
+
+    if (item.hasOwnProperty('number') && item.number){
+        title = item.number + '. ';
+    }
+
+    var title_idx = item.name.indexOf('?title=');
+
+    var part = '';
+
+    if (title_idx != -1){
+
+        part = item.name.substr(title_idx+7);
+
+        item.name = item.name.substr(0, title_idx);
+    }
+
+    title += item.name;
+
+
+    this.info.title.innerHTML = title;
+
+    _debug('this.is_tv', this.is_tv);
+
+    this.info.clock.style.visibility = 'visible';
+    this.info.epg.hide();
+    this.info.video_container.hide();
+    this.info.logo.innerHTML = '';
+    this.info.pos_series.innerHTML = '';
+    this.pos_time_bar.removeClass('padding_pos_bar');
+};
+
 player.prototype.hide_info = function(){
     _debug('player.hide_info');
 
@@ -3426,6 +3598,37 @@ player.prototype._find_nearest_ch_idx = function(direction, condition, invert_co
     return null;
 };
 
+player.prototype.channels_page_preload = function(){
+    var currentPage = this.getCurrentPage();
+    if(this.pageList){
+        var nextPage = currentPage+1;
+        var beforePage = currentPage -1;
+        if (nextPage >= this.pageList.length)
+            nextPage = 0;
+
+        if(beforePage < 0)
+            beforePage = this.pageList.length -1;
+
+        var pagelist = [];
+
+        if(this.pageListGetPageStatus(nextPage) != 1){
+            this.pageListSetPageStatus(nextPage,0);
+            pagelist.push(nextPage);
+        }
+
+        if (nextPage != beforePage) {
+            if (this.pageListGetPageStatus(beforePage) != 1) {
+                this.pageListSetPageStatus(beforePage, 0);
+                pagelist.push(beforePage);
+            }
+        }
+
+        if (pagelist.length)
+            stb.load_chs_page_start(pagelist);
+    }
+
+}
+
 player.prototype.switch_channel = function(dir, show_info, do_not_invert){
     
     _debug('switch_channel', dir);
@@ -3530,7 +3733,6 @@ player.prototype.switch_channel = function(dir, show_info, do_not_invert){
 
             if (module.tv.genre && module.tv.genre.id != '*'){
                 this.ch_idx = this._find_nearest_ch_idx(dir, {"tv_genre_id" : module.tv.genre.id});
-
                 _debug('nearest this.ch_idx', this.ch_idx);
             }else{
 
@@ -3551,11 +3753,22 @@ player.prototype.switch_channel = function(dir, show_info, do_not_invert){
         }
     }
 
+
     if (!item){
         _debug('no channel');
         return;
     }
 
+    if (!item.hasOwnProperty('cmd'))
+    {
+        this.show_info_simple(item);
+        stb.user.last_itv_id = item.id;
+        stb.load_chanels_page();
+        return;
+    }
+
+    this.channels_page_preload();
+
     if (parseInt(item.use_http_tmp_link) == 1 || parseInt(item.use_load_balancing) == 1 || stb.user['force_ch_link_check']){
         this.on_create_link = function(result){
             _debug('player.tv.on_create_link', result);
@@ -5142,7 +5355,17 @@ player.prototype.quick_go_to_ch = function(){
         
         _debug('item', item);
     }
-    
+
+    if (!item.hasOwnProperty('cmd'))
+    {
+        this.show_info_simple(item);
+        stb.user.last_itv_id = item.id;
+        stb.load_chanels_page();
+        return;
+    }
+
+
+    this.channels_page_preload();
     if (!empty(item)){
         stb.player.need_show_info = 1;
         stb.player.play(item);
diff --git a/c/service_management.js b/c/service_management.js
old mode 100644
new mode 100755
diff --git a/c/stb.js b/c/stb.js
new file mode 100755
index 0000000..386bfd6
--- /dev/null
+++ b/c/stb.js
@@ -0,0 +1,278 @@
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase     */
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance  */
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode    */
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_sha1(s) {
+ return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
+}
+function b64_sha1(s) {
+ return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
+}
+function str_sha1(s) {
+ return binb2str(core_sha1(str2binb(s), s.length * chrsz));
+}
+function hex_hmac_sha1(key, data) {
+ return binb2hex(core_hmac_sha1(key, data));
+}
+function b64_hmac_sha1(key, data) {
+ return binb2b64(core_hmac_sha1(key, data));
+}
+function str_hmac_sha1(key, data) {
+ return binb2str(core_hmac_sha1(key, data));
+}
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function sha1_vm_test() {
+ return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
+}
+/*
+ * Calculate the SHA-1 of an array of big-endian words, and a bit length
+ */
+function core_sha1(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << (24 - len % 32);
+ x[((len + 64 >> 9) << 4) + 15] = len;
+ var w = Array(80);
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ var e = -1009589776;
+ for (var i = 0; i < x.length; i += 16) {
+  var olda = a;
+  var oldb = b;
+  var oldc = c;
+  var oldd = d;
+  var olde = e;
+  for (var j = 0; j < 80; j++) {
+   if (j < 16) w[j] = x[i + j];
+   else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
+   var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
+   e = d;
+   d = c;
+   c = rol(b, 30);
+   b = a;
+   a = t;
+  }
+  a = safe_add(a, olda);
+  b = safe_add(b, oldb);
+  c = safe_add(c, oldc);
+  d = safe_add(d, oldd);
+  e = safe_add(e, olde);
+ }
+ return Array(a, b, c, d, e);
+}
+/*
+ * Perform the appropriate triplet combination function for the current
+ * iteration
+ */
+function sha1_ft(t, b, c, d) {
+ if (t < 20) return (b & c) | ((~b) & d);
+ if (t < 40) return b ^ c ^ d;
+ if (t < 60) return (b & c) | (b & d) | (c & d);
+ return b ^ c ^ d;
+}
+/*
+ * Determine the appropriate additive constant for the current iteration
+ */
+function sha1_kt(t) {
+ return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514;
+}
+/*
+ * Calculate the HMAC-SHA1 of a key and some data
+ */
+function core_hmac_sha1(key, data) {
+ var bkey = str2binb(key);
+ if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
+ var ipad = Array(16),
+  opad = Array(16);
+ for (var i = 0; i < 16; i++) {
+  ipad[i] = bkey[i] ^ 0x36363636;
+  opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+ var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
+ return core_sha1(opad.concat(hash), 512 + 160);
+}
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+/*
+ * Convert an 8-bit or 16-bit string to an array of big-endian words
+ * In 8-bit function, characters >255 have their hi-byte silently ignored.
+ */
+function str2binb(str) {
+ var bin = Array();
+ var mask = (1 << chrsz) - 1;
+ for (var i = 0; i < str.length * chrsz; i += chrsz)
+ bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32);
+ return bin;
+}
+/*
+ * Convert an array of big-endian words to a string
+ */
+function binb2str(bin) {
+ var str = "";
+ var mask = (1 << chrsz) - 1;
+ for (var i = 0; i < bin.length * 32; i += chrsz)
+ str += String.fromCharCode((bin[i >> 5] >>> (24 - i % 32)) & mask);
+ return str;
+}
+/*
+ * Convert an array of big-endian words to a hex string.
+ */
+function binb2hex(binarray) {
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var str = "";
+ for (var i = 0; i < binarray.length * 4; i++) {
+  str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF);
+ }
+ return str;
+}
+/*
+ * Convert an array of big-endian words to a base-64 string
+ */
+function binb2b64(binarray) {
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var str = "";
+ for (var i = 0; i < binarray.length * 4; i += 3) {
+  var triplet = (((binarray[i >> 2] >> 8 * (3 - i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4)) & 0xFF) << 8) | ((binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4)) & 0xFF);
+  for (var j = 0; j < 4; j++) {
+   if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+   else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
+  }
+ }
+ return str;
+}
+
+
+gSTB = {
+LoadUserData:function(file){return ""}  ,
+SaveUserData:function(file, data){},
+Debug:function(txt){console.info(txt)},
+GetDeviceSerialNumber:function(){return "012012N01212"},
+GetDeviceMacAddress:function(){return "00:1A:79:FF:FF:CD"},
+GetDeviceModelExt:function(){return "MAG250"},
+GetDeviceVersionHardware:function(){return ""},
+SetObjectCacheCapacities:function(a,b,c){return ""},
+GetWifiLinkStatus:function(){return 1},
+GetLanLinkStatus:function(){return 1},
+ConfigNetRc:function(){},
+SetNetRcStatus:function(){},
+GetHDMIConnectionState:function(){return 1},
+Version:function(){return "JS API version: 328; STB API version: 134; Player Engine version: 0x566"},  
+GetHashVersion1:function(data, key)
+{
+    var salt = "dA0j6HpVFcMgNjUBDr0QhwTBIzLHDIrynuQy4XNJ";
+    var data_xor = hex_sha1(data);
+    var prep = hex_sha1(data_xor+salt);
+    var result = hex_sha1(prep+key);
+    console.info("hashversion: " + result);
+    return result;
+},
+RDir:function(key)
+{
+    var result = "";
+    switch(key)
+    {
+    case "vmode": result = "720"; break;
+    case "IPAddress": result = "192.168.1.10"; break;
+    case "SerialNumber": result = "012012N01212"; break;
+    case "Model": result = "MAG250"; break;
+    case "ImageDescription": result = "0.2.16-r2"; break;
+    case "ImageVersion": result = "216"; break;
+    case "ImageDate": result = "Fri Oct 25 17:28:41 EEST 2013"; break;
+    case "HardwareVersion": result = "1.17-BD-00"; break;
+    case "getenv language": result = "en"; break;
+    case "getenv timezone_conf": result = "Europe/Kiev"; break;
+    case "getenv ntpurl": result = "pool.ntp.org"; break;
+    default: result = "";
+        break;
+    }
+    return result;
+},
+GetUID:function(mac, token)
+{
+    var code = "";
+    switch(arguments.length) {
+　　　　case 0:
+　　　　　　code = "0D1A4F8F7195C4853DDB520CAB6CBC4EB72583E90A558ED349E8935A4FB316EA";
+　　　　　　break;
+    }
+    return code;
+},
+InitPlayer:function(){},
+Play:function(uri, proxy_addr){console.info(uri);console.info(proxy_addr);},
+SetTopWin:function(itop){console.info("SetTopWin"+itop);},
+SetAspect:function(ihex){},
+SetPIG:function(a,b,c){},
+SetUserFlickerControl:function(ibool){},
+SetDefaultFlicker:function(ibool){},
+SetMicVolume:function(vol){},
+SetLoop:function(ibool){},
+IsFileExist:function(ibool){return 1},
+SetSubtitlesFont:function(file){},
+ExecAction:function(arg){},
+GetMediaLen:function(){return 60*120;},
+GetMediaLenEx:function(){return 60*120*1000;},
+GetPosTime:function(){return 20*120;},
+GetPosTimeEx:function(){return 20*120*1000;},
+GetPosPercent:function(){return 50;},
+GetPosPercentEx:function(){return 50;},
+EnableVKButton:function(){},
+GetEnv:function(){return '{"result":{}}' ;},
+SetEnv:function(){return true ;},
+GetDeviceImageVersionCurrent:function(){return ''},
+GetDeviceVendor:function(){return ''},
+GetDeviceActiveBank:function(){return ''},
+GetDeviceImageDesc:function(){return ''},
+GetDeviceImageVersion:function(){return ''},
+Stop:function(){},
+SetVolume:function(vol){},
+SetupRTSP:function(rtsp_type, rtsp_flags){},
+SetCASDescrambling:function(profile){},
+SetAudioLangs:function(lang1, lang2){},
+SetSubtitles:function(open){},
+GetBrightness:function(){return 0},
+GetContrast:function(){return 0},
+GetSaturation:function(){return 0},
+SetBufferSize:function(x, y){},
+SetListFilesExt:function(){},
+SetupSPdif:function(){},
+SetSubtitlesSize:function(){},
+SetSubtitlesColor:function(){},
+EnableServiceButton:function(){},
+EnableAppButton:function(){},
+SetScreenSaverTime:function(){},
+SetScreenSaverInitAttr:function(){},
+SetAutoPowerDownTime:function(){},
+SetAutoPowerDownInitAttr:function(){},
+SetSubtitlesColor:function(){},
+GetNetworkGateways:function(){ return "192.168.1.1";},
+GetNetworkNameServers:function(){ return "8.8.8.8";},
+
+SetMute:function(){},
+
+GetVolume:function(){return 0;},
+SetNativeStringMode:function(){},
+};
+
+timeShift = {SetSlidingMode:function(){},SetMaxDuration:function(){},SetTimeShiftFolder:function(){},};
+
+stbWindowMgr = {GetFocusedInputInfo:function(){ return '{"result":{"x": 1, "y":1, "w":1, "h":1, "positionHint": "none" }}';}};
+stbWebWindow = {SetGeometry:function(x,y,w,h){},SendVirtualKeypress:function(text, id){},windowId:function(){return 1;}};
\ No newline at end of file
diff --git a/c/tv.js b/c/tv.js
old mode 100644
new mode 100755
index 9636336..2edb4db
--- a/c/tv.js
+++ b/c/tv.js
@@ -32,7 +32,7 @@
         //this.fav_menu  = {};
         this.filter_menu = {};
         this.genres    = [];
-        
+
         //this.last_ch_id = 0;
         
         this.quick_ch_switch = {"on" : false, "hide_to" : 3000};
@@ -45,7 +45,8 @@
         
         this.password_input = new password_input({"parent" : this, "proceed_navigation" : true});
         this.password_input.bind();
-        
+
+
         this._show = function(genre){
 
             _debug('tv._show', genre);
@@ -2098,10 +2099,9 @@
                     }
                 );
             }
-            
-            
+
             main_menu.add(word['tv_title'], map, 'mm_ico_tv.png', '', module.tv);
-            
+
             loader.next();
         }
     );
diff --git a/c/xpcom.common.js b/c/xpcom.common.js
index c11c297..ab342f2 100755
--- a/c/xpcom.common.js
+++ b/c/xpcom.common.js
@@ -2,16 +2,16 @@
  * Common XPCOM STB constructor.
  * @constructor
  */
-function common_xpcom(){
+function common_xpcom() {
 
     this.user = {};
     this.mac = '';
-    this.ip  = '';
-    this.hd  = 1;
-    this.type  = '';
-    this.version    = '';
-    this.ajax_loader  = '';
-    this.images   = [];
+    this.ip = '';
+    this.hd = 1;
+    this.type = '';
+    this.version = '';
+    this.ajax_loader = '';
+    this.images = [];
     this.storages = {};
     this.player = {};
     this.key_lock = true;
@@ -20,6 +20,7 @@ function common_xpcom(){
     this.header_ua_ext = [];
     this.access_token = '';
     this.random = '';
+    this.loadChPageTimer_id = null;
 
     this.aspect_idx = 0;
     this.aspect_array = [
@@ -36,7 +37,7 @@ function common_xpcom(){
 
     this.cur_place = '';
 
-    this.load_step = Math.ceil(50/3);
+    this.load_step = Math.ceil(50 / 3);
 
     this.recordings = [];
 
@@ -48,192 +49,192 @@ function common_xpcom(){
 
     // iso639
     this.lang_map = {
-        "aa" : "aar", //Afar
-        "ab" : "abk", //Abkhazian
-        "af" : "afr", //Afrikaans
-        "ak" : "aka", //Akan
-        "sq" : "alb", //Albanian
-        "am" : "amh", //Amharic
-        "ar" : "ara", //Arabic
-        "an" : "arg", //Aragonese
-        "hy" : "arm", //Armenian
-        "as" : "asm", //Assamese
-        "av" : "ava", //Avaric
-        "ae" : "ave", //Avestan
-        "ay" : "aym", //Aymara
-        "az" : "aze", //Azerbaijani
-        "ba" : "bak", //Bashkir
-        "bm" : "bam", //Bambara
-        "eu" : "baq", //Basque
-        "be" : "bel", //Belarusian
-        "bn" : "ben", //Bengali
-        "bh" : "bih", //Bihari languages
-        "bi" : "bis", //Bislama
-        "bs" : "bos", //Bosnian
-        "br" : "bre", //Breton
-        "bg" : "bul", //Bulgarian
-        "my" : "bur", //Burmese
-        "ca" : "cat", //Catalan; Valencian
-        "ch" : "cha", //Chamorro
-        "ce" : "che", //Chechen
-        "zh" : "chi", //Chinese
-        "cu" : "chu", //Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
-        "cv" : "chv", //Chuvash
-        "kw" : "cor", //Cornish
-        "co" : "cos", //Corsican
-        "cr" : "cre", //Cree
-        "cs" : "ces", //Czech
-        "da" : "dan", //Danish
-        "dv" : "div", //Divehi; Dhivehi; Maldivian
-        "nl" : "dut", //Dutch; Flemish
-        "dz" : "dzo", //Dzongkha
-        "en" : "eng", //English
-        "eo" : "epo", //Esperanto
-        "et" : "est", //Estonian
-        "ee" : "ewe", //Ewe
-        "fo" : "fao", //Faroese
-        "fj" : "fij", //Fijian
-        "fi" : "fin", //Finnish
-        "fr" : "fra", //French
-        "fy" : "fry", //Western Frisian
-        "ff" : "ful", //Fulah
-        "ka" : "geo", //Georgian
-        "de" : "deu", //German
-        "gd" : "gla", //Gaelic; Scottish Gaelic
-        "ga" : "gai", //Irish
-        "gl" : "glg", //Galician
-        "gv" : "glv", //Manx
-        "el" : "ell", //Greek, Modern (1453-)
-        "gn" : "grn", //Guarani
-        "gu" : "guj", //Gujarati
-        "ht" : "hat", //Haitian; Haitian Creole
-        "ha" : "hau", //Hausa
-        "he" : "heb", //Hebrew
-        "hz" : "her", //Herero
-        "hi" : "hin", //Hindi
-        "ho" : "hmo", //Hiri Motu
-        "hr" : "hrv", //Croatian
-        "hu" : "hun", //Hungarian
-        "ig" : "ibo", //Igbo
-        "is" : "ice", //Icelandic
-        "io" : "ido", //Ido
-        "ii" : "iii", //Sichuan Yi; Nuosu
-        "iu" : "iku", //Inuktitut
-        "ie" : "ile", //Interlingue; Occidental
-        "ia" : "ina", //Interlingua (International Auxiliary Language Association)
-        "id" : "ind", //Indonesian
-        "ik" : "ipk", //Inupiaq
-        "it" : "ita", //Italian
-        "jv" : "jav", //Javanese
-        "ja" : "jpn", //Japanese
-        "kl" : "kal", //Kalaallisut; Greenlandic
-        "kn" : "kan", //Kannada
-        "ks" : "kas", //Kashmiri
-        "kr" : "kau", //Kanuri
-        "kk" : "kaz", //Kazakh
-        "km" : "khm", //Central Khmer
-        "ki" : "kik", //Kikuyu; Gikuyu
-        "rw" : "kin", //Kinyarwanda
-        "ky" : "kir", //Kirghiz; Kyrgyz
-        "kv" : "kom", //Komi
-        "kg" : "kon", //Kongo
-        "ko" : "kor", //Korean
-        "kj" : "kua", //Kuanyama; Kwanyama
-        "ku" : "kur", //Kurdish
-        "lo" : "lao", //Lao
-        "la" : "lat", //Latin
-        "lv" : "lav", //Latvian
-        "li" : "lim", //Limburgan; Limburger; Limburgish
-        "ln" : "lin", //Lingala
-        "lt" : "lit", //Lithuanian
-        "lb" : "ltz", //Luxembourgish; Letzeburgesch
-        "lu" : "lub", //Luba-Katanga
-        "lg" : "lug", //Ganda
-        "mk" : "mac", //Macedonian
-        "mh" : "mah", //Marshallese
-        "ml" : "mal", //Malayalam
-        "mi" : "mao", //Maori
-        "mr" : "mar", //Marathi
-        "ms" : "may", //Malay
-        "mg" : "mlg", //Malagasy
-        "mt" : "mlt", //Maltese
-        "mn" : "mon", //Mongolian
-        "na" : "nau", //Nauru
-        "nv" : "nav", //Navajo; Navaho
-        "nr" : "nbl", //Ndebele, South; South Ndebele
-        "nd" : "nde", //Ndebele, North; North Ndebele
-        "ng" : "ndo", //Ndonga
-        "ne" : "nep", //Nepali
-        "nn" : "nno", //Norwegian Nynorsk; Nynorsk, Norwegian
-        "nb" : "nob", //Bokmål, Norwegian; Norwegian Bokmål
-        "no" : "nor", //Norwegian
-        "ny" : "nya", //Chichewa; Chewa; Nyanja
-        "oc" : "oci", //Occitan (post 1500); Provençal
-        "oj" : "oji", //Ojibwa
-        "or" : "ori", //Oriya
-        "om" : "orm", //Oromo
-        "os" : "oss", //Ossetian; Ossetic
-        "pa" : "pan", //Panjabi; Punjabi
-        "fa" : "fas", //Persian
-        "pi" : "pli", //Pali
-        "pl" : "pol", //Polish
-        "pt" : "por", //Portuguese
-        "ps" : "pus", //Pushto; Pashto
-        "qu" : "que", //Quechua
-        "rm" : "roh", //Romansh
-        "ro" : "ron", //Romanian; Moldavian; Moldovan
-        "rn" : "run", //Rundi
-        "ru" : "rus", //Russian
-        "sg" : "sag", //Sango
-        "sa" : "san", //Sanskrit
-        "si" : "sin", //Sinhala; Sinhalese
-        "sk" : "slk", //Slovak
-        "sl" : "slv", //Slovenian
-        "se" : "sme", //Northern Sami
-        "sm" : "smo", //Samoan
-        "sn" : "sna", //Shona
-        "sd" : "snd", //Sindhi
-        "so" : "som", //Somali
-        "st" : "sot", //Sotho, Southern
-        "es" : "spa", //Spanish; Castilian
-        "sc" : "srd", //Sardinian
-        "sr" : "srp", //Serbian
-        "ss" : "ssw", //Swati
-        "su" : "sun", //Sundanese
-        "sw" : "swa", //Swahili
-        "sv" : "sve", //Swedish
-        "ty" : "tah", //Tahitian
-        "ta" : "tam", //Tamil
-        "tt" : "tat", //Tatar
-        "te" : "tel", //Telugu
-        "tg" : "tgk", //Tajik
-        "tl" : "tgl", //Tagalog
-        "th" : "tha", //Thai
-        "bo" : "tib", //Tibetan
-        "ti" : "tir", //Tigrinya
-        "to" : "ton", //Tonga (Tonga Islands)
-        "tn" : "tsn", //Tswana
-        "ts" : "tso", //Tsonga
-        "tk" : "tuk", //Turkmen
-        "tr" : "tur", //Turkish
-        "tw" : "twi", //Twi
-        "ug" : "uig", //Uighur; Uyghur
-        "uk" : "ukr", //Ukrainian
-        "ur" : "urd", //Urdu
-        "uz" : "uzb", //Uzbek
-        "ve" : "ven", //Venda
-        "vi" : "vie", //Vietnamese
-        "vo" : "vol", //Volapük
-        "cy" : "wel", //Welsh
-        "wa" : "wln", //Walloon
-        "wo" : "wol", //Wolof
-        "xh" : "xho", //Xhosa
-        "yi" : "yid", //Yiddish
-        "yo" : "yor", //Yoruba
-        "za" : "zha", //Zhuang; Chuang
-        "zu" : "zul" //Zulu
+        "aa": "aar", //Afar
+        "ab": "abk", //Abkhazian
+        "af": "afr", //Afrikaans
+        "ak": "aka", //Akan
+        "sq": "alb", //Albanian
+        "am": "amh", //Amharic
+        "ar": "ara", //Arabic
+        "an": "arg", //Aragonese
+        "hy": "arm", //Armenian
+        "as": "asm", //Assamese
+        "av": "ava", //Avaric
+        "ae": "ave", //Avestan
+        "ay": "aym", //Aymara
+        "az": "aze", //Azerbaijani
+        "ba": "bak", //Bashkir
+        "bm": "bam", //Bambara
+        "eu": "baq", //Basque
+        "be": "bel", //Belarusian
+        "bn": "ben", //Bengali
+        "bh": "bih", //Bihari languages
+        "bi": "bis", //Bislama
+        "bs": "bos", //Bosnian
+        "br": "bre", //Breton
+        "bg": "bul", //Bulgarian
+        "my": "bur", //Burmese
+        "ca": "cat", //Catalan; Valencian
+        "ch": "cha", //Chamorro
+        "ce": "che", //Chechen
+        "zh": "chi", //Chinese
+        "cu": "chu", //Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
+        "cv": "chv", //Chuvash
+        "kw": "cor", //Cornish
+        "co": "cos", //Corsican
+        "cr": "cre", //Cree
+        "cs": "ces", //Czech
+        "da": "dan", //Danish
+        "dv": "div", //Divehi; Dhivehi; Maldivian
+        "nl": "dut", //Dutch; Flemish
+        "dz": "dzo", //Dzongkha
+        "en": "eng", //English
+        "eo": "epo", //Esperanto
+        "et": "est", //Estonian
+        "ee": "ewe", //Ewe
+        "fo": "fao", //Faroese
+        "fj": "fij", //Fijian
+        "fi": "fin", //Finnish
+        "fr": "fra", //French
+        "fy": "fry", //Western Frisian
+        "ff": "ful", //Fulah
+        "ka": "geo", //Georgian
+        "de": "deu", //German
+        "gd": "gla", //Gaelic; Scottish Gaelic
+        "ga": "gai", //Irish
+        "gl": "glg", //Galician
+        "gv": "glv", //Manx
+        "el": "ell", //Greek, Modern (1453-)
+        "gn": "grn", //Guarani
+        "gu": "guj", //Gujarati
+        "ht": "hat", //Haitian; Haitian Creole
+        "ha": "hau", //Hausa
+        "he": "heb", //Hebrew
+        "hz": "her", //Herero
+        "hi": "hin", //Hindi
+        "ho": "hmo", //Hiri Motu
+        "hr": "hrv", //Croatian
+        "hu": "hun", //Hungarian
+        "ig": "ibo", //Igbo
+        "is": "ice", //Icelandic
+        "io": "ido", //Ido
+        "ii": "iii", //Sichuan Yi; Nuosu
+        "iu": "iku", //Inuktitut
+        "ie": "ile", //Interlingue; Occidental
+        "ia": "ina", //Interlingua (International Auxiliary Language Association)
+        "id": "ind", //Indonesian
+        "ik": "ipk", //Inupiaq
+        "it": "ita", //Italian
+        "jv": "jav", //Javanese
+        "ja": "jpn", //Japanese
+        "kl": "kal", //Kalaallisut; Greenlandic
+        "kn": "kan", //Kannada
+        "ks": "kas", //Kashmiri
+        "kr": "kau", //Kanuri
+        "kk": "kaz", //Kazakh
+        "km": "khm", //Central Khmer
+        "ki": "kik", //Kikuyu; Gikuyu
+        "rw": "kin", //Kinyarwanda
+        "ky": "kir", //Kirghiz; Kyrgyz
+        "kv": "kom", //Komi
+        "kg": "kon", //Kongo
+        "ko": "kor", //Korean
+        "kj": "kua", //Kuanyama; Kwanyama
+        "ku": "kur", //Kurdish
+        "lo": "lao", //Lao
+        "la": "lat", //Latin
+        "lv": "lav", //Latvian
+        "li": "lim", //Limburgan; Limburger; Limburgish
+        "ln": "lin", //Lingala
+        "lt": "lit", //Lithuanian
+        "lb": "ltz", //Luxembourgish; Letzeburgesch
+        "lu": "lub", //Luba-Katanga
+        "lg": "lug", //Ganda
+        "mk": "mac", //Macedonian
+        "mh": "mah", //Marshallese
+        "ml": "mal", //Malayalam
+        "mi": "mao", //Maori
+        "mr": "mar", //Marathi
+        "ms": "may", //Malay
+        "mg": "mlg", //Malagasy
+        "mt": "mlt", //Maltese
+        "mn": "mon", //Mongolian
+        "na": "nau", //Nauru
+        "nv": "nav", //Navajo; Navaho
+        "nr": "nbl", //Ndebele, South; South Ndebele
+        "nd": "nde", //Ndebele, North; North Ndebele
+        "ng": "ndo", //Ndonga
+        "ne": "nep", //Nepali
+        "nn": "nno", //Norwegian Nynorsk; Nynorsk, Norwegian
+        "nb": "nob", //Bokmål, Norwegian; Norwegian Bokmål
+        "no": "nor", //Norwegian
+        "ny": "nya", //Chichewa; Chewa; Nyanja
+        "oc": "oci", //Occitan (post 1500); Provençal
+        "oj": "oji", //Ojibwa
+        "or": "ori", //Oriya
+        "om": "orm", //Oromo
+        "os": "oss", //Ossetian; Ossetic
+        "pa": "pan", //Panjabi; Punjabi
+        "fa": "fas", //Persian
+        "pi": "pli", //Pali
+        "pl": "pol", //Polish
+        "pt": "por", //Portuguese
+        "ps": "pus", //Pushto; Pashto
+        "qu": "que", //Quechua
+        "rm": "roh", //Romansh
+        "ro": "ron", //Romanian; Moldavian; Moldovan
+        "rn": "run", //Rundi
+        "ru": "rus", //Russian
+        "sg": "sag", //Sango
+        "sa": "san", //Sanskrit
+        "si": "sin", //Sinhala; Sinhalese
+        "sk": "slk", //Slovak
+        "sl": "slv", //Slovenian
+        "se": "sme", //Northern Sami
+        "sm": "smo", //Samoan
+        "sn": "sna", //Shona
+        "sd": "snd", //Sindhi
+        "so": "som", //Somali
+        "st": "sot", //Sotho, Southern
+        "es": "spa", //Spanish; Castilian
+        "sc": "srd", //Sardinian
+        "sr": "srp", //Serbian
+        "ss": "ssw", //Swati
+        "su": "sun", //Sundanese
+        "sw": "swa", //Swahili
+        "sv": "sve", //Swedish
+        "ty": "tah", //Tahitian
+        "ta": "tam", //Tamil
+        "tt": "tat", //Tatar
+        "te": "tel", //Telugu
+        "tg": "tgk", //Tajik
+        "tl": "tgl", //Tagalog
+        "th": "tha", //Thai
+        "bo": "tib", //Tibetan
+        "ti": "tir", //Tigrinya
+        "to": "ton", //Tonga (Tonga Islands)
+        "tn": "tsn", //Tswana
+        "ts": "tso", //Tsonga
+        "tk": "tuk", //Turkmen
+        "tr": "tur", //Turkish
+        "tw": "twi", //Twi
+        "ug": "uig", //Uighur; Uyghur
+        "uk": "ukr", //Ukrainian
+        "ur": "urd", //Urdu
+        "uz": "uzb", //Uzbek
+        "ve": "ven", //Venda
+        "vi": "vie", //Vietnamese
+        "vo": "vol", //Volapük
+        "cy": "wel", //Welsh
+        "wa": "wln", //Walloon
+        "wo": "wol", //Wolof
+        "xh": "xho", //Xhosa
+        "yi": "yid", //Yiddish
+        "yo": "yor", //Yoruba
+        "za": "zha", //Zhuang; Chuang
+        "zu": "zul" //Zulu
     };
-    this.timezone_list=[
+    this.timezone_list = [
         'Europe/Andorra',
         'Asia/Dubai',
         'Asia/Kabul',
@@ -673,7 +674,7 @@ function common_xpcom(){
         "duration_input"
     ];
 
-    this.init = function(){
+    this.init = function () {
         _debug('stb.init');
 
         loader.append("reset");
@@ -696,15 +697,15 @@ function common_xpcom(){
         connection_problem.init();
         authentication_problem.init();
 
-        window.addEventListener('message', function(event){
+        window.addEventListener('message', function (event) {
             _debug('message event');
 
-            if (window.self !== window.top && event.data == 'show' && stb.cur_single_module){
+            if (window.self !== window.top && event.data == 'show' && stb.cur_single_module) {
                 _debug('stb.cur_single_module', stb.cur_single_module);
 
-                if (module[stb.cur_single_module]._show){
+                if (module[stb.cur_single_module]._show) {
                     module[stb.cur_single_module]._show();
-                }else if (module[stb.cur_single_module].show){
+                } else if (module[stb.cur_single_module].show) {
                     module[stb.cur_single_module].show();
                 }
             }
@@ -712,15 +713,15 @@ function common_xpcom(){
         }, false);
     };
 
-    this.init_auth_dialog = function(){
-        this.auth_dialog = new ModalForm({"title" : get_word('auth_title')});
+    this.init_auth_dialog = function () {
+        this.auth_dialog = new ModalForm({"title": get_word('auth_title')});
         this.auth_dialog.addItem(new ModalFormInput({
             "label": get_word('auth_login'),
             "name": "login",
             "onchange": function () {
                 _debug('change');
                 stb.auth_dialog.resetStatus();
-                if (stb.msg && stb.msg.on){
+                if (stb.msg && stb.msg.on) {
                     stb.msg.hide();
                 }
             }
@@ -731,7 +732,7 @@ function common_xpcom(){
             "onchange": function () {
                 _debug('change');
                 stb.auth_dialog.resetStatus();
-                if (stb.msg && stb.msg.on){
+                if (stb.msg && stb.msg.on) {
                     stb.msg.hide();
                 }
             }
@@ -739,46 +740,46 @@ function common_xpcom(){
         var self = this;
         this.auth_dialog.addItem(new ModalFormButton(
             {
-                "value" : "OK",
-                "onclick" : function(){
+                "value": "OK",
+                "onclick": function () {
 
-                    var login    = self.auth_dialog.getItemByName("login").getValue();
+                    var login = self.auth_dialog.getItemByName("login").getValue();
                     var password = self.auth_dialog.getItemByName("password").getValue();
 
                     _debug("login", login);
                     _debug("password", password);
 
-                    if (['mag322', 'mag324', 'aurahd4'].indexOf(self.type.toLowerCase()) >= 0){
+                    if (['mag322', 'mag324', 'aurahd4'].indexOf(self.type.toLowerCase()) >= 0) {
                         var device_id = stb.GetUID ? stb.GetUID('device_id', '1729452065727304', 3) : '';
                         var device_id2 = stb.GetUID ? (stb.GetUID(self.access_token) == stb.GetUID(self.access_token, self.access_token) ? '' : stb.GetUID('device_id', self.access_token, 5)) : '';
                     }
 
-                    if (['mag322', 'mag324', 'aurahd4'].indexOf(self.type.toLowerCase()) === -1 || !device_id || !device_id2){
+                    if (['mag322', 'mag324', 'aurahd4'].indexOf(self.type.toLowerCase()) === -1 || !device_id || !device_id2) {
                         device_id = stb.GetUID ? stb.GetUID() : '';
                         device_id2 = stb.GetUID ? (stb.GetUID(self.access_token) == stb.GetUID(self.access_token, self.access_token) ? '' : stb.GetUID('device_id', self.access_token)) : '';
                     }
 
                     stb.load(
                         {
-                            "type"       : "stb",
-                            "action"     : "do_auth",
-                            "login"      : login,
-                            "password"   : password,
-                            'device_id'  : device_id,
-                            'device_id2' : device_id2
+                            "type": "stb",
+                            "action": "do_auth",
+                            "login": login,
+                            "password": password,
+                            'device_id': device_id,
+                            'device_id2': device_id2
                         },
-                        function(result){
+                        function (result) {
                             _debug('auth result', result);
 
-                            if (result){
-                                if (stb.user['status'] == 2){
+                            if (result) {
+                                if (stb.user['status'] == 2) {
                                     stb.get_user_profile(true);
-                                }else{
+                                } else {
                                     stb.loader.stop();
                                     main_menu.show();
                                 }
                                 stb.auth_dialog.hide();
-                            }else{
+                            } else {
                                 stb.auth_dialog.setStatus(get_word('auth_error'));
                             }
                         }
@@ -788,10 +789,10 @@ function common_xpcom(){
         ));
     };
 
-    this.init_alerts = function(){
+    this.init_alerts = function () {
         _debug('stb.init_alerts');
 
-        if (this.notice){
+        if (this.notice) {
             return;
         }
 
@@ -803,47 +804,46 @@ function common_xpcom(){
         this.confirm = new _alert('confirm');
         this.confirm.bind();
 
-        if (this.user['info']){
+        if (this.user['info']) {
 
             stb.msg.push(
                 {
-                    msg : this.user['info']
+                    msg: this.user['info']
                 }
             );
         }
     };
 
-    this.get_server_params = function(){
+    this.get_server_params = function () {
 
         var pattern = /(https?):\/\/([^\/]*)\/([\w\/]+)*\/([\w\/]+)\/(.)*/;
 
         this.portal_protocol = document.URL.replace(pattern, "$1");
-        this.portal_ip   = document.URL.replace(pattern, "$2");
+        this.portal_ip = document.URL.replace(pattern, "$2");
         this.portal_path = document.URL.replace(pattern, "$3");
 
         _debug('stb.portal_path:', this.portal_path);
 
-        this.ajax_loader = this.portal_protocol+'://'+this.portal_ip+'/'+this.portal_path+'/server/load.php';
+        this.ajax_loader = this.portal_protocol + '://' + this.portal_ip + '/' + this.portal_path + '/server/load.php';
 
         _debug('stb.ajax_loader:', this.ajax_loader);
     };
 
-    this.get_modules = function(){
+    this.get_modules = function () {
         _debug('stb.get_modules');
 
         this.load(
-
             {
-                "type"   : "stb",
-                "action" : "get_modules"
+                "type": "stb",
+                "action": "get_modules"
             },
 
-            function(result){
+            function (result) {
                 _debug('stb.get_modules callback', result);
                 var all_modules = result.all_modules;
                 this.switchable_modules = result.switchable_modules;
 
-                this.disabled_modules   = result.disabled_modules   || [];
+                this.disabled_modules = result.disabled_modules || [];
                 this.restricted_modules = result.restricted_modules || [];
 
                 this.all_modules = this.base_modules.concat(all_modules);
@@ -851,20 +851,20 @@ function common_xpcom(){
 
                 var self = this;
 
-                this.all_modules = this.all_modules.filter(function(module){
+                this.all_modules = this.all_modules.filter(function (module) {
                     return self.disabled_modules.indexOf(module) == -1;
                 });
 
-                if (result.template && result.template.indexOf('smart_launcher') != -1 && result['launcher_url']){
+                if (result.template && result.template.indexOf('smart_launcher') != -1 && result['launcher_url']) {
 
                     if (single_module.length == 0) {
                         _debug('redirect to the new launcher');
                         window.stop();
                         document.body.hide();
-                        _debug(result['launcher_url']+'?config=' + encodeURIComponent(result['launcher_profile_url']+'?uid=' + this.user['id'] + '&language='+this.stb_lang_orig+'&_='+(new Date().getTime())));
-                        window.location = result['launcher_url']+'?config=' + encodeURIComponent(result['launcher_profile_url']+'?uid=' + this.user['id'] + '&language='+this.stb_lang_orig+'&_='+(new Date().getTime()));
+                        _debug(result['launcher_url'] + '?config=' + encodeURIComponent(result['launcher_profile_url'] + '?uid=' + this.user['id'] + '&language=' + this.stb_lang_orig + '&_=' + (new Date().getTime())));
+                        window.location = result['launcher_url'] + '?config=' + encodeURIComponent(result['launcher_profile_url'] + '?uid=' + this.user['id'] + '&language=' + this.stb_lang_orig + '&_=' + (new Date().getTime()));
                         return;
-                    }else{
+                    } else {
                         result.template = 'default';
                     }
                 }
@@ -876,19 +876,19 @@ function common_xpcom(){
                 loader.append_style('load_bar');
                 loader.append_style('blocking');
 
-                if (result.supermodule){
+                if (result.supermodule) {
                     this.supermodule = result.supermodule;
                     loader.add(this.base_modules.concat([result.supermodule]));
-                }else{
+                } else {
                     loader.add(this.all_modules);
                 }
 
-                if (window.self !== window.top){
+                if (window.self !== window.top) {
                     // notify parent to show this window
                     parent && parent.postMessage('show', '*');
                 }
 
-                if (typeof(stbWebWindow) != 'undefined' && windowId != 1){
+                if (typeof (stbWebWindow) != 'undefined' && windowId != 1) {
                     // notify parent to show this window
                     stbWebWindow.messageSend(1, 'app:ready');
                 }
@@ -898,40 +898,39 @@ function common_xpcom(){
         );
     };
 
-    this.load_account_modules = function(){
+    this.load_account_modules = function () {
         _debug('stb.load_account_modules');
 
-        if (this.all_modules){
+        if (this.all_modules) {
             return;
         }
 
         this.load(
-
             {
-                "type"   : "stb",
-                "action" : "get_modules"
+                "type": "stb",
+                "action": "get_modules"
             },
 
-            function(result){
+            function (result) {
                 _debug('stb.load_account_modules callback', result);
 
                 var all_modules = result.all_modules;
 
-                all_modules = all_modules.filter(function(module){
+                all_modules = all_modules.filter(function (module) {
                     return module == 'account';
                 });
 
-                if (!all_modules){
+                if (!all_modules) {
                     return;
                 }
 
                 this.all_modules = this.base_modules.concat(all_modules);
                 _debug('all_modules', this.all_modules);
 
-                if (result.supermodule){
+                if (result.supermodule) {
                     this.supermodule = result.supermodule;
                     loader.add(this.base_modules.concat([result.supermodule]));
-                }else{
+                } else {
                     loader.add(this.all_modules);
                 }
 
@@ -941,21 +940,20 @@ function common_xpcom(){
         );
     };
 
-    this.update_modules = function(){
+    this.update_modules = function () {
         _debug('stb.update_modules');
 
         this.load(
-
             {
-                "type"   : "stb",
-                "action" : "get_modules"
+                "type": "stb",
+                "action": "get_modules"
             },
 
-            function(result){
+            function (result) {
                 _debug('update_modules result', result);
 
                 this.switchable_modules = result.switchable_modules || [];
-                this.disabled_modules   = result.disabled_modules   || [];
+                this.disabled_modules = result.disabled_modules || [];
                 this.restricted_modules = result.restricted_modules || [];
             },
 
@@ -963,56 +961,56 @@ function common_xpcom(){
         );
     };
 
-    this.is_restricted_module = function(module){
+    this.is_restricted_module = function (module) {
         _debug('stb.is_restricted_module');
         _debug('module.layer_name', module.layer_name);
 
         _debug('this.additional_services_on', this.additional_services_on);
 
-        if (this.restricted_modules.indexOf(module.layer_name) >= 0){
+        if (this.restricted_modules.indexOf(module.layer_name) >= 0) {
             return true;
         }
 
-        if (!this.additional_services_on && this.switchable_modules.indexOf(module.layer_name) >= 0){
+        if (!this.additional_services_on && this.switchable_modules.indexOf(module.layer_name) >= 0) {
             return true;
         }
 
         return false;
     };
 
-    this.check_additional_services = function(param){
+    this.check_additional_services = function (param) {
         _debug('check_additional_services', param);
 
         this.additional_services_on = parseInt(param, 10);
     };
 
-    this.get_stb_params = function (){
+    this.get_stb_params = function () {
 
-        try{
+        try {
 
-            this.video_mode   = stb.RDir('vmode');
+            this.video_mode = stb.RDir('vmode');
             //this.graphic_mode = stb.RDir('gmode');
 
             //this.mac = stb.RDir('MACAddress').toUpperCase().clearnl();
-            try{
+            try {
                 this.mac = stb.GetDeviceMacAddress().toUpperCase().clearnl();
-            }catch(e){
+            } catch (e) {
                 _debug('this.mac use old API');
                 this.mac = stb.RDir('MACAddress').toUpperCase().clearnl();
             }
 
-            this.ip  = stb.RDir('IPAddress').clearnl();
+            this.ip = stb.RDir('IPAddress').clearnl();
 
-            try{
-                this.serial_number  = stb.GetDeviceSerialNumber().clearnl();
-            }catch(e){
+            try {
+                this.serial_number = stb.GetDeviceSerialNumber().clearnl();
+            } catch (e) {
                 _debug('this.serial_number use old API');
-                this.serial_number  = stb.RDir('SerialNumber').clearnl();
+                this.serial_number = stb.RDir('SerialNumber').clearnl();
             }
 
-            try{
+            try {
                 this.type = stb.GetDeviceModelExt().clearnl();
-            }catch(e){
+            } catch (e) {
                 _debug('this.type use old API');
                 this.type = stb.RDir('Model').clearnl();
             }
@@ -1031,10 +1029,10 @@ function common_xpcom(){
             this.ntp_server = stb.RDir('getenv ntpurl').clearnl();
 
             this.firmware_version = this.image_version = stb.RDir('ImageVersion').clearnl();
-            this.image_desc    = stb.RDir('ImageDescription').clearnl();
-            this.image_date    = stb.RDir('ImageDate').clearnl();
+            this.image_desc = stb.RDir('ImageDescription').clearnl();
+            this.image_date = stb.RDir('ImageDate').clearnl();
 
-            this.version = 'ImageDescription: ' + this.image_desc + '; ImageDate: ' + this.image_date + '; PORTAL version: '+ver+'; API Version: ' + stb.Version();
+            this.version = 'ImageDescription: ' + this.image_desc + '; ImageDate: ' + this.image_date + '; PORTAL version: ' + ver + '; API Version: ' + stb.Version();
 
             this.hw_version = stb.GetDeviceVersionHardware ? stb.GetDeviceVersionHardware() : '';
 
@@ -1042,45 +1040,45 @@ function common_xpcom(){
 
             this.num_banks = mtdparts.indexOf('RootFs2') > 0 ? 2 : 1;
 
-            if (this.graphic_mode >= 720){
+            if (this.graphic_mode >= 720) {
                 _debug('gSTB.SetObjectCacheCapacities');
                 gSTB.SetObjectCacheCapacities(1000000, 7000000, 10000000);
             }
 
-            if (stb.GetWifiLinkStatus){
+            if (stb.GetWifiLinkStatus) {
                 var link = [];
 
-                if (stb.GetLanLinkStatus()){
+                if (stb.GetLanLinkStatus()) {
                     link.push('Ethernet');
                 }
 
-                if (stb.GetWifiLinkStatus()){
+                if (stb.GetWifiLinkStatus()) {
                     link.push('WiFi');
                 }
 
-                this.header_ua_ext.push('Link: '+link.join(','));
+                this.header_ua_ext.push('Link: ' + link.join(','));
             }
 
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
 
-        if (debug){
+        if (debug) {
 
-            if (_GET['mac']){
+            if (_GET['mac']) {
                 this.mac = _GET['mac'];
                 this.set_cookie('mac_emu', 1);
             }
 
             this.set_cookie('debug', 1);
 
-            if (_GET['debug_key']){
+            if (_GET['debug_key']) {
                 this.set_cookie('debug_key', _GET['debug_key']);
             }
 
         }
 
-        this.set_cookie('mac',      this.mac);
+        this.set_cookie('mac', this.mac);
         this.set_cookie('stb_lang', this.stb_lang);
         this.set_cookie('timezone', this.timezone);
         this.set_cookie('adid', this.get_ad_id());
@@ -1094,33 +1092,33 @@ function common_xpcom(){
         _debug('this.ip:', this.ip);
         _debug('this.type:', this.type);
         _debug('this.version:', this.version);
-        _debug('this.hd:',this.hd);
+        _debug('this.hd:', this.hd);
     };
 
-    this.set_cookie = function(name, val){
+    this.set_cookie = function (name, val) {
         document.cookie = name + '=' + encodeURIComponent(val) + '; path=/;';
     };
 
-    this.delete_cookie = function(name){
+    this.delete_cookie = function (name) {
         document.cookie = name + '=; path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT;';
     };
 
-    this.get_localization = function(){
+    this.get_localization = function () {
         _debug('stb.get_localization');
 
         this.load(
             {
-                "type"   : "stb",
-                "action" : "get_localization"
+                "type": "stb",
+                "action": "get_localization"
             },
 
-            function(result){
+            function (result) {
 
                 word = result;
                 //this.clock.start();
 
                 if (!this.profile.clock_format) {
-                    this.profile.clock_format = (get_word('time_format') && this.clock_formats[get_word('time_format')]) ? this.clock_formats[get_word('time_format')]: '24h';
+                    this.profile.clock_format = (get_word('time_format') && this.clock_formats[get_word('time_format')]) ? this.clock_formats[get_word('time_format')] : '24h';
                 }
 
                 this.user_init(this.profile);
@@ -1136,7 +1134,7 @@ function common_xpcom(){
         )
     };
 
-    this.load = function(params, var_args){
+    this.load = function (params, var_args) {
         _debug('stb.load()');
         _debug('params:', params);
 
@@ -1144,90 +1142,102 @@ function common_xpcom(){
 
         var context = window;
         var method = 'GET';
+        var callbackError = null;
 
-        if (arguments.length == 3){
+        if (arguments.length == 3) {
             context = arguments[2];
         }
 
-        if (arguments.length == 4){
+        if (arguments.length == 4) {
             method = arguments[3];
         }
 
-        try{
+        if (arguments.length == 5) {
+            context = arguments[2];
+            method = arguments[3];
+            callbackError = arguments[4];
+        }
+        try {
 
             var req = new XMLHttpRequest();
 
-            if (method == 'POST'){
-                req.open("POST", this.ajax_loader + '?JsHttpRequest='+(new Date().getTime())+'-xml', true);
+            if (method == 'POST') {
+                req.open("POST", this.ajax_loader + '?JsHttpRequest=' + (new Date().getTime()) + '-xml', true);
                 req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
-            }else{
+            } else {
                 req.open("GET", this.ajax_loader + '?' + this.params_to_query(params), true);
             }
 
-            if (this.header_ua_ext.length > 0){
+            if (this.header_ua_ext.length > 0) {
                 req.setRequestHeader("X-User-Agent", stb.header_ua_ext.join('; '));
             }
 
-            if (this.access_token){
+            if (this.access_token) {
                 req.setRequestHeader("Authorization", "Bearer " + this.access_token);
             }
 
-            req.addEventListener("error", function(){
+            req.addEventListener("error", function () {
                 console.log('XMLHttpRequest error event');
                 connection_problem.show();
             }, false);
 
-            req.onreadystatechange = function(){
+            req.onreadystatechange = function () {
                 if (req.readyState == 4) {
                     if (req.status == 200) {
-                        try{
+                        try {
                             var result = JSON.parse(req.responseText);
                             req = null;
-                        }catch(er){
+                        } catch (er) {
                             _debug('req.responseText', req.responseText);
-                            if (req.responseText == 'Authorization failed.' || req.responseText == 'Access denied.'){
-                                if (stb.auth_access && req.responseText == 'Authorization failed.'){
+                            if (req.responseText == 'Authorization failed.' || req.responseText == 'Access denied.') {
+                                if (stb.auth_access && req.responseText == 'Authorization failed.') {
                                     keydown_observer.emulate_key(key.MENU);
                                     main_menu.hide();
                                     stb.loader.show();
                                     stb.key_lock = false;
-                                    if (!stb.auth_dialog){
+                                    if (!stb.auth_dialog) {
                                         stb.init_auth_dialog();
                                     }
                                     stb.auth_dialog.show();
-                                }else if (req.responseText == 'Access denied.'){
+                                } else if (req.responseText == 'Access denied.') {
                                     stb.cut_off();
-                                }else if (!stb.auth_dialog || !stb.auth_dialog.on){
+                                } else if (!stb.auth_dialog || !stb.auth_dialog.on) {
                                     authentication_problem.show();
                                 }
                             }
                             throw new Error(er);
                         }
                         _debug(result.text);
-                        if (connection_problem.on && stb.cur_place == 'tv' && stb.player.on){
+                        if (connection_problem.on && stb.cur_place == 'tv' && stb.player.on) {
                             stb.player.play_last();
                         }
                         connection_problem.hide();
                         authentication_problem.hide();
                         callback.call(context, result.js);
                         result = null;
-                    } else if (req.status == 0){
+                    } else if (req.status == 0) {
                         console.log('Abort request');
+                        if (callback) {
+                            callbackError.call(context, req.status);
+                        }
                         //connection_problem.show();
-                    }else{
+                    } else {
                         connection_problem.show();
-                        console.log('req.status: '+req.status);
+                        console.log('req.status: ' + req.status);
                         console.log(req.responseText);
+                        if (callback) {
+                            callbackError.call(context, req.status);
+                        }
                     }
                     req = null;
                 }
             };
-            if (method == 'POST'){
+            if (method == 'POST') {
                 req.send(this.params_to_query(params));
-            }else{
+            } else {
                 req.send(null);
             }
-        }catch(e){
+        } catch (e) {
             req = null;
             console.log(e);
         }
@@ -1235,22 +1245,22 @@ function common_xpcom(){
         return req;
     };
 
-    this.params_to_query = function(params){
+    this.params_to_query = function (params) {
         var query = [];
 
-        if (!params){
+        if (!params) {
             return null;
         }
 
         //params['JsHttpRequest'] = (new Date().getTime())+'-xml';
         params['JsHttpRequest'] = '1-xml';
 
-        for (var key in params){
-            if (params.hasOwnProperty(key)){
+        for (var key in params) {
+            if (params.hasOwnProperty(key)) {
 
-                if (params[key] === false){
+                if (params[key] === false) {
                     params[key] = 0;
-                }else if (params[key] === true){
+                } else if (params[key] === true) {
                     params[key] = 1;
                 }
 
@@ -1261,51 +1271,54 @@ function common_xpcom(){
         return query.join('&');
     };
 
-    this.preload_images = function(){
+    this.preload_images = function () {
 
         this.load(
-
             {
-                'type'   : 'stb',
-                'action' : 'get_preload_images',
-                'gmode'  : resolution_prefix.substr(1)
+                'type': 'stb',
+                'action': 'get_preload_images',
+                'gmode': resolution_prefix.substr(1)
             },
 
-            function(result){
+            function (result) {
                 _debug('on get_preload_images', result);
-                if (result != null){
-                    for (var i=0; i<result.length; i++){
+                if (result != null) {
+                    for (var i = 0; i < result.length; i++) {
                         stb.images[i] = new Image();
                         stb.images[i].src = result[i];
-                        stb.images.onload = function(){};
+                        stb.images.onload = function () {
+                        };
                     }
                 }
             }
         );
     };
 
-    this.hashCode = function(s){
-        return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0);
+    this.hashCode = function (s) {
+        return s.split("").reduce(function (a, b) {
+            a = ((a << 5) - a) + b.charCodeAt(0);
+            return a & a
+        }, 0);
     };
 
-    this.get_saved_access_token = function(){
+    this.get_saved_access_token = function () {
         _debug('stb.get_saved_access_token');
 
-        if (stb.access_token){
+        if (stb.access_token) {
             return stb.access_token;
         }
 
-        var file = 'stalker_'+this.hashCode(window.location.origin+window.location.pathname);
+        var file = 'stalker_' + this.hashCode(window.location.origin + window.location.pathname);
 
-        if (!stb.LoadUserData){
+        if (!stb.LoadUserData) {
             return;
         }
 
         var data = stb.LoadUserData(file) || "{}";
 
-        try{
+        try {
             data = JSON.parse(data)
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
         data = data || {};
@@ -1313,20 +1326,20 @@ function common_xpcom(){
         return data.token;
     };
 
-    this.get_ad_id = function(){
+    this.get_ad_id = function () {
         _debug('stb.get_ad_id');
 
         var file = 'ad.json';
 
-        if (typeof(gSTB) == "undefined"){
+        if (typeof (gSTB) == "undefined") {
             return "";
         }
 
         var data = stb.LoadUserData(file) || "{}";
 
-        try{
+        try {
             data = JSON.parse(data)
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
 
@@ -1334,7 +1347,7 @@ function common_xpcom(){
 
         _debug('data', data);
 
-        if (!data.hasOwnProperty('tracking_id')){
+        if (!data.hasOwnProperty('tracking_id')) {
             data.tracking_id = md5(this.mac + (new Date().getTime()));
             stb.SaveUserData(file, JSON.stringify(data));
         }
@@ -1344,45 +1357,45 @@ function common_xpcom(){
         return data.tracking_id;
     };
 
-    this.save_access_token = function(){
+    this.save_access_token = function () {
         _debug('stb.save_access_token');
 
-        var file = 'stalker_'+this.hashCode(window.location.origin+window.location.pathname);
+        var file = 'stalker_' + this.hashCode(window.location.origin + window.location.pathname);
 
-        if (!stb.SaveUserData){
+        if (!stb.SaveUserData) {
             return;
         }
 
-        stb.SaveUserData(file, JSON.stringify({"token" : this.access_token}));
+        stb.SaveUserData(file, JSON.stringify({"token": this.access_token}));
     };
 
-    this.handshake = function(){
+    this.handshake = function () {
         _debug('stb.handshake');
 
         var prehash = stb.GetHashVersion1 ? stb.GetHashVersion1(this.type, this.version.substr(0, 56)) : 0;
 
         this.load(
             {
-                "type"    : "stb",
-                "action"  : "handshake",
-                "token"   : this.get_saved_access_token() || '',
-                "prehash" : prehash
+                "type": "stb",
+                "action": "handshake",
+                "token": this.get_saved_access_token() || '',
+                "prehash": prehash
             },
-            function(result){
+            function (result) {
                 _debug('on handshake', result);
                 this.access_token = result.token || '';
-                this.random       = result.random || '';
+                this.random = result.random || '';
 
                 this.not_valid_token = result.not_valid || 0;
 
                 _debug('this.access_token', this.access_token);
 
-                if (typeof(stbWebWindow) != 'undefined' && windowId != 1){
+                if (typeof (stbWebWindow) != 'undefined' && windowId != 1) {
                     stbWebWindow.messageSend(1, 'stalker:access_token', this.access_token);
                 }
 
                 if (window.self !== window.top) {
-                    parent.postMessage('access_token:'+this.access_token, '*');
+                    parent.postMessage('access_token:' + this.access_token, '*');
                 }
 
                 this.get_user_profile(false, prehash);
@@ -1391,50 +1404,65 @@ function common_xpcom(){
         )
     };
 
-    this.get_user_profile = function(auth_second_step, prehash){
+    this.get_user_profile = function (auth_second_step, prehash) {
         _debug('this.get_user_profile', auth_second_step, prehash);
 
-        if (['mag322', 'mag324', 'aurahd4'].indexOf(this.type.toLowerCase()) >= 0){
+        if (['mag322', 'mag324', 'aurahd4'].indexOf(this.type.toLowerCase()) >= 0) {
             var device_id = stb.GetUID ? stb.GetUID('device_id', '1729452065727304', 3) : '';
             var device_id2 = stb.GetUID ? (stb.GetUID(this.access_token) == stb.GetUID(this.access_token, this.access_token) ? '' : stb.GetUID('device_id', this.access_token, 5)) : '';
         }
 
-        if (['mag322', 'mag324', 'aurahd4'].indexOf(this.type.toLowerCase()) === -1 || !device_id || !device_id2){
+        if (['mag322', 'mag324', 'aurahd4'].indexOf(this.type.toLowerCase()) === -1 || !device_id || !device_id2) {
             device_id = stb.GetUID ? stb.GetUID() : '';
             device_id2 = stb.GetUID ? (stb.GetUID(this.access_token) == stb.GetUID(this.access_token, this.access_token) ? '' : stb.GetUID('device_id', this.access_token)) : '';
         }
 
-        var metrics = {mac:this.mac, sn:this.serial_number, model:this.type, type:"STB", uid:device_id2, random:this.random};
+        var metrics = {
+            mac: this.mac,
+            sn: this.serial_number,
+            model: this.type,
+            type: "STB",
+            uid: device_id2,
+            random: this.random
+        };
 
         _debug('metrics', JSON.stringify(metrics));
 
         this.load(
             {
-                'type'             : 'stb',
-                'action'           : 'get_profile',
-                'hd'               : this.hd,
-                'ver'              : this.version,
-                'num_banks'        : this.num_banks,
-                'sn'               : this.serial_number,
-                'stb_type'         : this.type,
-                'client_type'      : 'STB',
-                'image_version'    : this.image_version,
-                'video_out'        : (stb.GetHDMIConnectionState ? (stb.GetHDMIConnectionState() == 0 && window.innerHeight <= 576 ? "rca" : "hdmi") : ""),
-                'device_id'        : device_id,
-                'device_id2'       : device_id2,
-                'signature'        : stb.GetUID ? stb.GetUID(this.random) : '',
-                'auth_second_step' : auth_second_step ? 1 : 0,
-                'hw_version'       : this.hw_version,
-                'not_valid_token'  : this.not_valid_token ? 1 : 0,
-                'metrics'          : encodeURIComponent(JSON.stringify(metrics)),
-                'hw_version_2'     : stb.GetHashVersion1 ? stb.GetHashVersion1(JSON.stringify(metrics), this.random) : '',
-                'timestamp'        : Math.round(new Date().getTime()/1000),
-                'api_signature'    : typeof(gSTB) == 'undefined' ? 0 : (function(){var p=0;for(var d in gSTB){if(gSTB.hasOwnProperty(d)){p++}} return p})(),
-                'prehash'          : prehash
+                'type': 'stb',
+                'action': 'get_profile',
+                'hd': this.hd,
+                'ver': this.version,
+                'num_banks': this.num_banks,
+                'sn': this.serial_number,
+                'stb_type': this.type,
+                'client_type': 'STB',
+                'image_version': this.image_version,
+                'video_out': (stb.GetHDMIConnectionState ? (stb.GetHDMIConnectionState() == 0 && window.innerHeight <= 576 ? "rca" : "hdmi") : ""),
+                'device_id': device_id,
+                'device_id2': device_id2,
+                'signature': stb.GetUID ? stb.GetUID(this.random) : '',
+                'auth_second_step': auth_second_step ? 1 : 0,
+                'hw_version': this.hw_version,
+                'not_valid_token': this.not_valid_token ? 1 : 0,
+                'metrics': encodeURIComponent(JSON.stringify(metrics)),
+                'hw_version_2': stb.GetHashVersion1 ? stb.GetHashVersion1(JSON.stringify(metrics), this.random) : '',
+                'timestamp': Math.round(new Date().getTime() / 1000),
+                'api_signature': typeof (gSTB) == 'undefined' ? 0 : (function () {
+                    var p = 0;
+                    for (var d in gSTB) {
+                        if (gSTB.hasOwnProperty(d)) {
+                            p++
+                        }
+                    }
+                    return p
+                })(),
+                'prehash': prehash
             },
 
-            function(result){
-                if (result != null){
+            function (result) {
+                if (result != null) {
                     this.profile = result;
                     //this.user_init(result);
                     this.get_localization();
@@ -1446,19 +1474,19 @@ function common_xpcom(){
         )
     };
 
-    this.get_user_browser = function(){
+    this.get_user_browser = function () {
         var ua = navigator.userAgent.toLowerCase();
 
         if (ua.indexOf("webkit") != -1) {
             return "webkit"
-        }else if (ua.indexOf("firefox") != -1){
+        } else if (ua.indexOf("firefox") != -1) {
             return "firefox"
-        }else{
+        } else {
             return "na"
         }
     };
 
-    this.check_image_version = function(){
+    this.check_image_version = function () {
 
         _debug('this.image_version:', this.image_version);
         _debug('this.image_desc:', this.image_desc);
@@ -1467,49 +1495,49 @@ function common_xpcom(){
         _debug('this.hw_version:', this.hw_version);
 
         _debug('checking conditions');
-        _debug('typeof stb.user[autoupdate]', typeof(stb.user['autoupdate']));
+        _debug('typeof stb.user[autoupdate]', typeof (stb.user['autoupdate']));
         _debug('stb.user[autoupdate] is array', stb.user['autoupdate'] && stb.user['autoupdate'] instanceof Array);
 
-        if (stb.user['autoupdate'] && stb.user['autoupdate'] instanceof Array){
-            stb.user['autoupdate'].some(function(element){
+        if (stb.user['autoupdate'] && stb.user['autoupdate'] instanceof Array) {
+            stb.user['autoupdate'].some(function (element) {
                 return stb.check_update(element);
             });
         }
     };
 
-    this.check_update = function(params){
+    this.check_update = function (params) {
         _debug('stb.check_update', params);
 
         if (typeof params == 'object' &&
             (
                 (params.require_image_version != '' && params.require_image_version != this.image_version) ||
-                (params.require_image_date != ''    && params.require_image_date != this.image_date)
+                (params.require_image_date != '' && params.require_image_date != this.image_date)
             ) &&
             (
-                (params.image_version_contains == ''     || params.image_version_contains == this.image_version) &&
+                (params.image_version_contains == '' || params.image_version_contains == this.image_version) &&
                 (params.image_description_contains == '' || this.image_desc.indexOf(params.image_description_contains) != -1) &&
-                (params.hardware_version_contains == ''  || this.hw_version.indexOf(params.hardware_version_contains) != -1)
+                (params.hardware_version_contains == '' || this.hw_version.indexOf(params.hardware_version_contains) != -1)
             )
-           ){
+        ) {
 
             _debug('checking conditions 2');
 
-            if ((this.num_banks == 2 || ['MAG256', 'MAG257', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG425'].indexOf(this.type) >= 0) && params.update_type == 'http_update'){
-                try{
+            if ((this.num_banks == 2 || ['MAG256', 'MAG257', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG425'].indexOf(this.type) >= 0) && params.update_type == 'http_update') {
+                try {
                     _debug('this.user[update_url]', this.user['update_url']);
 
                     _debug('stb.user[autoupdate]', stb.user['autoupdate']);
 
-                    this.user['update_url'] = this.user['update_url'].replace(/\/imageupdate$/, '/'+params.prefix+'imageupdate');
+                    this.user['update_url'] = this.user['update_url'].replace(/\/imageupdate$/, '/' + params.prefix + 'imageupdate');
 
                     _debug('this.user[update_url] 2', this.user['update_url']);
 
                     stbUpdate.startAutoUpdate(this.user['update_url'], false);
 
-                }catch(e){
+                } catch (e) {
                     _debug(e);
                 }
-            }else if (params.update_type == 'reboot_dhcp'){
+            } else if (params.update_type == 'reboot_dhcp') {
                 _debug('RebootDHCP');
                 stb.ExecAction('RebootDHCP');
             }
@@ -1520,7 +1548,7 @@ function common_xpcom(){
         return false;
     };
 
-    this.user_init = function(user_data){
+    this.user_init = function (user_data) {
 
         stb.loader.add_pos(this.load_step, 'call stb.user_init');
 
@@ -1532,27 +1560,27 @@ function common_xpcom(){
         _debug('this.type', this.type);
         _debug('screen.height', screen.height);
 
-        if (this.user['deny_720p_gmode_on_mag200'] && this.type == 'MAG200' && screen.height >= 720){
+        if (this.user['deny_720p_gmode_on_mag200'] && this.type == 'MAG200' && screen.height >= 720) {
             stb.ExecAction('graphicres 720');
             _debug('Reboot');
             stb.ExecAction('reboot');
         }
 
-        try{
+        try {
             gSTB.StandByMode = 1; // always active stand-by
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
 
         screensaver.init();
 
-        if (this.user['allowed_stb_types'] && !this.profile['strict_stb_type_check'] && this.user['allowed_stb_types'].indexOf('aurahd') !== -1){
+        if (this.user['allowed_stb_types'] && !this.profile['strict_stb_type_check'] && this.user['allowed_stb_types'].indexOf('aurahd') !== -1) {
             var cut_type = this.type.indexOf('AuraHD') != -1 ? 'AuraHD' : this.type;
-        }else{
+        } else {
             cut_type = this.type;
         }
 
-        if (this.user['allowed_stb_types'] && this.user['allowed_stb_types'].indexOf(cut_type.toLowerCase()) == -1 && !_GET['debug_key']){
+        if (this.user['allowed_stb_types'] && this.user['allowed_stb_types'].indexOf(cut_type.toLowerCase()) == -1 && !_GET['debug_key']) {
 
             stb.loader.stop();
             this.cut_off(get_word('stb_type_not_supported'));
@@ -1560,21 +1588,21 @@ function common_xpcom(){
             return;
         }
 
-        if (['MAG200', 'MAG256', 'MAG257', 'MAG260', 'MAG322', 'MAG323', 'MAG324', 'MAG324C', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG424', 'MAG424А', 'MAG425', 'AuraHD4', 'IM2100', 'IM2101', 'IM2102', 'IM4410'].indexOf(this.type) === -1  && !_GET['debug_key']){
+        if (['MAG200', 'MAG256', 'MAG257', 'MAG260', 'MAG322', 'MAG323', 'MAG324', 'MAG324C', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'MAG424', 'MAG424А', 'MAG425', 'AuraHD4', 'IM2100', 'IM2101', 'IM2102', 'IM4410'].indexOf(this.type) === -1 && !_GET['debug_key']) {
             var match = /Player Engine version: (\S+)/.exec(this.version);
             _debug('match', match);
 
-            if (match && match.length == 2){
+            if (match && match.length == 2) {
                 var player_version = parseInt((match[1] + '').replace('0x', '').replace(/[^a-f0-9]/gi, ''), 16);
                 _debug('player_version', player_version);
             }
 
-            if (!match || match.length != 2 || player_version < 1382){
+            if (!match || match.length != 2 || player_version < 1382) {
 
                 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', 'MAG270', 'MAG275', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'WR320', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1) {
                     this.check_image_version();
                 }
 
@@ -1583,31 +1611,31 @@ function common_xpcom(){
         }
 
         if (!this.ntp_server && this.user['stb_ntp_server']
-        || this.ntp_server && this.user['stb_ntp_server'] && this.ntp_server != this.user['stb_ntp_server'] && this.user['overwrite_stb_ntp_server']){
-            _debug('set ntpurl '+this.user['stb_ntp_server']);
-            try{
-                stb.RDir('setenv ntpurl '+this.user['stb_ntp_server']);
+            || this.ntp_server && this.user['stb_ntp_server'] && this.ntp_server != this.user['stb_ntp_server'] && this.user['overwrite_stb_ntp_server']) {
+            _debug('set ntpurl ' + this.user['stb_ntp_server']);
+            try {
+                stb.RDir('setenv ntpurl ' + this.user['stb_ntp_server']);
                 _debug('reboot');
                 stb.ExecAction('reboot');
                 return;
-            }catch(e){
+            } catch (e) {
                 _debug(e);
             }
         }
 
-        if (this.user['store_auth_data_on_stb']){
+        if (this.user['store_auth_data_on_stb']) {
             this.save_access_token();
         }
 
-        if (this.user['status'] == 2){
+        if (this.user['status'] == 2) {
 
             // redirect to the new launcher without auth
-            if (this.user['template'] && this.user['template'].indexOf('smart_launcher') != -1 && single_module.length == 0){
+            if (this.user['template'] && this.user['template'].indexOf('smart_launcher') != -1 && single_module.length == 0) {
                 _debug('redirect to the new launcher');
                 window.stop();
                 document.body.hide();
-                _debug(this.user['launcher_url']+'?config=' + encodeURIComponent(this.user['launcher_profile_url']+'?uid=' + this.user['id'] + '&language='+this.stb_lang_orig+'&_='+(new Date().getTime())));
-                window.location = this.user['launcher_url']+'?config=' + encodeURIComponent(this.user['launcher_profile_url']+'?uid=' + this.user['id'] + '&language='+this.stb_lang_orig+'&_='+(new Date().getTime()));
+                _debug(this.user['launcher_url'] + '?config=' + encodeURIComponent(this.user['launcher_profile_url'] + '?uid=' + this.user['id'] + '&language=' + this.stb_lang_orig + '&_=' + (new Date().getTime())));
+                window.location = this.user['launcher_url'] + '?config=' + encodeURIComponent(this.user['launcher_profile_url'] + '?uid=' + this.user['id'] + '&language=' + this.stb_lang_orig + '&_=' + (new Date().getTime()));
                 return;
             }
 
@@ -1618,8 +1646,8 @@ function common_xpcom(){
             this.auth_dialog.show();
             loader.append('alert');
 
-        }else if (this.user['status'] == 0){
-            try{
+        } else if (this.user['status'] == 0) {
+            try {
 
                 this.usbdisk.init();
 
@@ -1632,17 +1660,17 @@ function common_xpcom(){
                 this.player.ad_indication.init();
                 this.player.ad_skip_indication.init();
 
-                if (this.user.hasOwnProperty('cas_type')){
+                if (this.user.hasOwnProperty('cas_type')) {
                     this.player.set_cas(this.user);
                 }
 
-                if (this.user.hasOwnProperty('hls_fast_start')){
+                if (this.user.hasOwnProperty('hls_fast_start')) {
                     this.player.set_hls_fast_start(this.user.hls_fast_start);
                 }
 
                 this.user.fav_itv_on = parseInt(this.user.fav_itv_on, 10);
 
-                this.user['aspect']      = parseInt(this.user['aspect'],    10);
+                this.user['aspect'] = parseInt(this.user['aspect'], 10);
                 stb.player.ch_aspect_idx = this.aspect_array.getIdxByVal('mode', this.user['aspect']);
 
                 this.user['audio_out'] = parseInt(this.user['audio_out'], 10);
@@ -1650,10 +1678,10 @@ function common_xpcom(){
                 stb.user['playback_limit'] = parseInt(this.user['playback_limit'], 10);
 
                 this.user['screensaver_delay'] = parseInt(this.user['screensaver_delay'], 10);
-                this.user['watchdog_timeout']  = parseInt(this.user['watchdog_timeout'], 10);
-                this.user['tv_playback_retry_limit']  = parseInt(this.user['tv_playback_retry_limit'], 10);
-                this.user['timeslot']          = parseFloat(this.user['timeslot']);
-                this.user['timeslot_ratio']    = parseFloat(this.user['timeslot_ratio']);
+                this.user['watchdog_timeout'] = parseInt(this.user['watchdog_timeout'], 10);
+                this.user['tv_playback_retry_limit'] = parseInt(this.user['tv_playback_retry_limit'], 10);
+                this.user['timeslot'] = parseFloat(this.user['timeslot']);
+                this.user['timeslot_ratio'] = parseFloat(this.user['timeslot_ratio']);
 
                 this.auth_access = this.user['auth_access'] ? true : false;
 
@@ -1663,9 +1691,9 @@ function common_xpcom(){
 
                 stb.advert.config = this.user['advert'] || [];
 
-                if (stb.advert.config){
-                    for (var i=0; i<stb.advert.config.length; i++){
-                        if (stb.advert.config[i]['places'][104]){
+                if (stb.advert.config) {
+                    for (var i = 0; i < stb.advert.config.length; i++) {
+                        if (stb.advert.config[i]['places'][104]) {
                             stb.user['force_ch_link_check'] = true;
                             break;
                         }
@@ -1674,24 +1702,24 @@ function common_xpcom(){
 
                 _debug('stb.user[force_ch_link_check]', stb.user['force_ch_link_check']);
 
-                if (!this.user['update_url']){
-                    try{
+                if (!this.user['update_url']) {
+                    try {
                         this.user['update_url'] = stb.RDir('getenv update_url').clearnl();
-                    }catch(err){
+                    } catch (err) {
                         _debug(err);
                     }
                 }
 
                 var aspect_idx = this.aspect_array.getIdxByVal('alias', this.profile['tv_channel_default_aspect']);
-                if (aspect_idx === null){
+                if (aspect_idx === null) {
                     this.profile['tv_channel_default_aspect'] = 0x10;
-                }else{
+                } else {
                     this.profile['tv_channel_default_aspect'] = this.aspect_array[aspect_idx].mode;
                 }
 
                 _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', 'MAG270', 'MAG275', 'MAG322', 'MAG323', 'MAG324', 'MAG325', 'MAG349', 'MAG350', 'MAG351', 'MAG352', 'WR320', 'IP_STB_HD'].indexOf(this.type) >= 0 || this.type.indexOf('AuraHD') != -1) {
                     this.check_image_version();
                 }
 
@@ -1701,11 +1729,11 @@ function common_xpcom(){
 
                 this.locale = this.user.locale;
 
-                if (!this.user['pri_audio_lang']){
+                if (!this.user['pri_audio_lang']) {
                     this.user['pri_audio_lang'] = this.lang_map.hasOwnProperty(this.stb_lang) ? this.lang_map[this.stb_lang] : '';
                     this.user['sec_audio_lang'] = this.lang_map.hasOwnProperty(this.user.stb_lang) ? this.lang_map[this.user.stb_lang] : '';
 
-                    if (this.user['pri_audio_lang'] == this.user['sec_audio_lang']){
+                    if (this.user['pri_audio_lang'] == this.user['sec_audio_lang']) {
                         var default_lang = this.user['default_locale'].substr(0, 2);
                         _debug('default_lang', default_lang);
                         this.user['sec_audio_lang'] = this.lang_map.hasOwnProperty(default_lang) ? this.lang_map[default_lang] : '';
@@ -1717,7 +1745,7 @@ function common_xpcom(){
                     this.user['sec_audio_lang']
                 );
 
-                if (!this.user['pri_subtitle_lang'] && !this.user['sec_subtitle_lang'] && stb.profile['always_enabled_subtitles']){
+                if (!this.user['pri_subtitle_lang'] && !this.user['sec_subtitle_lang'] && stb.profile['always_enabled_subtitles']) {
                     this.user['pri_subtitle_lang'] = this.user['pri_audio_lang'];
                     this.user['sec_subtitle_lang'] = this.user['sec_audio_lang'];
                 }
@@ -1735,11 +1763,11 @@ function common_xpcom(){
 
                 this.check_additional_services(this.user['additional_services_on']);
 
-                if (this.aspect_idx == null){
+                if (this.aspect_idx == null) {
                     this.aspect_idx = 0;
                 }
 
-                try{
+                try {
 
                     var timezone = stb.RDir('getenv timezone_conf');
 
@@ -1750,16 +1778,16 @@ function common_xpcom(){
 
                     _debug('timezone', timezone);
 
-                    if (this.user['default_timezone'] && !timezone){
-                        _debug('setenv timezone_conf '+this.user['default_timezone']);
-                        stb.RDir('setenv timezone_conf '+this.user['default_timezone']);
+                    if (this.user['default_timezone'] && !timezone) {
+                        _debug('setenv timezone_conf ' + this.user['default_timezone']);
+                        stb.RDir('setenv timezone_conf ' + this.user['default_timezone']);
                     }
 
                     _debug('stb.GetBrightness before', stb.GetBrightness());
                     _debug('stb.GetContrast before', stb.GetContrast());
                     _debug('stb.GetSaturation before', stb.GetSaturation());
 
-                    if (this.stb_type == 'MAG200'){
+                    if (this.stb_type == 'MAG200') {
                         stb.SetBrightness(127);
                         stb.SetContrast(-27);
                         stb.SetSaturation(100);
@@ -1780,13 +1808,13 @@ function common_xpcom(){
                     stb.EnableAppButton && stb.EnableAppButton(false);
 
                     //stb.SetWebProxy(string proxy_addr,int proxy_port,string user_name,string passwd,string exclude_list);
-                    if (this.user['web_proxy_host']){
+                    if (this.user['web_proxy_host']) {
                         stb.SetWebProxy && stb.SetWebProxy(this.user['web_proxy_host'], this.user['web_proxy_port'], this.user['web_proxy_user'], this.user['web_proxy_pass'], this.user['web_proxy_exclude_list']);
                     }
 
                     stb.EnableServiceButton(!!this.user['enable_service_button']);
 
-                    if (gSTB.SetSettingsInitAttr){
+                    if (gSTB.SetSettingsInitAttr) {
                         gSTB.SetSettingsInitAttr(JSON.stringify({
                             url: '/home/web/system/settings/index.html',
                             backgroundColor: '#000'
@@ -1795,7 +1823,7 @@ function common_xpcom(){
 
                     stb.EnableVKButton(true);
 
-                    if (gSTB.SetLedIndicatorLevels && this.user.hasOwnProperty('default_led_level') && this.user.hasOwnProperty('standby_led_level')){
+                    if (gSTB.SetLedIndicatorLevels && this.user.hasOwnProperty('default_led_level') && this.user.hasOwnProperty('standby_led_level')) {
                         _debug('this.user[default_led_level]', parseInt(this.user['default_led_level'], 10));
                         _debug('this.user[standby_led_level]', parseInt(this.user['standby_led_level'], 10));
                         gSTB.SetLedIndicatorMode(1);
@@ -1803,18 +1831,18 @@ function common_xpcom(){
                     }
 
                     var mc_proxy_enabled = stb.RDir('getenv mc_proxy_enabled');
-                    var mc_proxy_url     = stb.RDir('getenv mc_proxy_url');
+                    var mc_proxy_url = stb.RDir('getenv mc_proxy_url');
 
-                    if (mc_proxy_enabled == 'true' && mc_proxy_url){
+                    if (mc_proxy_enabled == 'true' && mc_proxy_url) {
                         this.player.mc_proxy_url = mc_proxy_url;
                     }
 
-                    if (typeof(stb.SetCheckSSLCertificate) == 'function' && typeof(this.profile['check_ssl_certificate']) != 'undefined' && this.profile['check_ssl_certificate'] == 0) {
+                    if (typeof (stb.SetCheckSSLCertificate) == 'function' && typeof (this.profile['check_ssl_certificate']) != 'undefined' && this.profile['check_ssl_certificate'] == 0) {
                         _debug('SetCheckSSLCertificate = 0');
                         stb.SetCheckSSLCertificate(0);
                     }
 
-                }catch(e){
+                } catch (e) {
                     _debug(e);
                 }
 
@@ -1825,27 +1853,29 @@ function common_xpcom(){
                 if (single_module.length && single_module.indexOf('tv') == -1) {
                     stb.loader.add_pos(this.load_step, 'skip channels loading');
                     stb.loader.add_pos(this.load_step, 'skip fav_channels loading');
-                }else{
-                    this.load_channels();
+                } else {
+                    //this.load_channels();
+                    //this.load_genre_channels();
+                    this.load_channels_simple();
                     this.load_fav_channels();
                     this.load_fav_itv();
                 }
 
                 this.load_recordings();
 
-            }catch(e){
+            } catch (e) {
                 _debug(e);
             }
-        }else if(this.user['status'] == 1){
+        } else if (this.user['status'] == 1) {
 
-            if (this.ntp_server && this.user.hasOwnProperty('ntp_wait_timeout') && this.ntp_wait_time <= this.user['ntp_wait_timeout']){
+            if (this.ntp_server && this.user.hasOwnProperty('ntp_wait_timeout') && this.ntp_wait_time <= this.user['ntp_wait_timeout']) {
 
                 _debug('wait for ntp');
                 _debug('this.ntp_wait_time', this.ntp_wait_time);
 
-                window.setTimeout(function(){
+                window.setTimeout(function () {
                     stb.get_user_profile();
-                }, 10*1000);
+                }, 10 * 1000);
 
                 this.ntp_wait_time += 10;
 
@@ -1857,22 +1887,22 @@ function common_xpcom(){
             this.cut_off(this.user.hasOwnProperty('block_msg') ? this.user['block_msg'] : '');
             loader.append('alert');
 
-            if (this.user.hasOwnProperty('enable_settings') && this.user['enable_settings']){
+            if (this.user.hasOwnProperty('enable_settings') && this.user['enable_settings']) {
                 stb.EnableServiceButton(true);
             }
 
-            if (this.user['portal_disabled']){
+            if (this.user['portal_disabled']) {
 
-                this.portal_status_interval = window.setInterval(function(){
+                this.portal_status_interval = window.setInterval(function () {
                     stb.load(
                         {
-                            "type"   : "stb",
-                            "action" : "check_portal_status"
+                            "type": "stb",
+                            "action": "check_portal_status"
                         },
-                        function(result){
+                        function (result) {
                             _debug('on check_portal_status', result);
 
-                            if (result){
+                            if (result) {
                                 window.clearInterval(stb.portal_status_interval);
                                 window.location = window.location;
                             }
@@ -1885,14 +1915,16 @@ function common_xpcom(){
         this.watchdog.run(this.user['watchdog_timeout'], this.user['timeslot']);
     };
 
-    this.on_first_menu_show = function(){};
+    this.on_first_menu_show = function () {
+    };
+
+    this.post_loading_handle = function () {
 
-    this.post_loading_handle = function(){
         _debug('stb.post_loading_handle');
 
         _debug('this.user[display_menu_after_loading]', this.user['display_menu_after_loading']);
 
-        if (this.GetHDMIConnectionState){
+        if (this.GetHDMIConnectionState) {
             this.hdmi_on = this.GetHDMIConnectionState() == 2;
         }
 
@@ -1900,27 +1932,40 @@ function common_xpcom(){
 
         this.key_lock = false;
 
-        if (single_module.length > 0 && module[single_module[0]]){
+        if (single_module.length > 0 && module[single_module[0]]) {
 
             stb.cur_single_module = single_module[0];
 
-            if (module[single_module[0]]._show){
+            if (module[single_module[0]]._show) {
                 module[single_module[0]]._show();
-            }else if (module[single_module[0]].show){
+            } else if (module[single_module[0]].show) {
                 module[single_module[0]].show();
             }
 
             return;
         }
-
-        if (module.tv){
+        var timestamp = Date.parse(new Date());
+        console.log("post_loading_handle Enter module.tv");
+        console.log(timestamp);
+        console.log(this.user['display_menu_after_loading']);
+        console.log(focus_module);
+        console.log(!this.player.channels);
+        console.log(this.player.channels.length);
+        console.log(!module.tv);
+        if (module.tv) {
             this.player.init_first_channel();
         }
 
-        if (this.user['display_menu_after_loading'] || focus_module || !this.player.channels || this.player.channels.length == 0 || !module.tv){
+        if (this.user['display_menu_after_loading'] || focus_module || !this.player.channels || this.player.channels.length == 0 || !module.tv) {
+            timestamp = Date.parse(new Date());
+            console.log("post_loading_handle Enter show menu");
+            console.log(timestamp);
             main_menu.show();
             this.on_first_menu_show();
-        }else{
+        } else {
+            timestamp = Date.parse(new Date());
+            console.log("post_loading_handle Enter play");
+            console.log(timestamp);
             this.player.first_play();
         }
     };
@@ -1929,45 +1974,45 @@ function common_xpcom(){
      * @deprecated
      * @param storages
      */
-    this.mount_home_dir = function(storages){
+    this.mount_home_dir = function (storages) {
         _debug('stb.mount_home_dir: ', storages);
 
         this.set_storages(storages);
 
         stb.loader.add_pos(this.load_step, 'call stb.mount_home_dir');
 
-        for(var i in storages){
-            if (storages.hasOwnProperty(i)){
-                stb.ExecAction('make_dir /media/'+storages[i]['storage_name']);
+        for (var i in storages) {
+            if (storages.hasOwnProperty(i)) {
+                stb.ExecAction('make_dir /media/' + storages[i]['storage_name']);
 
-                var mount_cmd = '"'+storages[i]['storage_ip']+':'+storages[i]['nfs_home_path']+stb.mac+'" /media/'+storages[i]['storage_name'];
-                _debug('mount_cmd: '+mount_cmd);
+                var mount_cmd = '"' + storages[i]['storage_ip'] + ':' + storages[i]['nfs_home_path'] + stb.mac + '" /media/' + storages[i]['storage_name'];
+                _debug('mount_cmd: ' + mount_cmd);
 
-                try{
-                    stb.ExecAction('mount_dir '+mount_cmd);
-                }catch(e){
+                try {
+                    stb.ExecAction('mount_dir ' + mount_cmd);
+                } catch (e) {
                     _debug(e);
                 }
             }
         }
     };
 
-    this.set_storages = function(storages){
+    this.set_storages = function (storages) {
         _debug('stb.set_storages', storages);
 
         this.storages = this.user['storages'] = storages;
     };
 
-    this.remount_storages = function(callback){
+    this.remount_storages = function (callback) {
         _debug('stb.remount_storages');
 
         stb.load(
             {
-                "type"   : "stb",
-                "action" : "get_storages"
+                "type": "stb",
+                "action": "get_storages"
             },
 
-            function(result){
+            function (result) {
                 _debug('storages', result);
 
                 this.set_storages(result);
@@ -1981,12 +2026,12 @@ function common_xpcom(){
         );
     };
 
-    this.Mount = function(link_cmd){
+    this.Mount = function (link_cmd) {
         _debug('stb.Mount', link_cmd);
 
-        var mounted_storage = link_cmd.replace(/[\s\S]*\/media\/(.*)\/(.*)/ , "$1");
+        var mounted_storage = link_cmd.replace(/[\s\S]*\/media\/(.*)\/(.*)/, "$1");
 
-        if (mounted_storage == this.mounted_storage){
+        if (mounted_storage == this.mounted_storage) {
             _debug('clear Umount Timeout', mounted_storage);
             window.clearTimeout(stb.player.umount_timer);
         }
@@ -1994,37 +2039,37 @@ function common_xpcom(){
         this.mounted_storage = mounted_storage;
 
         _debug('stb.mounted_storage', this.mounted_storage);
-        try{
-            gSTB.ExecAction('make_dir /media/'+this.mounted_storage);
+        try {
+            gSTB.ExecAction('make_dir /media/' + this.mounted_storage);
             var mount_cmd = '"' + this.storages[this.mounted_storage]['storage_ip'] + ':' + this.storages[this.mounted_storage]['nfs_home_path'] + this.mac + '" /media/' + this.mounted_storage;
-            gSTB.ExecAction('mount_dir '+mount_cmd);
-        }catch(e){
+            gSTB.ExecAction('mount_dir ' + mount_cmd);
+        } catch (e) {
             _debug(e);
         }
     };
 
-    this.Umount = function(storage){
+    this.Umount = function (storage) {
         _debug('stb.Umount', storage);
         //_debug('stb.mounted_storage', this.mounted_storage);
 
-        if (storage){
-            try{
-                gSTB.ExecAction('umount_dir /media/'+storage);
+        if (storage) {
+            try {
+                gSTB.ExecAction('umount_dir /media/' + storage);
                 //this.mounted_storage = '';
-            }catch(e){
+            } catch (e) {
                 _debug(e);
             }
         }
     };
 
-    this.switchPower = function(){
+    this.switchPower = function () {
         _debug('stb.switchPower()');
 
-        if (stb.GetStandByStatus){
+        if (stb.GetStandByStatus) {
             this.power_off = stb.GetStandByStatus();
         }
 
-        if(this.power_off){
+        if (this.power_off) {
             //this.StandBy(0);
             this.power_off = false;
             keydown_observer.emulate_key(key.MENU);
@@ -2032,14 +2077,14 @@ function common_xpcom(){
 
             this.StandBy(0);
 
-            if (!this.user['display_menu_after_loading'] && !module.blocking.on){
+            if (!this.user['display_menu_after_loading'] && !module.blocking.on) {
                 main_menu.hide();
                 stb.player.play_last();
             }
 
             screensaver.toggle.call(screensaver);
 
-        }else{
+        } else {
             keydown_observer.emulate_key(key.MENU);
             this.StandBy(1);
             this.power_off = true;
@@ -2050,12 +2095,12 @@ function common_xpcom(){
         }
     };
 
-    this.get_image_version = function(){
+    this.get_image_version = function () {
         _debug('get_image_version');
 
         var ver = '';
 
-        try{
+        try {
             var full_ver = stb.RDir('Img_Ver');
 
             _debug('full_ver:', full_ver);
@@ -2064,59 +2109,59 @@ function common_xpcom(){
 
             var short_ver = full_ver.replace(pattern, "$1");
 
-            if (short_ver.length < 30){
+            if (short_ver.length < 30) {
                 ver = short_ver.clearnl();
             }
 
             _debug('ver:', ver);
 
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
 
         return ver;
     };
 
-    this.check_graphic_res = function(){
+    this.check_graphic_res = function () {
         _debug('check_graphic_res');
 
-        try{
+        try {
 
             var res = {
-                "r480" :{
-                    "w"        : 720,
-                    "h"        : 480,
-                    "window_w" : 720,
-                    "window_h" : 480,
-                    "prefix"   : '_480'
+                "r480": {
+                    "w": 720,
+                    "h": 480,
+                    "window_w": 720,
+                    "window_h": 480,
+                    "prefix": '_480'
                 },
-                "r576" :{
-                    "w"        : 720,
-                    "h"        : 576,
-                    "window_w" : 720,
-                    "window_h" : 576,
-                    "prefix"   : ''
+                "r576": {
+                    "w": 720,
+                    "h": 576,
+                    "window_w": 720,
+                    "window_h": 576,
+                    "prefix": ''
                 },
-                "r720" : {
-                    "w"        : 1280,
-                    "h"        : 720,
-                    "window_w" : 1280,
-                    "window_h" : 720,
-                    "prefix"   : '_720'
+                "r720": {
+                    "w": 1280,
+                    "h": 720,
+                    "window_w": 1280,
+                    "window_h": 720,
+                    "prefix": '_720'
 
                 },
-                "r1080" : {
-                    "w"        : 1920,
-                    "h"        : 1080,
-                    "window_w" : 1280,
-                    "window_h" : 720,
-                    "prefix"   : '_720'
+                "r1080": {
+                    "w": 1920,
+                    "h": 1080,
+                    "window_w": 1280,
+                    "window_h": 720,
+                    "prefix": '_720'
                 }
             };
 
-            if (typeof(Proxy) !== "undefined" && gSTB && typeof(gSTB.prototype) === "function"){
+            if (typeof (Proxy) !== "undefined" && gSTB && typeof (gSTB.prototype) === "function") {
                 var gres = window.innerHeight;
-            }else{
+            } else {
                 gres = screen.height;
             }
 
@@ -2124,61 +2169,61 @@ function common_xpcom(){
 
             _debug('gres', gres);
 
-            if (gres == 1080 && !window.referrer){
+            if (gres == 1080 && !window.referrer) {
                 stb.ExecAction('graphicres 1280');
                 _debug('Reboot');
                 stb.ExecAction('reboot');
-            }else if (!res["r"+gres]){
+            } else if (!res["r" + gres]) {
                 stb.ExecAction('graphicres 720');
                 debug('Reboot');
                 stb.ExecAction('reboot');
             }
 
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
     };
 
-    this.resize_window = function(){
+    this.resize_window = function () {
         _debug('resize_window');
 
-        try{
+        try {
 
             var res = {
-                "r480" :{
-                    "w"        : 720,
-                    "h"        : 480,
-                    "window_w" : 720,
-                    "window_h" : 480,
-                    "prefix"   : '_480'
+                "r480": {
+                    "w": 720,
+                    "h": 480,
+                    "window_w": 720,
+                    "window_h": 480,
+                    "prefix": '_480'
                 },
-                "r576" :{
-                    "w"        : 720,
-                    "h"        : 576,
-                    "window_w" : 720,
-                    "window_h" : 576,
-                    "prefix"   : ''
+                "r576": {
+                    "w": 720,
+                    "h": 576,
+                    "window_w": 720,
+                    "window_h": 576,
+                    "prefix": ''
                 },
-                "r720" : {
-                    "w"        : 1280,
-                    "h"        : 720,
-                    "window_w" : 1280,
-                    "window_h" : 720,
-                    "prefix"   : '_720'
+                "r720": {
+                    "w": 1280,
+                    "h": 720,
+                    "window_w": 1280,
+                    "window_h": 720,
+                    "prefix": '_720'
 
                 },
-                "r1080" : {
-                    "w"        : 1920,
-                    "h"        : 1080,
-                    "window_w" : 1920,
-                    "window_h" : 1080,
-                    "prefix"   : '_720'
+                "r1080": {
+                    "w": 1920,
+                    "h": 1080,
+                    "window_w": 1920,
+                    "window_h": 1080,
+                    "prefix": '_720'
                 }
             };
 
-            if (typeof(Proxy) !== "undefined" && gSTB && typeof(gSTB.prototype) === "function"){
+            if (typeof (Proxy) !== "undefined" && gSTB && typeof (gSTB.prototype) === "function") {
                 var gres = window.innerHeight;
-            }else{
+            } else {
                 gres = screen.height;
             }
 
@@ -2186,32 +2231,31 @@ function common_xpcom(){
 
             _debug('gres', gres);
 
-            if (res["r"+gres]){
+            if (res["r" + gres]) {
 
-                resolution_prefix = res["r"+gres].prefix;
+                resolution_prefix = res["r" + gres].prefix;
                 _debug('resolution_prefix', resolution_prefix);
 
-                window.resizeTo(res["r"+gres].window_w, res["r"+gres].window_h);
+                window.resizeTo(res["r" + gres].window_w, res["r" + gres].window_h);
 
-                _debug('window.moveTo', (res["r"+gres].w - res["r"+gres].window_w)/2, (res["r"+gres].h - res["r"+gres].window_h)/2);
-                window.moveTo((res["r"+gres].w - res["r"+gres].window_w)/2, (res["r"+gres].h - res["r"+gres].window_h)/2);
+                _debug('window.moveTo', (res["r" + gres].w - res["r" + gres].window_w) / 2, (res["r" + gres].h - res["r" + gres].window_h) / 2);
+                window.moveTo((res["r" + gres].w - res["r" + gres].window_w) / 2, (res["r" + gres].h - res["r" + gres].window_h) / 2);
             }
-        }catch(e){
+        } catch (e) {
             _debug(e);
         }
     };
 
-    this.load_channels = function(){
+    this.load_channels = function () {
 
         this.load(
-
             {
-                'type'  : 'itv',
+                'type': 'itv',
                 'action': 'get_all_channels',
                 'force_ch_link_check': stb.user['force_ch_link_check']
             },
 
-            function(result){
+            function (result) {
                 _debug('all_channels', result);
 
                 stb.loader.add_pos(this.load_step, 'channels loaded');
@@ -2223,24 +2267,24 @@ function common_xpcom(){
                 _debug('this.player.cur_media_item', this.player.cur_media_item);
                 _debug('this.player.cur_tv_item', this.player.cur_tv_item);
 
-                if (this.player.is_tv){
+                if (this.player.is_tv) {
 
                     var ch_idx = this.player.channels.getIdxByVal('id', this.player.cur_media_item.id);
 
                     _debug('ch_idx', ch_idx);
 
-                    if (ch_idx !== null){
+                    if (ch_idx !== null) {
                         this.player.cur_media_item = this.player.cur_tv_item = this.player.channels[ch_idx];
 
                         _debug('this.player.cur_tv_item', this.player.cur_tv_item);
 
-                        if (this.player.cur_tv_item.lock != '1'){
+                        if (this.player.cur_tv_item.lock != '1') {
                             this.player.last_not_locked_tv_item = this.player.cur_tv_item;
                         }
 
                         _debug('this.player.on', this.player.on);
 
-                        if (this.player.on){
+                        if (this.player.on) {
                             this.player.play(this.player.cur_tv_item);
                         }
                     }
@@ -2254,18 +2298,243 @@ function common_xpcom(){
         )
     };
 
-    this.load_fav_channels = function(){
+    this.load_channels_simple = function () {
 
         this.load(
+            {
+                'type': 'itv',
+                'c': stb.user.last_itv_id,
+                'n': this.player.maxPageNumber,
+                'action': 'get_all_channels_simple',
+                'force_ch_link_check': stb.user['force_ch_link_check']
+            },
+
+            function (result) {
+                _debug('all_channels_simple', result);
+                this.player.channels = [];
+                stb.loader.add_pos(this.load_step, 'channels loaded');
+                for (var i = 0; i < result.data.length; i++) {
+                    var channel = result.data[i];
+                    channel['id'] = channel['i'];
+                    channel['name'] = channel['a'];
+                    channel['number'] = channel['n'];
+                    channel['tv_genre_id'] = channel['g'];
+                    delete channel['i'];
+                    delete channel['a'];
+                    delete channel['n'];
+                    delete channel['g'];
+                    this.player.channels.push(channel);
+
+                }
+
+                this.player.pageListInit(this.player.maxPageNumber, result.total_items);
+
+                var page = result.cur_page;
+                this.player.pageListSetPageStatus(page, 1);
+
+                if (this.player.is_tv) {
+
+                    var ch_idx = this.player.channels.getIdxByVal('id', this.player.cur_media_item.id);
+
+                    _debug('ch_idx', ch_idx);
+
+                    if (ch_idx !== null) {
+                        this.player.cur_media_item = this.player.cur_tv_item = this.player.channels[ch_idx];
+
+                        _debug('this.player.cur_tv_item', this.player.cur_tv_item);
+
+                        if (this.player.cur_tv_item.lock != '1') {
+                            this.player.last_not_locked_tv_item = this.player.cur_tv_item;
+                        }
+
+                        _debug('this.player.on', this.player.on);
+
+                        if (this.player.on) {
+                            this.player.play(this.player.cur_tv_item);
+                        }
+                    }
+                }
+                this.player.init_first_channel();
+                //this.load_chanels_page();
+            },
+
+            this
+        )
+    };
+
+
+    this.load_chanels_page = function (currentPage) {
+        var callback = null;
+        var params = {
+            'type': 'itv',
+            'action': 'get_all_channels_page',
+            'n': this.player.maxPageNumber,
+            'force_ch_link_check': stb.user['force_ch_link_check']
+        };
+
+        if (currentPage) {
+            var status = this.player.pageListGetPageStatus(currentPage);
+            if (status != 0)
+                return;
+            callback = function (result) {
+                _debug('get_all_channels_page', result);
+                //stb.loader.add_pos(this.load_step, 'channels loaded');
+                var page = result.cur_page;
+                var offset = result.cur_page * result.max_page_items;
+                if (result.data.length > 0) {
+                    for (var i = 0; i < result.data.length; i++)
+                        this.player.channels.splice(offset + i, 1, result.data[i]);
+                    this.player.pageListSetPageStatus(page, 1);
+                }
+
+                if (this.player.is_tv) {
+
+                    var ch_idx = this.player.channels.getIdxByVal('id', this.player.cur_media_item.id);
+
+                    _debug('ch_idx', ch_idx);
+
+                    if (ch_idx !== null) {
+                        this.player.cur_media_item = this.player.cur_tv_item = this.player.channels[ch_idx];
+
+                        _debug('this.player.cur_tv_item', this.player.cur_tv_item);
+
+                        if (this.player.cur_tv_item.lock != '1') {
+                            this.player.last_not_locked_tv_item = this.player.cur_tv_item;
+                        }
 
+                        _debug('this.player.on', this.player.on);
+
+                        if (this.player.on) {
+                            this.player.play(this.player.cur_tv_item);
+                        }
+                    }
+
+                }
+
+            }
+        } else {
+            currentPage = this.player.getCurrentPage();
+            callback = function (result) {
+                _debug('get_all_channels_page', result);
+
+                stb.loader.add_pos(this.load_step, 'channels loaded');
+                var page = result.cur_page;
+                var offset = result.cur_page * result.max_page_items;
+                if (result.data.length > 0) {
+                    for (var i = 0; i < result.data.length; i++)
+                        this.player.channels.splice(offset + i, 1, result.data[i]);
+                    this.player.pageListSetPageStatus(page, 1);
+                }
+
+                if (this.player.is_tv) {
+
+                    var ch_idx = this.player.channels.getIdxByVal('id', stb.user.last_itv_id);
+
+                    _debug('ch_idx', ch_idx);
+
+                    if (ch_idx !== null) {
+                        this.player.cur_media_item = this.player.cur_tv_item = this.player.channels[ch_idx];
+
+                        _debug('this.player.cur_tv_item', this.player.cur_tv_item);
+
+                        if (this.player.cur_tv_item.lock != '1') {
+                            this.player.last_not_locked_tv_item = this.player.cur_tv_item;
+                        }
+
+                        _debug('this.player.on', this.player.on);
+
+                        if (this.player.on) {
+                            this.player.play(this.player.cur_tv_item);
+                        }
+                    }
+                }
+                this.player.init_first_channel();
+                console.log('download page finished !');
+            }
+        };
+        params['p'] = currentPage;
+        this.player.pageListSetPageStatus(currentPage, 2);
+        this.load(
+            params,
+            callback,
+            this,
+            "GET",
+            function (result) {
+                _debug('get_all_channels_page Error', result);
+
+            }
+        )
+    };
+
+    this.load_chanels_page_near = function () {
+
+        var nearpage = this.player.getNextPage();
+        if (nearpage < 0) {
+            return;
+        }
+        this.load(
+            {
+                'type': 'itv',
+                'action': 'get_all_channels_page',
+                'p': nearpage,
+                'n': this.player.maxPageNumber,
+                'force_ch_link_check': stb.user['force_ch_link_check']
+            },
+
+            function (result) {
+                _debug('all_channels', result);
+
+                //stb.loader.add_pos(this.load_step, 'channels loaded');
+                var page = result.cur_page;
+                var offset = result.cur_page * result.max_page_items;
+                if (result.data.length > 0) {
+                    for (var i = 0; i < result.data.length; i++)
+                        this.player.channels.splice(offset + i, 1, result.data[i]);
+                    this.player.pageListSetPageStatus(page, 1);
+                }
+
+                stb.load_chanels_page_near();
+            },
+
+            this,
+            "GET",
+            function (result) {
+                _debug('get_all_channels_page Error', result);
+                _debug('get_all_channels_page Error', nearpage);
+                var status = this.player.pageListGetPageStatus(nearpage);
+                status = status + 1;
+                this.player.pageListSetPageStatus(nearpage, status);
+            }
+        )
+    };
+
+
+
+    this.load_chs_page_start = function (pageList) {
+        this.loadChPageTimer_id = window.setTimeout(function (pagelist) {
+            for(var i=0;i<pagelist.length;i++){
+                stb.load_chanels_page(pagelist[i]);
+            }
+        }(pageList), 1000);
+    };
+
+    this.load_chs_page_stop = function(){
+        clearTimeout(this.loadChPageTimer_id);
+    }
+
+
+
+    this.load_fav_channels = function () {
+
+        this.load(
             {
-                'type'  : 'itv',
+                'type': 'itv',
                 'action': 'get_all_fav_channels',
-                'fav'   : 1,
-                'force_ch_link_check' : stb.user['force_ch_link_check']
+                'fav': 1,
+                'force_ch_link_check': stb.user['force_ch_link_check']
             },
 
-            function(result){
+            function (result) {
                 _debug('all_fav_channels', result);
 
                 stb.loader.add_pos(this.load_step, 'fav_channels loaded');
@@ -2279,20 +2548,19 @@ function common_xpcom(){
         )
     };
 
-    this.load_fav_itv = function(){
+    this.load_fav_itv = function () {
 
         this.load(
-
             {
-                'type'   : 'itv',
-                'action' : 'get_fav_ids',
-                'force_ch_link_check' : stb.user['force_ch_link_check']
+                'type': 'itv',
+                'action': 'get_fav_ids',
+                'force_ch_link_check': stb.user['force_ch_link_check']
             },
 
-            function(result){
+            function (result) {
                 _debug('fav_itv_ids', result);
                 this.player.fav_channels_ids = result || [];
-                if (this.player.fav_channels_ids.length == 0){
+                if (this.player.fav_channels_ids.length == 0) {
                     this.user.fav_itv_on = 0;
                 }
 
@@ -2303,22 +2571,22 @@ function common_xpcom(){
         )
     };
 
-    this.load_recordings = function(){
+    this.load_recordings = function () {
         _debug('stb.load_recordings');
 
         stb.load(
             {
-                "type"    : "remote_pvr",
-                "action"  : "get_active_recordings"
+                "type": "remote_pvr",
+                "action": "get_active_recordings"
             },
-            function(result){
+            function (result) {
                 _debug('load_recordings result', result);
 
                 this.recordings = result || [];
 
-                if (typeof(pvrManager) == "undefined"){
+                if (typeof (pvrManager) == "undefined") {
                     var active_tasks = [];
-                }else{
+                } else {
                     active_tasks = JSON.parse(pvrManager.GetAllTasks()) || [];
                 }
 
@@ -2326,35 +2594,35 @@ function common_xpcom(){
 
                 _debug('this.recordings before', this.recordings);
 
-                var now_ts = Math.ceil(new Date().getTime()/1000);
+                var now_ts = Math.ceil(new Date().getTime() / 1000);
 
                 _debug('now_ts', now_ts);
 
                 _debug('this.recordings after', this.recordings);
 
-                stb.player.on_play = function(ch_id){
+                stb.player.on_play = function (ch_id) {
                     _debug('player.on_play', ch_id);
 
-                    if (stb.player.is_tv){
+                    if (stb.player.is_tv) {
 
                         var rec_idx = stb.recordings.getIdxByVal('ch_id', ch_id);
 
-                        if(rec_idx !== null){
+                        if (rec_idx !== null) {
 
-                            var now_ts = Math.ceil(new Date().getTime()/1000);
+                            var now_ts = Math.ceil(new Date().getTime() / 1000);
 
                             _debug('now_ts', now_ts);
 
-                            if (stb.recordings[rec_idx].local == 0 || (stb.recordings[rec_idx].t_start_ts < now_ts && stb.recordings[rec_idx].t_stop_ts > now_ts)){
+                            if (stb.recordings[rec_idx].local == 0 || (stb.recordings[rec_idx].t_start_ts < now_ts && stb.recordings[rec_idx].t_stop_ts > now_ts)) {
                                 stb.player.show_rec_icon(stb.recordings[rec_idx]);
-                            }else{
+                            } else {
                                 stb.player.hide_rec_icon();
                             }
 
-                        }else{
+                        } else {
                             stb.player.hide_rec_icon();
                         }
-                    }else{
+                    } else {
                         stb.player.rec.hide();
                     }
                 }
@@ -2388,16 +2656,16 @@ function common_xpcom(){
         }
     };
 
-    this.log_stream_error = function(ch_id, event){
+    this.log_stream_error = function (ch_id, event) {
 
         this.load(
             {
-                "type"   : "stb",
-                "action" : "set_stream_error",
-                "ch_id"  : ch_id,
-                "event"  : event
+                "type": "stb",
+                "action": "set_stream_error",
+                "ch_id": ch_id,
+                "event": event
             },
-            function(result){
+            function (result) {
 
             },
             this
@@ -2406,37 +2674,39 @@ function common_xpcom(){
 
     this.epg_loader = {
 
-        timeout  : 21600000, // 6h
-        timer_id : 0,
-        epg : [],
+        timeout: 21600000, // 6h
+        timer_id: 0,
+        epg: [],
 
-        start : function(){
+        start: function () {
             _debug('epg_loader.start');
 
             this.load();
             var self = this;
-            this.timer_id = window.setInterval(function(){self.load()}, (stb.type == 'MAG200' ? 3 : stb.profile['epg_data_block_period_for_stb'])*3600000);
+            this.timer_id = window.setInterval(function () {
+                self.load()
+            }, (stb.type == 'MAG200' ? 3 : stb.profile['epg_data_block_period_for_stb']) * 3600000);
         },
 
-        stop : function(){
+        stop: function () {
             _debug('epg_loader.stop');
 
             window.clearInterval(this.timer_id);
         },
 
-        load : function(){
+        load: function () {
             _debug('epg_loader.load');
 
             this.epg = [];
 
             stb.load(
                 {
-                    "type"   : "itv",
-                    "action" : "get_epg_info",
-                    "period" : stb.type == 'MAG200' ? 3 : stb.profile['epg_data_block_period_for_stb']
+                    "type": "itv",
+                    "action": "get_epg_info",
+                    "period": stb.type == 'MAG200' ? 3 : stb.profile['epg_data_block_period_for_stb']
                 },
 
-                function(result){
+                function (result) {
                     this.set_epg(result.data);
                 },
 
@@ -2444,59 +2714,59 @@ function common_xpcom(){
             )
         },
 
-        set_epg : function(data){
+        set_epg: function (data) {
             _debug('epg_loader.set_epg', data);
             this.epg = data || [];
-            _debug('typeof(this.epg)', typeof(this.epg));
+            _debug('typeof(this.epg)', typeof (this.epg));
         },
 
-        get_curr_and_next : function(ch_id, from_ts, length){
+        get_curr_and_next: function (ch_id, from_ts, length) {
             _debug('epg_loader.get_curr_and_next', ch_id, from_ts, length);
 
             length = length || 2;
 
-            ch_id = ''+ch_id;
+            ch_id = '' + ch_id;
 
-            _debug('typeof(ch_id)', typeof(ch_id));
+            _debug('typeof(ch_id)', typeof (ch_id));
 
-            if (!from_ts){
-                var now = Date.parse(new Date())/1000;
-            }else{
+            if (!from_ts) {
+                var now = Date.parse(new Date()) / 1000;
+            } else {
                 now = parseInt(from_ts, 10);
             }
             var result = [];
 
             _debug('now', now);
-            _debug('typeof this.epg[ch_id]', typeof(this.epg[ch_id]));
+            _debug('typeof this.epg[ch_id]', typeof (this.epg[ch_id]));
 
-            try{
-                if (typeof(this.epg[ch_id]) == 'object' && this.epg[ch_id].length > 0){
+            try {
+                if (typeof (this.epg[ch_id]) == 'object' && this.epg[ch_id].length > 0) {
                     _debug('this.epg[ch_id]', this.epg[ch_id]);
-                    _debug('this.epg[ch_id].length: '+this.epg[ch_id].length);
-                    for (var i=0; i < this.epg[ch_id].length; i++){
+                    _debug('this.epg[ch_id].length: ' + this.epg[ch_id].length);
+                    for (var i = 0; i < this.epg[ch_id].length; i++) {
                         _debug('i', i);
-                        if (this.epg[ch_id][i]['start_timestamp'] < now){
+                        if (this.epg[ch_id][i]['start_timestamp'] < now) {
                             _debug('continue');
-                        }else if (this.epg[ch_id][i]['start_timestamp'] == now){
+                        } else if (this.epg[ch_id][i]['start_timestamp'] == now) {
                             _debug('==');
                             result.push(this.epg[ch_id][i]);
 
-                            for (var j = 0; j < length - 1; j++){
-                                if (typeof(this.epg[ch_id][i+1+j]) == 'object'){
-                                    result.push(this.epg[ch_id][i+1+j]);
+                            for (var j = 0; j < length - 1; j++) {
+                                if (typeof (this.epg[ch_id][i + 1 + j]) == 'object') {
+                                    result.push(this.epg[ch_id][i + 1 + j]);
                                 }
                             }
                             break;
-                        }else{
-                            if (typeof(this.epg[ch_id][i-1]) == 'object'){
-                                result.push(this.epg[ch_id][i-1]);
+                        } else {
+                            if (typeof (this.epg[ch_id][i - 1]) == 'object') {
+                                result.push(this.epg[ch_id][i - 1]);
 
-                                for (j = 0; j < length - 1; j++){
-                                    if (typeof(this.epg[ch_id][i + j]) == 'object'){
+                                for (j = 0; j < length - 1; j++) {
+                                    if (typeof (this.epg[ch_id][i + j]) == 'object') {
                                         result.push(this.epg[ch_id][i + j]);
                                     }
                                 }
-                            }else{
+                            } else {
                                 result.push(this.epg[ch_id][i]);
                             }
 
@@ -2504,12 +2774,12 @@ function common_xpcom(){
                         }
                     }
                 }
-            }catch(e){
+            } catch (e) {
                 _debug(e);
             }
 
-            if (length > 2 && module.epg_reminder && Array.isArray(module.epg_reminder.memos)){
-                for (i=0; i<result.length; i++){
+            if (length > 2 && module.epg_reminder && Array.isArray(module.epg_reminder.memos)) {
+                for (i = 0; i < result.length; i++) {
                     result[i]['mark_memo'] = module.epg_reminder.memos.getIdxByVal('tv_program_id', result[i]['id']) != null ? 1 : 0
                 }
 
@@ -2518,7 +2788,7 @@ function common_xpcom(){
             return result;
         },
 
-        get_epg : function(ch_id){
+        get_epg: function (ch_id) {
             _debug('epg_loader.get_epg', ch_id);
 
             var epg = this.get_curr_and_next(ch_id);
@@ -2526,14 +2796,14 @@ function common_xpcom(){
             return this.get_osd_info(epg);
         },
 
-        get_osd_info : function(programs){
+        get_osd_info: function (programs) {
             _debug('epg_loader.get_osd_info', programs);
 
             var epg_str = '';
 
-            programs.map(function(prog, idx){
+            programs.map(function (prog, idx) {
 
-                if (idx != 0){
+                if (idx != 0) {
                     epg_str += '<br>';
                 }
 
@@ -2543,12 +2813,12 @@ function common_xpcom(){
             return epg_str;
         },
 
-        get_cur_program : function(ch_id){
+        get_cur_program: function (ch_id) {
             _debug('epg_loader.get_cur_program', ch_id);
 
             var epg = this.get_curr_and_next(ch_id);
 
-            if (epg && epg.length > 0){
+            if (epg && epg.length > 0) {
                 return epg[0];
             }
 
@@ -2556,10 +2826,10 @@ function common_xpcom(){
         }
     };
 
-    this.cut_off = function(msg){
+    this.cut_off = function (msg) {
         _debug('stb.cut_off');
 
-        if (module.blocking.on){
+        if (module.blocking.on) {
             return;
         }
 
@@ -2569,7 +2839,7 @@ function common_xpcom(){
 
         this.player.stop();
 
-        if(this.cur_layer){
+        if (this.cur_layer) {
             this.cur_layer.on = false;
         }
 
@@ -2578,87 +2848,87 @@ function common_xpcom(){
         module.blocking.show(msg);
     };
 
-    this.cut_on = function(){
+    this.cut_on = function () {
         _debug('stb.cut_on');
 
-        if (module.blocking.on){
+        if (module.blocking.on) {
             stb.ExecAction('reboot');
         }
     };
 
-    this.set_cur_place = function(place){
+    this.set_cur_place = function (place) {
         this.cur_place = place;
     };
 
-    this.reset_cur_place = function(place){
+    this.reset_cur_place = function (place) {
         this.cur_place = '';
     };
 
-    this.set_cur_layer = function(obj){
+    this.set_cur_layer = function (obj) {
         this.cur_layer = obj;
     };
 
-    this.get_current_place = function(){
+    this.get_current_place = function () {
 
         var cur_place_num = 0;
 
         _debug('stb.player.media_type', this.player.media_type);
         _debug('stb.cur_place', this.cur_place);
 
-        if(this.player.media_type == 'stream'){ // TV
-            if (this.player.on){
-                if (this.cur_place == 'tv'){
-                    if (this.player.active_time_shift){
+        if (this.player.media_type == 'stream') { // TV
+            if (this.player.on) {
+                if (this.cur_place == 'tv') {
+                    if (this.player.active_time_shift) {
                         cur_place_num = 14;
-                    }else{
+                    } else {
                         cur_place_num = 1;
                     }
-                }else if(this.cur_place == 'radio'){ // Radio
+                } else if (this.cur_place == 'radio') { // Radio
                     cur_place_num = 5;
-                }else if(this.cur_place == 'vclub'){
+                } else if (this.cur_place == 'vclub') {
                     cur_place_num = 2;
-                }else if(this.cur_place == 'karaoke'){  // Karaoke
+                } else if (this.cur_place == 'karaoke') {  // Karaoke
                     cur_place_num = 3;
-                }else if(this.cur_place == 'audioclub'){ // Audio Club
-                        cur_place_num = 4;
-                }else if (this.cur_place == 'epg_simple' || this.cur_place == 'epg'){ // TV archive
+                } else if (this.cur_place == 'audioclub') { // Audio Club
+                    cur_place_num = 4;
+                } else if (this.cur_place == 'epg_simple' || this.cur_place == 'epg') { // TV archive
                     cur_place_num = 11;
-                }else{
+                } else {
                     cur_place_num = 1;
                 }
             }
-        }else if(this.player.media_type == 'file'){
-            if (this.player.on){
-                if (this.cur_place == 'vclub'){ // Video Club
+        } else if (this.player.media_type == 'file') {
+            if (this.player.on) {
+                if (this.cur_place == 'vclub') { // Video Club
                     cur_place_num = 2;
-                }else if(this.cur_place == 'karaoke'){ // Karaoke
+                } else if (this.cur_place == 'karaoke') { // Karaoke
                     cur_place_num = 3;
-                }else if(this.cur_place == 'audioclub'){ // Audio Club
+                } else if (this.cur_place == 'audioclub') { // Audio Club
                     cur_place_num = 4;
-                }else if(this.cur_place == 'video_clips'){ // Video Clips
+                } else if (this.cur_place == 'video_clips') { // Video Clips
                     cur_place_num = 8;
-                }else if(this.cur_place == 'ad'){
+                } else if (this.cur_place == 'ad') {
                     cur_place_num = 9;
-                }else if(this.cur_place == 'media_browser'){
+                } else if (this.cur_place == 'media_browser') {
                     cur_place_num = 10;
-                }else if (this.cur_place == 'epg_simple' || this.cur_place == 'epg'){ // TV archive
+                } else if (this.cur_place == 'epg_simple' || this.cur_place == 'epg') { // TV archive
                     cur_place_num = 11;
-                }else if (this.cur_place == 'records'){
+                } else if (this.cur_place == 'records') {
                     cur_place_num = 12;
                 }
             }
-        }else{
-            if (this.cur_place == 'city_info'){
+        } else {
+            if (this.cur_place == 'city_info') {
                 cur_place_num = 20;
-            }else if(this.cur_place == 'anec_page'){
+            } else if (this.cur_place == 'anec_page') {
                 cur_place_num = 21;
-            }else if(this.cur_place == 'weather_page'){
+            } else if (this.cur_place == 'weather_page') {
                 cur_place_num = 22;
-            }else if(this.cur_place == 'game_page'){
+            } else if (this.cur_place == 'game_page') {
                 cur_place_num = 23;
-            }else if(this.cur_place == 'horoscope_page'){
+            } else if (this.cur_place == 'horoscope_page') {
                 cur_place_num = 24;
-            }else if(this.cur_place == 'course_page'){
+            } else if (this.cur_place == 'course_page') {
                 cur_place_num = 25;
             }
         }
@@ -2668,18 +2938,18 @@ function common_xpcom(){
 
     this.advert = {
 
-        campaigns : [],
-        ticking_timeout : 0,
-        disabled : false,
-        disabled_time : 900,
-        tracking_pixels : [],
-        tracking_block : null,
-        tracking_block_name : "",
+        campaigns: [],
+        ticking_timeout: 0,
+        disabled: false,
+        disabled_time: 900,
+        tracking_pixels: [],
+        tracking_block: null,
+        tracking_block_name: "",
 
-        disable : function(){
+        disable: function () {
             _debug('stb.advert.disable');
 
-            if (this.disabled){
+            if (this.disabled) {
                 return;
             }
 
@@ -2693,22 +2963,22 @@ function common_xpcom(){
             }, this.disabled_time * 1000)
         },
 
-        enable : function(){
+        enable: function () {
             _debug('stb.advert.enable');
 
             this.disabled = false;
         },
 
-        start : function (cb) {
+        start: function (cb) {
             _debug('stb.advert.get_ad');
 
             var callback = function () {
 
                 stb.key_lock = false;
 
-                try{
+                try {
                     stb.Stop();
-                }catch(e){
+                } catch (e) {
                     _debug(e);
                 }
                 stb.player.on = false;
@@ -2717,20 +2987,20 @@ function common_xpcom(){
                 cb();
             };
 
-            if (this.disabled){
+            if (this.disabled) {
                 callback();
                 return;
             }
 
-            if (!connection_problem.on){
+            if (!connection_problem.on) {
                 stb.key_lock = true;
             }
 
             stb.load(
                 {
-                    "type"   : "stb",
-                    "action" : "get_ad",
-                    "video_mode" : stb.video_mode
+                    "type": "stb",
+                    "action": "get_ad",
+                    "video_mode": stb.video_mode
                 },
                 function (result) {
                     _debug('on get_ad', result);
@@ -2745,20 +3015,20 @@ function common_xpcom(){
 
                     _debug('this.campaigns', this.campaigns);
 
-                    var adverts  = result.filter(function (item) {
+                    var adverts = result.filter(function (item) {
                         return item['campaign'].hasOwnProperty('places') && item['campaign']['places'] && item['campaign']['places'][101];
                     });
 
-                    if (!adverts || adverts.length == 0){
+                    if (!adverts || adverts.length == 0) {
                         callback();
                         return;
                     }
 
-                    for (var i=0; i<adverts.length; i++){
+                    for (var i = 0; i < adverts.length; i++) {
 
                         var advert = adverts[i];
 
-                        if (i != adverts.length-1){
+                        if (i != adverts.length - 1) {
 
                             callback = (function (ad, cb) {
 
@@ -2768,7 +3038,7 @@ function common_xpcom(){
 
                                     stb.player.prev_layer = main_menu;
 
-                                    if (!connection_problem.on){
+                                    if (!connection_problem.on) {
                                         stb.key_lock = true;
                                     }
 
@@ -2797,17 +3067,17 @@ function common_xpcom(){
 
                     stb.player.prev_layer = main_menu;
 
-                    if (!connection_problem.on){
+                    if (!connection_problem.on) {
                         stb.key_lock = true;
                     }
 
                     stb.player.play({
                         'id': 0,
-                        'cmd': 'ffmpeg '+adverts[0].ad,
+                        'cmd': 'ffmpeg ' + adverts[0].ad,
                         'media_type': 'advert',
                         'is_advert': true,
                         'ad_tracking': adverts[0].tracking,
-                        'ad_must_watch' : adverts[0].ad_must_watch,
+                        'ad_must_watch': adverts[0].ad_must_watch,
                         'stop_callback': callback
 
                     });
@@ -2817,12 +3087,12 @@ function common_xpcom(){
             )
         },
 
-        track : function (urls, type) {
+        track: function (urls, type) {
             _debug('stb.advert.track', urls, type);
 
             type = type || '';
 
-            if (!Array.isArray(urls)){
+            if (!Array.isArray(urls)) {
                 return false;
             }
 
@@ -2833,7 +3103,7 @@ function common_xpcom(){
                 stb.advert.call_img(url);
             });
 
-            if (['stop', 'close', 'error', 'complete'].indexOf(type) != -1){
+            if (['stop', 'close', 'error', 'complete'].indexOf(type) != -1) {
                 var name = this.tracking_block_name;
                 this.tracking_block = null;
                 window.setTimeout(function () {
@@ -2842,7 +3112,7 @@ function common_xpcom(){
             }
         },
 
-        call_img : function (url) {
+        call_img: function (url) {
             _debug('stb.advert.call_img', url);
 
             var pixel = document.createElement("img");
@@ -2854,9 +3124,9 @@ function common_xpcom(){
                 _debug('tracking pixel loaded')
             };
 
-            if (!this.tracking_block){
+            if (!this.tracking_block) {
                 var tracking_block = document.createElement("div");
-                this.tracking_block_name = 'tracking_block_'+(new Date().getTime());
+                this.tracking_block_name = 'tracking_block_' + (new Date().getTime());
                 _debug('tracking_block_name', this.tracking_block_name);
                 tracking_block.id = this.tracking_block_name;
                 tracking_block.style.position = 'absolute';
@@ -2868,36 +3138,36 @@ function common_xpcom(){
             this.tracking_pixels.push(this.tracking_block.appendChild(pixel));
         },
 
-        destroy_block : function(name){
+        destroy_block: function (name) {
             _debug('stb.advert.destroy_block', name);
             var block = document.getElementById(name);
-            if (block){
+            if (block) {
                 document.body.removeChild(block);
             }
         },
 
-        destroy_img : function(){
+        destroy_img: function () {
             _debug('stb.advert.destroy_img');
 
-            stb.advert.tracking_pixels.map(function(tracking_pixel){
+            stb.advert.tracking_pixels.map(function (tracking_pixel) {
                 stb.advert.tracking_block.removeChild(tracking_pixel);
             });
 
             stb.advert.tracking_pixels = []
         },
 
-        call_ajax : function(url){
+        call_ajax: function (url) {
             _debug('stb.advert.call_ajax', url);
 
             var req = new XMLHttpRequest();
 
             req.open("GET", url);
 
-            req.onreadystatechange = function(){
+            req.onreadystatechange = function () {
                 if (req.readyState == 4) {
                     if (req.status == 200) {
                         _debug('on track ok');
-                    }else{
+                    } else {
                         _debug('on track error', req.status);
                     }
                     req = null;
@@ -2907,27 +3177,27 @@ function common_xpcom(){
             req.send(null);
         },
 
-        start_ticking : function(media_len){
+        start_ticking: function (media_len) {
             _debug('stb.advert.start_ticking', media_len);
             window.clearInterval(this.ticking_timeout);
             this.ticking_timeout = window.setInterval(function () {
 
                 var pos_time = stb.GetPosTime();
 
-                var quartile = media_len/4;
+                var quartile = media_len / 4;
 
-                if (Math.abs(quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('firstQuartile')){
+                if (Math.abs(quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('firstQuartile')) {
                     stb.advert.track(stb.player.cur_media_item.ad_tracking['firstQuartile'])
-                }else if(Math.abs(2*quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('midpoint')){
+                } else if (Math.abs(2 * quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('midpoint')) {
                     stb.advert.track(stb.player.cur_media_item.ad_tracking['midpoint'])
-                }else if(Math.abs(3*quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('thirdQuartile')){
+                } else if (Math.abs(3 * quartile - pos_time) <= 1 && stb.player.cur_media_item.ad_tracking.hasOwnProperty('thirdQuartile')) {
                     stb.advert.track(stb.player.cur_media_item.ad_tracking['thirdQuartile'])
                 }
 
             }, 1000);
         },
 
-        stop_ticking : function () {
+        stop_ticking: function () {
             _debug('stb.advert.stop_ticking');
             window.clearInterval(this.ticking_timeout);
         }
@@ -2935,10 +3205,10 @@ function common_xpcom(){
 
     this.clock = {
 
-        start : function(){
+        start: function () {
             _debug('clock.start()');
 
-            if (this.t_clock){
+            if (this.t_clock) {
                 _debug('exit clock.start');
                 return;
             }
@@ -2947,115 +3217,119 @@ function common_xpcom(){
 
             var self = this;
 
-            try{
-                this.t_clock   = window.setInterval(function(){self.tick()}, 30000);
-                this.t_clock_s = window.setInterval(function(){self.tick_s()}, 1000);
-            }catch(e){
+            try {
+                this.t_clock = window.setInterval(function () {
+                    self.tick()
+                }, 30000);
+                this.t_clock_s = window.setInterval(function () {
+                    self.tick_s()
+                }, 1000);
+            } catch (e) {
                 _debug(e);
             }
         },
 
-        stop : function(){
+        stop: function () {
             _debug('clock.stop');
 
             _debug('self.t_clock', this.t_clock);
 
             var self = this;
 
-            try{
+            try {
                 window.clearInterval(self.t_clock);
                 window.clearInterval(self.t_clock_s);
-            }catch(e){
+            } catch (e) {
                 _debug(e);
             }
         },
 
-        tick_s : function(){
+        tick_s: function () {
             this.timestamp = Math.round(new Date().getTime() / 1000);
         },
 
-        tick : function(){
+        tick: function () {
 
             this.current_date = new Date();
 
-            this.year  = this.current_date.getFullYear();
+            this.year = this.current_date.getFullYear();
 
             this.month = this.current_date.getMonth();
 
-            this.date  = this.current_date.getDate();
+            this.date = this.current_date.getDate();
 
-            this.day   = this.current_date.getDay();
+            this.day = this.current_date.getDay();
 
             this.hours = this.current_date.getHours();
 
-            if (this.hours > 11){
+            if (this.hours > 11) {
                 this.ap_mark = 'PM';
-            }else{
+            } else {
                 this.ap_mark = 'AM';
             }
 
             this.ap_hours = this.hours % 12 || 12;
 
             this.minutes = this.current_date.getMinutes();
-            if (this.minutes<10){
-                this.minutes = '0'+this.minutes;
+            if (this.minutes < 10) {
+                this.minutes = '0' + this.minutes;
             }
 
             this.show();
         },
 
-        show : function(){
-            if (typeof(main_menu) != 'undefined' && main_menu && main_menu.time && main_menu.date && main_menu.on){
+        show: function () {
+            if (typeof (main_menu) != 'undefined' && main_menu && main_menu.time && main_menu.date && main_menu.on) {
                 main_menu.time.innerHTML = stb.clock_formats[stb.profile.clock_format].format(this.hours, this.minutes, this.ap_hours, this.ap_mark);
                 main_menu.date.innerHTML = get_word('date_format').format(get_word('week_arr')[this.day], this.date, get_word('month_arr')[this.month], this.year);
             }
 
-            if (stb.player && stb.player.info && stb.player.info.on && stb.player.info.clock){
+            if (stb.player && stb.player.info && stb.player.info.on && stb.player.info.clock) {
                 stb.player.info.clock.innerHTML = stb.clock_formats[stb.profile.clock_format].format(this.hours, this.minutes, this.ap_hours, this.ap_mark);
             }
 
-            if (module && module.tv && module.tv.on && module.tv.clock_box){
+            if (module && module.tv && module.tv.on && module.tv.clock_box) {
                 module.tv.clock_box.innerHTML = stb.clock_formats[stb.profile.clock_format].format(this.hours, this.minutes, this.ap_hours, this.ap_mark);
             }
 
-            if (stb.type == 'MAG200' && (!stb.player.on || (stb.player.on && !stb.player.is_tv))){
+            if (stb.type == 'MAG200' && (!stb.player.on || (stb.player.on && !stb.player.is_tv))) {
                 stb.setFrontPanel(this.hours + '' + this.minutes, true);
             }
 
             this.triggerCustomEventListener("tick", this);
         },
 
-        convert_sec_to_human_time : function(sec){
+        convert_sec_to_human_time: function (sec) {
 
-            if (sec < 0 || isNaN(sec)){
+            if (sec < 0 || isNaN(sec)) {
                 sec = 0;
             }
 
-            var h = Math.floor(sec/3600);
+            var h = Math.floor(sec / 3600);
 
-            var m = Math.floor((sec - (h*3600)) / 60);
+            var m = Math.floor((sec - (h * 3600)) / 60);
 
-            var s = sec - (h*3600) - (m*60);
+            var s = sec - (h * 3600) - (m * 60);
 
             var time = '';
 
-            if(h){
+            if (h) {
 
-                if (h<10){
-                    h = '0'+h;
+                if (h < 10) {
+                    h = '0' + h;
                 }
 
-                time += h+':';
+                time += h + ':';
             }
 
-            if (m<10){
-                m = '0'+m;
+            if (m < 10) {
+                m = '0' + m;
             }
 
-            time += m+':';
+            time += m + ':';
 
-            if (s<10){
-                s = '0'+s;
+            if (s < 10) {
+                s = '0' + s;
             }
 
             time += s;
@@ -3063,16 +3337,16 @@ function common_xpcom(){
             return time;
         },
 
-        convert_sec_to_human_hours : function(sec){
+        convert_sec_to_human_hours: function (sec) {
 
-            var h = Math.floor(sec/3600);
-            var m = Math.floor((sec - (h*3600)) / 60);
+            var h = Math.floor(sec / 3600);
+            var m = Math.floor((sec - (h * 3600)) / 60);
             var time = '';
 
-            time += h+':';
+            time += h + ':';
 
-            if (m<10){
-                m = '0'+m;
+            if (m < 10) {
+                m = '0' + m;
             }
 
             time += m;
@@ -3080,54 +3354,54 @@ function common_xpcom(){
             return time;
         },
 
-        convert_timestamp_to_human_time : function(timestamp){
+        convert_timestamp_to_human_time: function (timestamp) {
 
-            var date = new Date(parseInt(timestamp, 10)*1000);
+            var date = new Date(parseInt(timestamp, 10) * 1000);
 
             var hours = date.getHours();
 
-            if (hours > 11){
+            if (hours > 11) {
                 var ap_mark = 'PM';
-            }else{
+            } else {
                 ap_mark = 'AM';
             }
 
             var ap_hours = hours % 12 || 12;
 
-            if (hours<10){
-                hours = '0'+hours;
+            if (hours < 10) {
+                hours = '0' + hours;
             }
 
-            if (ap_hours<10){
-                ap_hours = '0'+ap_hours;
+            if (ap_hours < 10) {
+                ap_hours = '0' + ap_hours;
             }
 
             var minutes = date.getMinutes();
-            if (minutes<10){
-                minutes = '0'+minutes;
+            if (minutes < 10) {
+                minutes = '0' + minutes;
             }
 
             return stb.clock_formats[stb.profile.clock_format].format(hours, minutes, ap_hours, ap_mark);
         },
 
-        format_XX : function(value){
-            if (value < 10){
-                value = '0'+value;
+        format_XX: function (value) {
+            if (value < 10) {
+                value = '0' + value;
             }
             return value;
         }
     };
 
-    this.add_referrer = function(paramStr, layer_name){
+    this.add_referrer = function (paramStr, layer_name) {
         var returnParams = paramStr || '';
-        returnParams += (returnParams.length == 0? '?': '&');
+        returnParams += (returnParams.length == 0 ? '?' : '&');
         var tmpLocation = window.location.toString();
-        returnParams += 'referrer='+encodeURIComponent(tmpLocation);
+        returnParams += 'referrer=' + encodeURIComponent(tmpLocation);
         if (tmpLocation.indexOf('?') == -1) {
             returnParams += encodeURIComponent('?');
         }
         var amp = '(\\' + encodeURIComponent('&') + ')';
-        var regStr = new RegExp(amp + 'focus_module[^\\1,\\&,$]*?(\\1|\\&|$)','ig');
+        var regStr = new RegExp(amp + 'focus_module[^\\1,\\&,$]*?(\\1|\\&|$)', 'ig');
         if (regStr.test(returnParams)) {
             returnParams = returnParams.replace(regStr, '$2');
             if (regStr.test(returnParams)) {
@@ -3135,7 +3409,7 @@ function common_xpcom(){
             }
         }
         focus_module = layer_name;
-        returnParams += encodeURIComponent('&focus_module='+layer_name);
+        returnParams += encodeURIComponent('&focus_module=' + layer_name);
         return returnParams;
     };
 
@@ -3152,7 +3426,7 @@ function common_xpcom(){
         return remoteControlFileData;
     };
 
-    this.init_rc = function(){
+    this.init_rc = function () {
         _debug("this.init_rc");
         if (typeof (gSTB) == 'undefined' || !gSTB.ConfigNetRc || !gSTB.SetNetRcStatus) {
             _debug("remote control not init");
@@ -3169,16 +3443,16 @@ function common_xpcom(){
 
 var screensaver = {
 
-    on : false,
+    on: false,
 
-    init : function(){
+    init: function () {
         //_debug('screensaver.init');
 
-        if (typeof(gSTB) != "undefined" && gSTB.SetScreenSaverTime){
+        if (typeof (gSTB) != "undefined" && gSTB.SetScreenSaverTime) {
             gSTB.SetScreenSaverTime(0);
         }
 
-        if (this.dom_obj){
+        if (this.dom_obj) {
             _debug('exit screensaver.init');
             return;
         }
@@ -3187,10 +3461,10 @@ var screensaver = {
 
         var self = this;
 
-        keydown_observer.addCustomEventListener("keypress", function(event){
+        keydown_observer.addCustomEventListener("keypress", function (event) {
             //_debug('screensaver keypress', event);
 
-            if (self.on){
+            if (self.on) {
                 self.hide();
                 self.restart_timer.call(self);
                 return false;
@@ -3202,44 +3476,44 @@ var screensaver = {
 
         this.restart_timer();
 
-        stb.player.addCustomEventListener("onplay", function(event){
-            if (self.on && stb.player.file_type != 'audio'){
+        stb.player.addCustomEventListener("onplay", function (event) {
+            if (self.on && stb.player.file_type != 'audio') {
                 self.hide();
                 self.restart_timer.call(self);
             }
         });
 
-        stb.clock.addCustomEventListener("tick", function(date){
-            if (self.on){
+        stb.clock.addCustomEventListener("tick", function (date) {
+            if (self.on) {
                 self.clock.innerHTML = stb.clock_formats[stb.profile.clock_format].format(date.hours, date.minutes, date.ap_hours, date.ap_mark);
             }
         });
     },
 
-    restart_timer : function(){
+    restart_timer: function () {
         //_debug('screensaver.restart_timer');
 
         var self = this;
 
         window.clearTimeout(this.activate_timer);
 
-        if (stb.user['screensaver_delay'] > 0){
-            this.activate_timer = window.setTimeout(function(){
+        if (stb.user['screensaver_delay'] > 0) {
+            this.activate_timer = window.setTimeout(function () {
                 self.show.call(self);
             }, stb.user['screensaver_delay'] * 60000);
             //}, 30000);
         }
     },
 
-    build : function(){
+    build: function () {
         //_debug('screensaver.build');
 
         this.dom_obj = create_block_element("screensaver");
-        this.clock   = create_block_element("screensaver_clock", this.dom_obj);
+        this.clock = create_block_element("screensaver_clock", this.dom_obj);
         this.hide();
     },
 
-    show : function(){
+    show: function () {
         _debug('screensaver.show');
 
         window.clearTimeout(this.activate_timer);
@@ -3248,19 +3522,19 @@ var screensaver = {
 
         var is_playing = false;
 
-        if (stb.IsPlaying){
+        if (stb.IsPlaying) {
 
             is_playing = stb.IsPlaying();
 
             _debug('stb.IsPlaying', is_playing);
 
-        }else if (stb.GetVideoInfo){
+        } else if (stb.GetVideoInfo) {
             var video_info = stb.GetVideoInfo();
             _debug('video_info', video_info);
 
-            try{
-                video_info = eval('('+video_info+')');
-            }catch(e){
+            try {
+                video_info = eval('(' + video_info + ')');
+            } catch (e) {
                 _debug(e);
             }
 
@@ -3273,7 +3547,7 @@ var screensaver = {
 
         _debug('is_playing', is_playing);
 
-        if (stb.player.on && is_playing){
+        if (stb.player.on && is_playing) {
             this.restart_timer();
             return;
         }
@@ -3288,10 +3562,12 @@ var screensaver = {
 
         this.move();
         var self = this;
-        this.move_timer = window.setInterval(function(){self.move.call(self)}, 5000);
+        this.move_timer = window.setInterval(function () {
+            self.move.call(self)
+        }, 5000);
     },
 
-    hide : function(){
+    hide: function () {
         _debug('screensaver.hide');
 
         //stb.cur_layer && stb.cur_layer.dom_obj.show();
@@ -3300,21 +3576,23 @@ var screensaver = {
         window.clearInterval(this.move_timer);
     },
 
-    toggle : function(){
+    toggle: function () {
         _debug('screensaver.toggle');
 
-        if (this.on){
+        if (this.on) {
             this.hide();
-        }else{
-            window.setTimeout(function(){screensaver.show()}, 500);
+        } else {
+            window.setTimeout(function () {
+                screensaver.show()
+            }, 500);
         }
     },
 
-    move : function(){
+    move: function () {
         _debug('screensaver.start');
 
-        var top  = Math.floor(Math.random() * (screen.height - this.clock.offsetHeight));
-        var left = Math.floor(Math.random() * (screen.width  - this.clock.offsetWidth));
+        var top = Math.floor(Math.random() * (screen.height - this.clock.offsetHeight));
+        var left = Math.floor(Math.random() * (screen.width - this.clock.offsetWidth));
         _debug('top', top);
         _debug('left', left);
 
@@ -3327,23 +3605,23 @@ var connection_problem = {
 
     on: true,
 
-    init : function(){
+    init: function () {
         this.dom_obj = create_block_element("connection_problem_container");
         this.block_obj = create_block_element("connection_problem_block", this.dom_obj);
         this.block_obj.innerHTML = get_word('Connection problem');
         this.hide();
     },
 
-    refresh_msg : function(){
+    refresh_msg: function () {
         this.block_obj.innerHTML = get_word('Connection problem');
     },
 
-    show : function(){
+    show: function () {
         _debug('connection_problem.show');
 
         _debug('stb.user.enable_connection_problem_indication', stb.user.enable_connection_problem_indication);
 
-        if (stb.user.enable_connection_problem_indication == 1){
+        if (stb.user.enable_connection_problem_indication == 1) {
             this.dom_obj.show();
             this.on = true;
         }
@@ -3351,10 +3629,10 @@ var connection_problem = {
         stb.key_lock = false;
     },
 
-    hide : function(){
+    hide: function () {
         _debug('connection_problem.hide');
 
-        if (!this.on){
+        if (!this.on) {
             return;
         }
 
@@ -3368,32 +3646,32 @@ var authentication_problem = {
 
     on: true,
 
-    init : function(){
+    init: function () {
         this.dom_obj = create_block_element("authentication_problem_container");
         this.block_obj = create_block_element("authentication_problem_block", this.dom_obj);
         this.block_obj.innerHTML = get_word('Authentication problem');
         this.hide();
     },
 
-    refresh_msg : function(){
+    refresh_msg: function () {
         this.block_obj.innerHTML = get_word('Authentication problem');
     },
 
-    show : function(){
+    show: function () {
         _debug('authentication_problem.show');
 
         this.dom_obj.show();
         this.on = true;
 
-        if (stb.player && stb.player.on){
+        if (stb.player && stb.player.on) {
             stb.player.stop();
         }
     },
 
-    hide : function(){
+    hide: function () {
         _debug('authentication_problem.hide');
 
-        if (!this.on){
+        if (!this.on) {
             return;
         }
 
@@ -3405,8 +3683,8 @@ var authentication_problem = {
 
 var Utf8 = {
     // public method for url encoding
-    encode : function (string) {
-        string = string.replace(/\r\n/g,"\n");
+    encode: function (string) {
+        string = string.replace(/\r\n/g, "\n");
         var utftext = "";
 
         for (var n = 0; n < string.length; n++) {
@@ -3415,12 +3693,10 @@ var Utf8 = {
 
             if (c < 128) {
                 utftext += String.fromCharCode(c);
-            }
-            else if((c > 127) && (c < 2048)) {
+            } else if ((c > 127) && (c < 2048)) {
                 utftext += String.fromCharCode((c >> 6) | 192);
                 utftext += String.fromCharCode((c & 63) | 128);
-            }
-            else {
+            } else {
                 utftext += String.fromCharCode((c >> 12) | 224);
                 utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                 utftext += String.fromCharCode((c & 63) | 128);
@@ -3431,27 +3707,25 @@ var Utf8 = {
     },
 
     // public method for url decoding
-    decode : function (utftext) {
+    decode: function (utftext) {
         var string = "";
         var i = 0;
         var c = c1 = c2 = 0;
 
-        while ( i < utftext.length ) {
+        while (i < utftext.length) {
 
             c = utftext.charCodeAt(i);
 
             if (c < 128) {
                 string += String.fromCharCode(c);
                 i++;
-            }
-            else if((c > 191) && (c < 224)) {
-                c2 = utftext.charCodeAt(i+1);
+            } else if ((c > 191) && (c < 224)) {
+                c2 = utftext.charCodeAt(i + 1);
                 string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                 i += 2;
-            }
-            else {
-                c2 = utftext.charCodeAt(i+1);
-                c3 = utftext.charCodeAt(i+2);
+            } else {
+                c2 = utftext.charCodeAt(i + 1);
+                c3 = utftext.charCodeAt(i + 2);
                 string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                 i += 3;
             }
diff --git a/server/lib/ajaxresponse.class.php b/server/lib/ajaxresponse.class.php
old mode 100644
new mode 100755
index 50f3878..ad5779c
--- a/server/lib/ajaxresponse.class.php
+++ b/server/lib/ajaxresponse.class.php
@@ -39,8 +39,8 @@ abstract class AjaxResponse
         $this->db  = Mysql::getInstance();
         $this->stb = Stb::getInstance();
 
-        $this->response['max_page_items'] = self::max_page_items;
-
+        $this->response['max_page_items'] =  empty($_REQUEST['n'])?self::max_page_items:@intval($_REQUEST['n']);
+        $this->cur_page = empty($_REQUEST['p'])?$this->cur_page:@intval($_REQUEST['p']);
         /// TRANSLATORS: Letters of the alphabet. If the letter is missing - leave ".";
         $this->abc = array_filter(array('*',_('ABC_1l'),_('ABC_2l'),_('ABC_3l'),_('ABC_4l'),_('ABC_5l'),_('ABC_6l'),_('ABC_7l'),_('ABC_8l'),_('ABC_9l'),_('ABC_10l'),_('ABC_11l'),_('ABC_12l'),_('ABC_13l'),_('ABC_14l'),_('ABC_15l'),_('ABC_16l'),_('ABC_17l'),_('ABC_18l'),_('ABC_19l'),_('ABC_20l'),_('ABC_21l'),_('ABC_22l'),_('ABC_23l'),_('ABC_24l'),_('ABC_25l'),_('ABC_26l'),_('ABC_27l'),_('ABC_28l'),_('ABC_29l'),_('ABC_30l'),_('ABC_31l'),_('ABC_32l'),_('ABC_33l')), function($e){return $e != '.';});
 
@@ -86,7 +86,7 @@ abstract class AjaxResponse
         $this->setResponse('selected_item', $this->selected_item);
         $this->setResponse('data', $query->get()->all());
     }
-    
+
     /**
      * Apply callback on responce.
      *
diff --git a/server/lib/epg.class.php b/server/lib/epg.class.php
index 5c09da2..5b5db0d 100755
--- a/server/lib/epg.class.php
+++ b/server/lib/epg.class.php
@@ -601,7 +601,7 @@ class Epg implements \Stalker\Lib\StbApi\Epg
         if (empty($channels_ids)){
             $channels_ids = Itv::getInstance()->getAllUserChannelsIds();
         }
-        var_dump("epg channels_ids=",$channels_ids);
+        //var_dump("epg channels_ids=",$channels_ids);
         if (empty($from)){
             //$from = 'NOW()';
             $from = date("Y-m-d H:i:s");
@@ -643,17 +643,17 @@ class Epg implements \Stalker\Lib\StbApi\Epg
         $recorder = new StreamRecorder();
 
         $user_rec_ids = $recorder->getDeferredRecordIdsForUser(Stb::getInstance()->id);
-        var_dump($user_rec_ids);
+        //var_dump($user_rec_ids);
         $tv_archive = new TvArchive();
         $archived_recs = $tv_archive->getAllTasksAssoc();
-        var_dump($archived_recs);
+        //var_dump($archived_recs);
         $user = User::getInstance(Stb::getInstance()->id);
         $subscription = $user->getServicesByType('tv', null, true);
-        var_dump($subscription);
+        //var_dump($subscription);
 
         $reminder = new TvReminder();
         $reminders = $reminder->getAllActiveForMac(Stb::getInstance()->mac);
-        var_dump($subscription);
+        //var_dump($subscription);
 
         foreach ($result as $ch_id => $epg){
 
@@ -708,7 +708,7 @@ class Epg implements \Stalker\Lib\StbApi\Epg
 
             $result[$ch_id] = $epg;
         }
-        var_dump($result);
+        //var_dump($result);
 
         return $result;
     }
diff --git a/server/lib/itv.class.php b/server/lib/itv.class.php
index e4536f1..56dd366 100755
--- a/server/lib/itv.class.php
+++ b/server/lib/itv.class.php
@@ -24,7 +24,7 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
     private $censored_channels = null;
     private static $channels_cache = array();
     private static $links_cache = array();
-
+    private static $include_bypage = false;
     /**
      * @static
      * @return Itv
@@ -580,7 +580,7 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
      * @param bool $include_unsubscribed
      * @return Mysql $query
      */
-    public function getChannels($include_censored = false, $include_unsubscribed = false) {
+    public function getChannels($include_censored = false, $include_unsubscribed = false, $include_col = '') {
 
         $all_user_channels_ids = $this->getAllUserChannelsIds();
 
@@ -605,7 +605,10 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
         }
 
         /** @var Mysql $query */
-        $query = $this->db->from('itv');
+        if ($include_col)
+            $query = $this->db->select($include_col)->from('itv');
+        else
+            $query = $this->db->from('itv');
 
         $this->include_censored = $include_censored;
 
@@ -655,7 +658,7 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
         //->get()
         //->all();
 
-        var_dump($result);
+        //var_dump($result);
         $this->include_censored = false;
         $this->setResponseData($result);
 
@@ -663,6 +666,36 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
 
     }
 
+    public function getAllChannelsSimple() {
+        //,'id,name,number,tv_genre_id,locked,censored'
+        $result = $this->getChannels(true, true)->orderby('number');
+        //->get()
+        //->all();
+
+        //var_dump($result);
+        $this->include_censored = false;
+        $this->setResponseData($result);
+
+        return $this->getResponse('prepareDataSimple');
+
+    }
+
+    public function getAllChannelsPage() {
+
+        $result = $this->getChannels(true, true)->orderby('number');
+        //->get()
+        //->all();$page_channels = array_slice(array_values($all_channels_map), $this->page * self::max_page_items, self::max_page_items);
+
+        //var_dump($result);
+        $this->include_censored = false;
+        $this->include_bypage = true;
+        $this->setResponseData($result);
+
+
+        return $this->getResponse('prepareDataPage');
+
+    }
+
     public function getAllFavChannels() {
         $fav_ids = $this->getFav();
 
@@ -1118,6 +1151,7 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
             }
         }
 
+
         $length = count($this->response['data']);
 
         $enable_numbering_in_order = Config::getSafe('enable_numbering_in_order', false);
@@ -1275,9 +1309,560 @@ class Itv extends AjaxResponse implements \Stalker\Lib\StbApi\Itv {
             }
 
         }
+        return $this->response;
+    }
+    /*
+    public function prepareDataSimple() {
+
+        $fav = $this->getFav();
+        $censored_list = $this->getCensoredList();
+        $censored_exclude_list = $this->getCensoredExcludeList();
+        $dvb_channels = $this->getDvbChannels();
+
+        $force_ch_link_check = isset($_REQUEST['force_ch_link_check']) ? $_REQUEST['force_ch_link_check'] : false;
+        $last_tv_id = isset($_REQUEST['chid'])?$_REQUEST['chid']: -1;
+        $ch_idx = 0;
+        //var_dump('!!!!!!!!!!!!!!!!', $censored_list, $censored_exclude_list, $this->include_censored);
+
+        $total_iptv_channels = (int)$this->response['total_items'];
+
+        if (!empty($_REQUEST['fav'])) {
+            $dvb_channels = array_values(array_filter($dvb_channels, function ($channel) use ($fav) {
+                return in_array($channel['id'], $fav);
+            }));
+        }
+
+        if (@$_REQUEST['sortby'] != 'name' && (empty($_REQUEST['genre']) || $_REQUEST['genre'] == '*' || $_REQUEST['genre'] == 'dvb')) {
+            $this->response['total_items'] += count($dvb_channels);
+        }
+
+        if (((count($this->response['data']) < self::max_page_items) && !empty($dvb_channels) || !isset($_REQUEST['p'])) && @$_REQUEST['sortby'] != 'name' && (empty($_REQUEST['genre']) || $_REQUEST['genre'] == '*' || $_REQUEST['genre'] == 'dvb')) {
+
+            $total_iptv_pages = ceil($total_iptv_channels / self::max_page_items);
+
+            if ($this->page == $total_iptv_pages - 1) {
+                $dvb_part_length = self::max_page_items - $total_iptv_channels % self::max_page_items;
+            } else {
+                $dvb_part_length = self::max_page_items;
+            }
+
+            if (!empty($_REQUEST['genre']) && $_REQUEST['genre'] == 'dvb') {
+                $dvb_part_offset = $this->page * self::max_page_items;
+            } elseif ($this->page + 1 > $total_iptv_pages) {
+                $diff_items = $total_iptv_channels % self::max_page_items;
+                $dvb_part_offset = ($this->page - $total_iptv_pages) * self::max_page_items + ($diff_items > 0 ? self::max_page_items - $diff_items : 0);
+            } else {
+                $dvb_part_offset = 0;
+            }
+
+            if (isset($_REQUEST['p'])) {
+                $dvb_channels = array_splice($dvb_channels, $dvb_part_offset, $dvb_part_length);
+            }
+
+            $this->response['data'] = array_merge($this->response['data'], $dvb_channels);
+
+            if (!empty($_REQUEST['fav'])) {
+
+                $ordered_list = array();
+                $channels_map = array();
+
+                foreach ($this->response['data'] as $channel) {
+                    $channels_map[$channel['id']] = $channel;
+                }
+
+                foreach ($fav as $ch_id) {
+                    if (!empty($channels_map[$ch_id]))
+                        $ordered_list[] = $channels_map[$ch_id];
+                }
+
+                $this->response['data'] = $ordered_list;
+            }
+        }
+
+
+        $length = count($this->response['data']);
+
+        $enable_numbering_in_order = Config::getSafe('enable_numbering_in_order', false);
+
+        $excluded = 0;
+
+
+        for ($i = 0; $i < $length; $i++) {
+
+            if ($this->response['data'][$i]['censored'] && !in_array($this->response['data'][$i]['id'], $censored_exclude_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            } else {
+                $this->response['data'][$i]['lock'] = 0;
+            }
+
+            if (in_array($this->response['data'][$i]['id'], $censored_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            }
+
+
+
+            if ($this->response['data'][$i]['lock'] == 1 && !$this->include_censored) {
+                array_splice($this->response['data'], $i, 1);
+                $length--;
+                $i--;
+                $excluded++;
+                continue;
+            }
+
+
+
+
+            if (@$_REQUEST['fav'] || $enable_numbering_in_order) {
+                $this->response['data'][$i]['number'] = strval(($i + 1) + (self::max_page_items * ($this->page)) + ((!empty($_REQUEST['fav']) || $enable_numbering_in_order) ? $excluded : 0));
+            }
+            $curdata = null;
+            $curdata['i'] = $this->response['data'][$i]['id'];
+            $curdata['a'] = $this->response['data'][$i]['name'];
+            $curdata['n'] = $this->response['data'][$i]['number'];
+            $curdata['g'] = $this->response['data'][$i]['tv_genre_id'];
+            if($last_tv_id > 0 && $last_tv_id == $curdata['i'])
+            {
+                $ch_idx = i;
+            }
+            $this->response['data'][$i] = $curdata;
+        }
+
+        $page = ceil($ch_idx/100);
+
+
+
 
         return $this->response;
     }
+    */
+    public function prepareDataSimple() {
+
+        $fav = $this->getFav();
+        $censored_list = $this->getCensoredList();
+        $censored_exclude_list = $this->getCensoredExcludeList();
+        $dvb_channels = $this->getDvbChannels();
+
+        $force_ch_link_check = isset($_REQUEST['force_ch_link_check']) ? $_REQUEST['force_ch_link_check'] : false;
+        $last_tv_id = isset($_REQUEST['c'])?$_REQUEST['c']: -1;
+
+
+        $ch_idx = 0;
+        $max_page_items = empty($_REQUEST['n'])?self::max_page_items:@intval($_REQUEST['n']);
+        //var_dump('!!!!!!!!!!!!!!!!', $censored_list, $censored_exclude_list, $this->include_censored);
+
+        $epg = new Epg();
+
+        $quality = $this->stb->getParam('tv_quality');
+
+        $total_iptv_channels = (int)$this->response['total_items'];
+
+        if (!empty($_REQUEST['fav'])) {
+            $dvb_channels = array_values(array_filter($dvb_channels, function ($channel) use ($fav) {
+                return in_array($channel['id'], $fav);
+            }));
+        }
+
+        if (@$_REQUEST['sortby'] != 'name' && (empty($_REQUEST['genre']) || $_REQUEST['genre'] == '*' || $_REQUEST['genre'] == 'dvb')) {
+            $this->response['total_items'] += count($dvb_channels);
+        }
+
+
+
+        $length = count($this->response['data']);
+
+        $enable_numbering_in_order = Config::getSafe('enable_numbering_in_order', false);
+
+        $excluded = 0;
+
+        $ch_ids = array();
+
+        $offset = $this->cur_page * $max_page_items;
+        var_dump($length);
+        for ($i = 0; $i < $length; $i++) {
+
+            if ($this->response['data'][$i]['censored'] && !in_array($this->response['data'][$i]['id'], $censored_exclude_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            } else {
+                $this->response['data'][$i]['lock'] = 0;
+            }
+
+            if (in_array($this->response['data'][$i]['id'], $censored_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            }
+
+            unset($this->response['data'][$i]['descr']);
+            unset($this->response['data'][$i]['monitoring_url']);
+
+            if ($this->response['data'][$i]['lock'] == 1 && !$this->include_censored) {
+                array_splice($this->response['data'], $i, 1);
+                $length--;
+                $i--;
+                $excluded++;
+                continue;
+            }
+            if( $last_tv_id >=0 && $this->response['data'][$i]['id'] == $last_tv_id){
+                $ch_idx = $i;
+            }
+        }
+
+        $length = count($this->response['data']);
+        var_dump($last_tv_id);
+        var_dump($ch_idx);
+        var_dump($max_page_items);
+
+        $this->cur_page = @intval($ch_idx/$max_page_items);
+        $this->setResponse('cur_page', $this->cur_page);
+        $offset = $this->cur_page*$max_page_items;
+        for ($i = 0; $i < $length; $i++) {
+
+            if($i < $offset || $i >=  $offset + $max_page_items) {
+                $curdata = null;
+                $curdata['i'] = $this->response['data'][$i]['id'];
+                $curdata['a'] = $this->response['data'][$i]['name'];
+                $curdata['n'] = $this->response['data'][$i]['number'];
+                $curdata['g'] = $this->response['data'][$i]['tv_genre_id'];
+                $this->response['data'][$i] = $curdata;
+                continue;
+            }
+
+            if (Config::get('enable_tv_quality_filter')) {
+
+                if ($quality == 'low') {
+                    if ($this->response['data'][$i]['cmd_3']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    }
+                } else if ($quality == 'medium') {
+                    if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_3']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    }
+                } else {
+                    if ($this->response['data'][$i]['cmd_1']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    }
+                }
+            }
+
+            if (in_array($this->response['data'][$i]['id'], $fav)) {
+                $this->response['data'][$i]['fav'] = 1;
+            } else {
+                $this->response['data'][$i]['fav'] = 0;
+            }
+
+            if ($this->response['data'][$i]['tv_archive_type'] && (!isset($this->user_channel_options[$this->response['data'][$i]['id']]['enable_tv_archive']) || $this->user_channel_options[$this->response['data'][$i]['id']]['enable_tv_archive'] == 1)) {
+                $this->response['data'][$i]['archive'] = 1;
+            } else {
+                $this->response['data'][$i]['archive'] = 0;
+            }
+
+            $this->response['data'][$i]['enable_tv_archive'] = (int) !empty($this->response['data'][$i]['tv_archive_type']);
+
+            if (@$_REQUEST['fav'] || $enable_numbering_in_order) {
+                $this->response['data'][$i]['number'] = strval(($i + 1) + (self::max_page_items * ($this->page)) + ((!empty($_REQUEST['fav']) || $enable_numbering_in_order) ? $excluded : 0));
+            }
+
+            $this->response['data'][$i]['genres_str'] = '';
+
+            $this->response['data'][$i]['epg'] = empty($next_five_epg) ? array() : $next_five_epg;
+
+            $this->response['data'][$i]['open'] = 1;
+
+            if ($this->response['data'][$i]['use_http_tmp_link'] || Config::getSafe('force_ch_link_check', false) || $force_ch_link_check) {
+                $this->response['data'][$i]['cmd'] = 'ffrt http://' . Config::get('stream_proxy') . '/ch/' . $this->response['data'][$i]['id'];
+            }
+
+            if ($this->response['data'][$i]['enable_wowza_load_balancing']) {
+                $this->response['data'][$i]['use_http_tmp_link'] = 1;
+                $this->response['data'][$i]['cmd'] = 'udp://ch/' . $this->response['data'][$i]['id'];
+            }
+
+            if (Config::get('enable_subscription') && (empty($this->response['data'][$i]['type']) || $this->response['data'][$i]['type'] != 'dvb')) {
+
+                if (in_array($this->response['data'][$i]['id'], $this->getAllUserChannelsIds()) || $this->stb->isModerator()) {
+                    //if (in_array($this->response['data'][$i]['id'], $this->getAllUserChannelsIds())){
+                    $this->response['data'][$i]['open'] = 1;
+                } else {
+                    $this->response['data'][$i]['open'] = 0;
+                    $this->response['data'][$i]['cmd'] = 'udp://wtf?';
+                }
+            }
+
+            if ($this->response['data'][$i]['status'] == 0 && $this->stb->isModerator()) {
+                $this->response['data'][$i]['only_for_moderator'] = 1;
+            }
+
+            $ch_ids[] = $this->response['data'][$i]['id'];
+
+            $this->response['data'][$i]['mc_cmd'] = empty($this->response['data'][$i]['mc_cmd']) ? '' : '1';
+            $this->response['data'][$i]['allow_pvr'] = $this->response['data'][$i]['allow_pvr'] == 0 ? '' : '1';
+            $this->response['data'][$i]['allow_local_pvr'] = $this->response['data'][$i]['allow_local_pvr'] == 0 ? '' : '1';
+            $this->response['data'][$i]['pvr'] = (int)(Config::getSafe('show_tv_channel_pvr_icon', true) && ($this->response['data'][$i]['allow_pvr'] || $this->response['data'][$i]['allow_local_pvr']));
+        }
+
+        $cur_programs = $epg->getCurProgramsMap($ch_ids);
+
+        $urls_map = $this->getUrlsMapForChannels($ch_ids, $force_ch_link_check);
+
+        $endPos = ($offset+ $max_page_items) > count($this->response['data']) ? count($this->response['data']):$offset+ $max_page_items;
+
+        for ($i = $offset; $i < $endPos; $i++) {
+
+            $cur_program = isset($cur_programs[$this->response['data'][$i]['id']]) ? $cur_programs[$this->response['data'][$i]['id']] : null;
+
+            if (!empty($cur_program)) {
+                $cur_playing = $cur_program['t_time'] . ' ' . $cur_program['name'];
+            } else {
+                $cur_playing = $this->no_ch_info;
+            }
+
+            $this->response['data'][$i]['cur_playing'] = $cur_playing;
+
+            if (empty($this->response['data'][$i]['type']) || $this->response['data'][$i]['type'] != 'dvb') {
+                $this->response['data'][$i]['cmds'] = isset($urls_map[$this->response['data'][$i]['id']]) ? $urls_map[$this->response['data'][$i]['id']] : array();
+                $this->response['data'][$i]['cmd'] = empty($this->response['data'][$i]['cmds'][0]['url']) ? '' : $this->response['data'][$i]['cmds'][0]['url'];
+                $this->response['data'][$i]['use_http_tmp_link'] = empty($this->response['data'][$i]['cmds'][0]['use_http_tmp_link']) ? 0 : $this->response['data'][$i]['cmds'][0]['use_http_tmp_link'];
+                $this->response['data'][$i]['wowza_tmp_link'] = empty($this->response['data'][$i]['cmds'][0]['wowza_tmp_link']) ? 0 : $this->response['data'][$i]['cmds'][0]['wowza_tmp_link'];
+                $this->response['data'][$i]['use_load_balancing'] = empty($this->response['data'][$i]['cmds'][0]['use_load_balancing']) ? 0 : $this->response['data'][$i]['cmds'][0]['use_load_balancing'];
+            }
+
+            if (empty($this->response['data'][$i]['cmds']) || $this->response['data'][$i]['enable_monitoring'] && $this->response['data'][$i]['monitoring_status'] == 0) {
+                $this->response['data'][$i]['open'] = 0;
+                $this->response['data'][$i]['error'] = 'limit';
+                $this->response['data'][$i]['cmd'] = 'udp://wtf?';
+            }
+
+
+
+            $this->response['data'][$i]['i'] = $this->response['data'][$i]['id'];
+            $this->response['data'][$i]['a'] = $this->response['data'][$i]['name'];
+            $this->response['data'][$i]['n'] = $this->response['data'][$i]['number'];
+            $this->response['data'][$i]['g'] = $this->response['data'][$i]['tv_genre_id'];
+            unset($this->response['data'][$i]['id']);
+            unset($this->response['data'][$i]['name']);
+            unset($this->response['data'][$i]['number']);
+            unset($this->response['data'][$i]['tv_genre_id']);
+        }
+        return $this->response;
+    }
+
+
+    public function prepareDataPage() {
+
+        $fav = $this->getFav();
+        $censored_list = $this->getCensoredList();
+        $censored_exclude_list = $this->getCensoredExcludeList();
+        $dvb_channels = $this->getDvbChannels();
+
+        $force_ch_link_check = isset($_REQUEST['force_ch_link_check']) ? $_REQUEST['force_ch_link_check'] : false;
+
+        //var_dump('!!!!!!!!!!!!!!!!', $censored_list, $censored_exclude_list, $this->include_censored);
+
+        $epg = new Epg();
+
+        $quality = $this->stb->getParam('tv_quality');
+
+        $total_iptv_channels = (int)$this->response['total_items'];
+
+        if (!empty($_REQUEST['fav'])) {
+            $dvb_channels = array_values(array_filter($dvb_channels, function ($channel) use ($fav) {
+                return in_array($channel['id'], $fav);
+            }));
+        }
+
+        if (@$_REQUEST['sortby'] != 'name' && (empty($_REQUEST['genre']) || $_REQUEST['genre'] == '*' || $_REQUEST['genre'] == 'dvb')) {
+            $this->response['total_items'] += count($dvb_channels);
+        }
+
+
+
+        $length = count($this->response['data']);
+
+        $enable_numbering_in_order = Config::getSafe('enable_numbering_in_order', false);
+
+        $excluded = 0;
+
+        $ch_ids = array();
+        $this->cur_page = empty($_REQUEST['p'])?$this->cur_page:@intval($_REQUEST['p']);
+        $this->setResponse('cur_page', $this->cur_page);
+        $max_page_items = empty($_REQUEST['n'])?self::max_page_items:@intval($_REQUEST['n']);
+        var_dump($this->cur_page);
+        var_dump($max_page_items);
+        $offset = $this->cur_page * $max_page_items;
+        var_dump($length);
+        for ($i = 0; $i < $length; $i++) {
+
+            if ($this->response['data'][$i]['censored'] && !in_array($this->response['data'][$i]['id'], $censored_exclude_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            } else {
+                $this->response['data'][$i]['lock'] = 0;
+            }
+
+            if (in_array($this->response['data'][$i]['id'], $censored_list)) {
+                $this->response['data'][$i]['lock'] = 1;
+            }
+
+            unset($this->response['data'][$i]['descr']);
+            unset($this->response['data'][$i]['monitoring_url']);
+
+            if ($this->response['data'][$i]['lock'] == 1 && !$this->include_censored) {
+                array_splice($this->response['data'], $i, 1);
+                $length--;
+                $i--;
+                $excluded++;
+                continue;
+            }
+            if($i < $offset && $i >=  $offset + $max_page_items)
+                continue;
+
+            if (Config::get('enable_tv_quality_filter')) {
+
+                if ($quality == 'low') {
+                    if ($this->response['data'][$i]['cmd_3']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    }
+                } else if ($quality == 'medium') {
+                    if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_3']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    }
+                } else {
+                    if ($this->response['data'][$i]['cmd_1']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_1'];
+                        $this->response['data'][$i]['quality_high'] = 1;
+                    } else if ($this->response['data'][$i]['cmd_2']) {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_2'];
+                        $this->response['data'][$i]['quality_medium'] = 1;
+                    } else {
+                        $this->response['data'][$i]['cmd'] = $this->response['data'][$i]['cmd_3'];
+                        $this->response['data'][$i]['quality_low'] = 1;
+                    }
+                }
+            }
+
+            if (in_array($this->response['data'][$i]['id'], $fav)) {
+                $this->response['data'][$i]['fav'] = 1;
+            } else {
+                $this->response['data'][$i]['fav'] = 0;
+            }
+
+            if ($this->response['data'][$i]['tv_archive_type'] && (!isset($this->user_channel_options[$this->response['data'][$i]['id']]['enable_tv_archive']) || $this->user_channel_options[$this->response['data'][$i]['id']]['enable_tv_archive'] == 1)) {
+                $this->response['data'][$i]['archive'] = 1;
+            } else {
+                $this->response['data'][$i]['archive'] = 0;
+            }
+
+            $this->response['data'][$i]['enable_tv_archive'] = (int) !empty($this->response['data'][$i]['tv_archive_type']);
+
+            if (@$_REQUEST['fav'] || $enable_numbering_in_order) {
+                $this->response['data'][$i]['number'] = strval(($i + 1) + (self::max_page_items * ($this->page)) + ((!empty($_REQUEST['fav']) || $enable_numbering_in_order) ? $excluded : 0));
+            }
+
+            $this->response['data'][$i]['genres_str'] = '';
+
+            $this->response['data'][$i]['epg'] = empty($next_five_epg) ? array() : $next_five_epg;
+
+            $this->response['data'][$i]['open'] = 1;
+
+            if ($this->response['data'][$i]['use_http_tmp_link'] || Config::getSafe('force_ch_link_check', false) || $force_ch_link_check) {
+                $this->response['data'][$i]['cmd'] = 'ffrt http://' . Config::get('stream_proxy') . '/ch/' . $this->response['data'][$i]['id'];
+            }
+
+            if ($this->response['data'][$i]['enable_wowza_load_balancing']) {
+                $this->response['data'][$i]['use_http_tmp_link'] = 1;
+                $this->response['data'][$i]['cmd'] = 'udp://ch/' . $this->response['data'][$i]['id'];
+            }
+
+            if (Config::get('enable_subscription') && (empty($this->response['data'][$i]['type']) || $this->response['data'][$i]['type'] != 'dvb')) {
+
+                if (in_array($this->response['data'][$i]['id'], $this->getAllUserChannelsIds()) || $this->stb->isModerator()) {
+                    //if (in_array($this->response['data'][$i]['id'], $this->getAllUserChannelsIds())){
+                    $this->response['data'][$i]['open'] = 1;
+                } else {
+                    $this->response['data'][$i]['open'] = 0;
+                    $this->response['data'][$i]['cmd'] = 'udp://wtf?';
+                }
+            }
+
+            if ($this->response['data'][$i]['status'] == 0 && $this->stb->isModerator()) {
+                $this->response['data'][$i]['only_for_moderator'] = 1;
+            }
+
+            $ch_ids[] = $this->response['data'][$i]['id'];
+
+            $this->response['data'][$i]['mc_cmd'] = empty($this->response['data'][$i]['mc_cmd']) ? '' : '1';
+            $this->response['data'][$i]['allow_pvr'] = $this->response['data'][$i]['allow_pvr'] == 0 ? '' : '1';
+            $this->response['data'][$i]['allow_local_pvr'] = $this->response['data'][$i]['allow_local_pvr'] == 0 ? '' : '1';
+
+            $this->response['data'][$i]['pvr'] = (int)(Config::getSafe('show_tv_channel_pvr_icon', true) && ($this->response['data'][$i]['allow_pvr'] || $this->response['data'][$i]['allow_local_pvr']));
+        }
+        $this->response['data'] = array_splice($this->response['data'], $offset, $max_page_items);
+        $cur_programs = $epg->getCurProgramsMap($ch_ids);
+
+        $urls_map = $this->getUrlsMapForChannels($ch_ids, $force_ch_link_check);
+
+        for ($i = 0; $i < count($this->response['data']); $i++) {
+
+            $cur_program = isset($cur_programs[$this->response['data'][$i]['id']]) ? $cur_programs[$this->response['data'][$i]['id']] : null;
+
+            if (!empty($cur_program)) {
+                $cur_playing = $cur_program['t_time'] . ' ' . $cur_program['name'];
+            } else {
+                $cur_playing = $this->no_ch_info;
+            }
+
+            $this->response['data'][$i]['cur_playing'] = $cur_playing;
+
+            if (empty($this->response['data'][$i]['type']) || $this->response['data'][$i]['type'] != 'dvb') {
+                $this->response['data'][$i]['cmds'] = isset($urls_map[$this->response['data'][$i]['id']]) ? $urls_map[$this->response['data'][$i]['id']] : array();
+                $this->response['data'][$i]['cmd'] = empty($this->response['data'][$i]['cmds'][0]['url']) ? '' : $this->response['data'][$i]['cmds'][0]['url'];
+                $this->response['data'][$i]['use_http_tmp_link'] = empty($this->response['data'][$i]['cmds'][0]['use_http_tmp_link']) ? 0 : $this->response['data'][$i]['cmds'][0]['use_http_tmp_link'];
+                $this->response['data'][$i]['wowza_tmp_link'] = empty($this->response['data'][$i]['cmds'][0]['wowza_tmp_link']) ? 0 : $this->response['data'][$i]['cmds'][0]['wowza_tmp_link'];
+                $this->response['data'][$i]['use_load_balancing'] = empty($this->response['data'][$i]['cmds'][0]['use_load_balancing']) ? 0 : $this->response['data'][$i]['cmds'][0]['use_load_balancing'];
+            }
+
+            if (empty($this->response['data'][$i]['cmds']) || $this->response['data'][$i]['enable_monitoring'] && $this->response['data'][$i]['monitoring_status'] == 0) {
+                $this->response['data'][$i]['open'] = 0;
+                $this->response['data'][$i]['error'] = 'limit';
+                $this->response['data'][$i]['cmd'] = 'udp://wtf?';
+            }
+
+        }
+        return $this->response;
+    }
+
 
     private function getGenreById($id) {
 
diff --git a/server/lib/stbapi/itv.class.php b/server/lib/stbapi/itv.class.php
old mode 100644
new mode 100755
index 9b34974..ff8063e
--- a/server/lib/stbapi/itv.class.php
+++ b/server/lib/stbapi/itv.class.php
@@ -32,6 +32,10 @@ interface Itv
 
     public function getAllChannels();
 
+    public function getAllChannelsSimple();
+
+    public function getAllChannelsPage();
+
     public function getFavIds();
 
     public function saveDvbChannels();
