| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505 |
- <?php
- //homepage order
- function homepageOrder()
- {
- $homepageOrder = array(
- "homepageOrdercustomhtml" => $GLOBALS['homepageOrdercustomhtml'],
- "homepageOrdercustomhtmlTwo" => $GLOBALS['homepageOrdercustomhtmlTwo'],
- "homepageOrdernzbget" => $GLOBALS['homepageOrdernzbget'],
- "homepageOrderjdownloader" => $GLOBALS['homepageOrderjdownloader'],
- "homepageOrdersabnzbd" => $GLOBALS['homepageOrdersabnzbd'],
- "homepageOrderplexnowplaying" => $GLOBALS['homepageOrderplexnowplaying'],
- "homepageOrderplexrecent" => $GLOBALS['homepageOrderplexrecent'],
- "homepageOrderplexplaylist" => $GLOBALS['homepageOrderplexplaylist'],
- "homepageOrderembynowplaying" => $GLOBALS['homepageOrderembynowplaying'],
- "homepageOrderembyrecent" => $GLOBALS['homepageOrderembyrecent'],
- "homepageOrderombi" => $GLOBALS['homepageOrderombi'],
- "homepageOrdercalendar" => $GLOBALS['homepageOrdercalendar'],
- "homepageOrdertransmission" => $GLOBALS['homepageOrdertransmission'],
- "homepageOrderqBittorrent" => $GLOBALS['homepageOrderqBittorrent'],
- "homepageOrderdeluge" => $GLOBALS['homepageOrderdeluge'],
- "homepageOrderrTorrent" => $GLOBALS['homepageOrderrTorrent'],
- "homepageOrderdownloader" => $GLOBALS['homepageOrderdownloader'],
- "homepageOrderhealthchecks" => $GLOBALS['homepageOrderhealthchecks'],
- );
- asort($homepageOrder);
- return $homepageOrder;
- }
- function buildHomepage()
- {
- $homepageOrder = homepageOrder();
- $homepageBuilt = '';
- foreach ($homepageOrder as $key => $value) {
- $homepageBuilt .= buildHomepageItem($key);
- }
- return $homepageBuilt;
- }
- function buildHomepageItem($homepageItem)
- {
- $item = '<div id="' . $homepageItem . '">';
- switch ($homepageItem) {
- case 'homepageOrdercustomhtml':
- if ($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth'])) {
- $item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
- }
- break;
- case 'homepageOrdercustomhtmlTwo':
- if ($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth'])) {
- $item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
- }
- break;
- case 'homepageOrdernotice':
- break;
- case 'homepageOrdernoticeguest':
- break;
- case 'homepageOrderqBittorrent':
- if ($GLOBALS['homepageqBittorrentEnabled'] && qualifyRequest($GLOBALS['homepageqBittorrentAuth'])) {
- if ($GLOBALS['qBittorrentCombine']) {
- $item .= '
- <script>
- // homepageOrderqBittorrent
- buildDownloaderCombined(\'qBittorrent\');
- homepageDownloader("qBittorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End homepageOrderqBittorrent
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // homepageOrderqBittorrent
- $("#' . $homepageItem . '").html(buildDownloader("qBittorrent"));
- homepageDownloader("qBittorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End homepageOrderqBittorrent
- </script>
- ';
- }
- }
- break;
- case 'homepageOrderrTorrent':
- if ($GLOBALS['homepagerTorrentEnabled'] && qualifyRequest($GLOBALS['homepagerTorrentAuth'])) {
- if ($GLOBALS['rTorrentCombine']) {
- $item .= '
- <script>
- // homepageOrderrTorrent
- buildDownloaderCombined(\'rTorrent\');
- homepageDownloader("rTorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End homepageOrderrTorrent
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // homepageOrderrTorrent
- $("#' . $homepageItem . '").html(buildDownloader("rTorrent"));
- homepageDownloader("rTorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End homepageOrderrTorrent
- </script>
- ';
- }
- }
- break;
- case 'homepageOrderdeluge':
- if ($GLOBALS['homepageDelugeEnabled'] && qualifyRequest($GLOBALS['homepageDelugeAuth'])) {
- if ($GLOBALS['delugeCombine']) {
- $item .= '
- <script>
- // Deluge
- buildDownloaderCombined(\'deluge\');
- homepageDownloader("deluge", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End Deluge
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // Deluge
- $("#' . $homepageItem . '").html(buildDownloader("deluge"));
- homepageDownloader("deluge", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End Deluge
- </script>
- ';
- }
- }
- break;
- case 'homepageOrdertransmission':
- if ($GLOBALS['homepageTransmissionEnabled'] && qualifyRequest($GLOBALS['homepageTransmissionAuth'])) {
- if ($GLOBALS['transmissionCombine']) {
- $item .= '
- <script>
- // Transmission
- buildDownloaderCombined(\'transmission\');
- homepageDownloader("transmission", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End Transmission
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // Transmission
- $("#' . $homepageItem . '").html(buildDownloader("transmission"));
- homepageDownloader("transmission", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End Transmission
- </script>
- ';
- }
- }
- break;
- case 'homepageOrdernzbget':
- if ($GLOBALS['homepageNzbgetEnabled'] && qualifyRequest($GLOBALS['homepageNzbgetAuth'])) {
- if ($GLOBALS['nzbgetCombine']) {
- $item .= '
- <script>
- // NZBGet
- buildDownloaderCombined(\'nzbget\');
- homepageDownloader("nzbget", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End NZBGet
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // NZBGet
- $("#' . $homepageItem . '").html(buildDownloader("nzbget"));
- homepageDownloader("nzbget", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End NZBGet
- </script>
- ';
- }
- }
- break;
- case 'homepageOrderjdownloader':
- if ($GLOBALS['homepageJdownloaderEnabled'] && qualifyRequest($GLOBALS['homepageJdownloaderAuth'])) {
- if ($GLOBALS['jdownloaderCombine']) {
- $item .= '
- <script>
- // JDownloader
- buildDownloaderCombined(\'jdownloader\');
- homepageDownloader("jdownloader", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End JDownloader
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // JDownloader
- $("#' . $homepageItem . '").html(buildDownloader("jdownloader"));
- homepageDownloader("jdownloader", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End JDownloader
- </script>
- ';
- }
- }
- break;
- case 'homepageOrdersabnzbd':
- if ($GLOBALS['homepageSabnzbdEnabled'] && qualifyRequest($GLOBALS['homepageSabnzbdAuth'])) {
- if ($GLOBALS['sabnzbdCombine']) {
- $item .= '
- <script>
- // SabNZBd
- buildDownloaderCombined(\'sabnzbd\');
- homepageDownloader("sabnzbd", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End SabNZBd
- </script>
- ';
- } else {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // SabNZBd
- $("#' . $homepageItem . '").html(buildDownloader("sabnzbd"));
- homepageDownloader("sabnzbd", "' . $GLOBALS['homepageDownloadRefresh'] . '");
- // End SabNZBd
- </script>
- ';
- }
- }
- break;
- case 'homepageOrderplexnowplaying':
- if ($GLOBALS['homepagePlexStreams']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
- $item .= '
- <script>
- // Plex Stream
- homepageStream("plex", "' . $GLOBALS['homepageStreamRefresh'] . '");
- // End Plex Stream
- </script>
- ';
- }
- break;
- case 'homepageOrderplexrecent':
- if ($GLOBALS['homepagePlexRecent']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
- $item .= '
- <script>
- // Plex Recent
- homepageRecent("plex", "' . $GLOBALS['homepageRecentRefresh'] . '");
- // End Plex Recent
- </script>
- ';
- }
- break;
- case 'homepageOrderplexplaylist':
- if ($GLOBALS['homepagePlexPlaylist']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
- $item .= '
- <script>
- // Plex Playlist
- homepagePlaylist("plex");
- // End Plex Playlist
- </script>
- ';
- }
- break;
- case 'homepageOrderembynowplaying':
- if ($GLOBALS['homepageEmbyStreams'] && $GLOBALS['homepageEmbyEnabled']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
- $item .= '
- <script>
- // Emby Stream
- homepageStream("emby", "' . $GLOBALS['homepageStreamRefresh'] . '");
- // End Emby Stream
- </script>
- ';
- }
- break;
- case 'homepageOrderembyrecent':
- if ($GLOBALS['homepageEmbyRecent'] && $GLOBALS['homepageEmbyEnabled']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
- $item .= '
- <script>
- // Emby Recent
- homepageRecent("emby", "' . $GLOBALS['homepageRecentRefresh'] . '");
- // End Emby Recent
- </script>
- ';
- }
- break;
- case 'homepageOrderombi':
- if ($GLOBALS['homepageOmbiEnabled']) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
- $item .= '
- <script>
- // Ombi Requests
- homepageRequests("' . $GLOBALS['ombiRefresh'] . '");
- // End Ombi Requests
- </script>
- ';
- }
- break;
- case 'homepageOrdercalendar':
- if ($GLOBALS['homepageSonarrEnabled'] && qualifyRequest($GLOBALS['homepageSonarrAuth']) || ($GLOBALS['homepageRadarrEnabled'] && qualifyRequest($GLOBALS['homepageRadarrAuth'])) || ($GLOBALS['homepageSickrageEnabled'] && qualifyRequest($GLOBALS['homepageSickrageAuth'])) || ($GLOBALS['homepageCouchpotatoEnabled'] && qualifyRequest($GLOBALS['homepageCouchpotatoAuth'])) || ($GLOBALS['homepageCalendarEnabled'] && qualifyRequest($GLOBALS['homepageCalendarAuth']) && $GLOBALS['calendariCal'] !== '')) {
- $item .= '
- <div id="calendar" class="fc fc-ltr m-b-30"></div>
- <script>
- // Calendar
- homepageCalendar("' . $GLOBALS['calendarRefresh'] . '");
- // End Calendar
- </script>
- ';
- }
- break;
- case 'homepageOrderhealthchecks':
- if ($GLOBALS['homepageHealthChecksEnabled'] && qualifyRequest($GLOBALS['homepageHealthChecksAuth'])) {
- $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Health Checks...</h2></div>';
- $item .= '
- <script>
- // Health Checks
- homepageHealthChecks("' . $GLOBALS['healthChecksTags'] . '","' . $GLOBALS['homepageHealthChecksRefresh'] . '");
- // End Health Checks
- </script>
- ';
- }
- break;
- default:
- # code...
- break;
- }
- return $item . '</div>';
- }
- function getHomepageList()
- {
- $groups = groupSelect();
- $ombiTvOptions = array(
- array(
- 'name' => 'All Seasons',
- 'value' => 'all'
- ),
- array(
- 'name' => 'First Season Only',
- 'value' => 'first'
- ),
- array(
- 'name' => 'Last Season Only',
- 'value' => 'last'
- ),
- );
- $mediaServers = array(
- array(
- 'name' => 'N/A',
- 'value' => ''
- ),
- array(
- 'name' => 'Plex',
- 'value' => 'plex'
- ),
- array(
- 'name' => 'Emby [Not Available]',
- 'value' => 'emby'
- )
- );
- $limit = array(
- array(
- 'name' => '1 Item',
- 'value' => '1'
- ),
- array(
- 'name' => '2 Items',
- 'value' => '2'
- ),
- array(
- 'name' => '3 Items',
- 'value' => '3'
- ),
- array(
- 'name' => '4 Items',
- 'value' => '4'
- ),
- array(
- 'name' => '5 Items',
- 'value' => '5'
- ),
- array(
- 'name' => '6 Items',
- 'value' => '6'
- ),
- array(
- 'name' => '7 Items',
- 'value' => '7'
- ),
- array(
- 'name' => '8 Items',
- 'value' => '8'
- ),
- array(
- 'name' => 'Unlimited',
- 'value' => '1000'
- ),
- );
- $day = array(
- array(
- 'name' => 'Sunday',
- 'value' => '0'
- ),
- array(
- 'name' => 'Monday',
- 'value' => '1'
- ),
- array(
- 'name' => 'Tueday',
- 'value' => '2'
- ),
- array(
- 'name' => 'Wednesday',
- 'value' => '3'
- ),
- array(
- 'name' => 'Thursday',
- 'value' => '4'
- ),
- array(
- 'name' => 'Friday',
- 'value' => '5'
- ),
- array(
- 'name' => 'Saturday',
- 'value' => '6'
- )
- );
- $calendarDefault = array(
- array(
- 'name' => 'Month',
- 'value' => 'month'
- ),
- array(
- 'name' => 'Day',
- 'value' => 'basicDay'
- ),
- array(
- 'name' => 'Week',
- 'value' => 'basicWeek'
- ),
- array(
- 'name' => 'List',
- 'value' => 'list'
- )
- );
- $timeFormat = array(
- array(
- 'name' => '6p',
- 'value' => 'h(:mm)t'
- ),
- array(
- 'name' => '6:00p',
- 'value' => 'h:mmt'
- ),
- array(
- 'name' => '6:00',
- 'value' => 'h:mm'
- ),
- array(
- 'name' => '18',
- 'value' => 'H(:mm)'
- ),
- array(
- 'name' => '18:00',
- 'value' => 'H:mm'
- )
- );
- $rTorrentSortOptions = array(
- array(
- 'name' => 'Date Desc',
- 'value' => 'dated'
- ),
- array(
- 'name' => 'Date Asc',
- 'value' => 'datea'
- ),
- array(
- 'name' => 'Hash Desc',
- 'value' => 'hashd'
- ),
- array(
- 'name' => 'Hash Asc',
- 'value' => 'hasha'
- ),
- array(
- 'name' => 'Name Desc',
- 'value' => 'named'
- ),
- array(
- 'name' => 'Name Asc',
- 'value' => 'namea'
- ),
- array(
- 'name' => 'Size Desc',
- 'value' => 'sized'
- ),
- array(
- 'name' => 'Size Asc',
- 'value' => 'sizea'
- ),
- array(
- 'name' => 'Label Desc',
- 'value' => 'labeld'
- ),
- array(
- 'name' => 'Label Asc',
- 'value' => 'labela'
- ),
- array(
- 'name' => 'Status Desc',
- 'value' => 'statusd'
- ),
- array(
- 'name' => 'Status Asc',
- 'value' => 'statusa'
- ),
- );
- $qBittorrentSortOptions = array(
- array(
- 'name' => 'Hash',
- 'value' => 'hash'
- ),
- array(
- 'name' => 'Name',
- 'value' => 'name'
- ),
- array(
- 'name' => 'Size',
- 'value' => 'size'
- ),
- array(
- 'name' => 'Progress',
- 'value' => 'progress'
- ),
- array(
- 'name' => 'Download Speed',
- 'value' => 'dlspeed'
- ),
- array(
- 'name' => 'Upload Speed',
- 'value' => 'upspeed'
- ),
- array(
- 'name' => 'Priority',
- 'value' => 'priority'
- ),
- array(
- 'name' => 'Number of Seeds',
- 'value' => 'num_seeds'
- ),
- array(
- 'name' => 'Number of Seeds in Swarm',
- 'value' => 'num_complete'
- ),
- array(
- 'name' => 'Number of Leechers',
- 'value' => 'num_leechs'
- ),
- array(
- 'name' => 'Number of Leechers in Swarm',
- 'value' => 'num_incomplete'
- ),
- array(
- 'name' => 'Ratio',
- 'value' => 'ratio'
- ),
- array(
- 'name' => 'ETA',
- 'value' => 'eta'
- ),
- array(
- 'name' => 'State',
- 'value' => 'state'
- ),
- array(
- 'name' => 'Category',
- 'value' => 'category'
- )
- );
- $xmlStatus = (extension_loaded('xmlrpc')) ? 'Installed' : 'Not Installed';
- return array(array(
- 'name' => 'Calendar',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/calendar.png',
- 'category' => 'HOMEPAGE',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageCalendarEnabled',
- 'label' => 'Enable iCal',
- 'value' => $GLOBALS['homepageCalendarEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageCalendarAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageCalendarAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'input',
- 'name' => 'calendariCal',
- 'label' => 'iCal URL\'s',
- 'value' => $GLOBALS['calendariCal'],
- 'placeholder' => 'separate by comma\'s'
- ),
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'number',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'number',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- )
- ),
- )
- ),
- array(
- 'name' => 'Plex',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/plex.png',
- 'category' => 'Media Server',
- //'license' => $GLOBALS['license'],
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagePlexAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'plexURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['plexURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'plexToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['plexToken']
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'plexID',
- 'label' => 'Plex Machine',
- 'value' => $GLOBALS['plexID']
- )
- ),
- 'Active Streams' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexStreams',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexStreams']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexStreamsAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexStreamsAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'switch',
- 'name' => 'homepageShowStreamNames',
- 'label' => 'User Information',
- 'value' => $GLOBALS['homepageShowStreamNames']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageShowStreamNamesAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageStreamRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageStreamRefresh'],
- 'options' => optionTime()
- ),
- ),
- 'Recent Items' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexRecent',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexRecent']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexRecentlyAddedMethod',
- 'label' => 'API Method',
- 'value' => $GLOBALS['homepagePlexRecentlyAddedMethod'],
- 'help' => 'Legacy - 1 API Call, will grab as many items as you specify below | Separate - 3 API Calls, will grab the below amount per item category',
- 'options' => array(
- array(
- 'name' => 'Legacy',
- 'value' => 'legacy'
- ),
- array(
- 'name' => 'Separate',
- 'value' => 'separate'
- ),
- )
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexRecentAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexRecentAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'number',
- 'name' => 'homepageRecentLimit',
- 'label' => 'Item Limit',
- 'value' => $GLOBALS['homepageRecentLimit'],
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRecentRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageRecentRefresh'],
- 'options' => optionTime()
- ),
- ),
- 'Media Search' => array(
- array(
- 'type' => 'switch',
- 'name' => 'mediaSearch',
- 'label' => 'Enable',
- 'value' => $GLOBALS['mediaSearch']
- ),
- array(
- 'type' => 'select',
- 'name' => 'mediaSearchAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['mediaSearchAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'mediaSearchType',
- 'label' => 'Media Server',
- 'value' => $GLOBALS['mediaSearchType'],
- 'options' => $mediaServers
- ),
- ),
- 'Playlists' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexPlaylist',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexPlaylist']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexPlaylistAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexPlaylistAuth'],
- 'options' => $groups
- ),
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'plexTabName',
- 'label' => 'Plex Tab Name',
- 'value' => $GLOBALS['plexTabName'],
- 'placeholder' => 'Only use if you have Plex in a reverse proxy'
- ),
- array(
- 'type' => 'input',
- 'name' => 'plexTabURL',
- 'label' => 'Plex Tab WAN URL',
- 'value' => $GLOBALS['plexTabURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'select',
- 'name' => 'cacheImageSize',
- 'label' => 'Image Cache Size',
- 'value' => $GLOBALS['cacheImageSize'],
- 'options' => array(
- array(
- 'name' => 'Low',
- 'value' => '.5'
- ),
- array(
- 'name' => '1x',
- 'value' => '1'
- ),
- array(
- 'name' => '2x',
- 'value' => '2'
- ),
- array(
- 'name' => '3x',
- 'value' => '3'
- )
- )
- )
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'plex\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Emby',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/emby.png',
- 'category' => 'Media Server',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageEmbyAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'embyURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['embyURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'embyToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['embyToken']
- )
- ),
- 'Active Streams' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyStreams',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyStreams']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyStreamsAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'switch',
- 'name' => 'homepageShowStreamNames',
- 'label' => 'User Information',
- 'value' => $GLOBALS['homepageShowStreamNames']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageShowStreamNamesAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageStreamRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageStreamRefresh'],
- 'options' => optionTime()
- ),
- ),
- 'Recent Items' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyRecent',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyRecent']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyRecentAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageEmbyRecentAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'number',
- 'name' => 'homepageRecentLimit',
- 'label' => 'Item Limit',
- 'value' => $GLOBALS['homepageRecentLimit'],
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRecentRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageRecentRefresh'],
- 'options' => optionTime()
- ),
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'embyTabName',
- 'label' => 'Emby Tab Name',
- 'value' => $GLOBALS['embyTabName'],
- 'placeholder' => 'Only use if you have Emby in a reverse proxy'
- ),
- array(
- 'type' => 'input',
- 'name' => 'embyTabURL',
- 'label' => 'Emby Tab WAN URL',
- 'value' => $GLOBALS['embyTabURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'select',
- 'name' => 'cacheImageSize',
- 'label' => 'Image Cache Size',
- 'value' => $GLOBALS['cacheImageSize'],
- 'options' => array(
- array(
- 'name' => 'Low',
- 'value' => '.5'
- ),
- array(
- 'name' => '1x',
- 'value' => '1'
- ),
- array(
- 'name' => '2x',
- 'value' => '2'
- ),
- array(
- 'name' => '3x',
- 'value' => '3'
- )
- )
- )
- )
- )
- ),
- array(
- 'name' => 'JDownloader',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/jdownloader.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'custom' => '
- <div class="row">
- <div class="col-lg-12">
- <div class="panel panel-info">
- <div class="panel-heading">
- <span lang="en">Notice</span>
- </div>
- <div class="panel-wrapper collapse in" aria-expanded="true">
- <div class="panel-body">
- <ul class="list-icons">
- <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://pypi.org/project/myjd-api/" target="_blank">Download [myjd-api] Module</a></li>
- <li><i class="fa fa-chevron-right text-danger"></i> Add <b>/api/myjd</b> to the URL if you are using <a href="https://pypi.org/project/RSScrawler/" target="_blank">RSScrawler</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- ',
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageJdownloaderEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageJdownloaderEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageJdownloaderAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageJdownloaderAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'jdownloaderURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['jdownloaderURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'jdownloaderCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['jdownloaderCombine']
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'jdownloader\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'SabNZBD',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sabnzbd.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSabnzbdEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSabnzbdEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSabnzbdAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSabnzbdAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sabnzbdURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sabnzbdURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sabnzbdToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sabnzbdToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'sabnzbdCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['sabnzbdCombine']
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'sabnzbd\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'NZBGet',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/nzbget.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageNzbgetEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageNzbgetEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageNzbgetAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageNzbgetAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'nzbgetURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['nzbgetURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'nzbgetUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['nzbgetUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'nzbgetPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['nzbgetPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'nzbgetCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['nzbgetCombine']
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'nzbget\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Transmission',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/transmission.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageTransmissionEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageTransmissionEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageTransmissionAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageTransmissionAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'transmissionURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['transmissionURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'transmissionUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['transmissionUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'transmissionPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['transmissionPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'transmissionHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['transmissionHideSeeding']
- ), array(
- 'type' => 'switch',
- 'name' => 'transmissionHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['transmissionHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'transmissionCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['transmissionCombine']
- ),
- )
- )
- ),
- array(
- 'name' => 'qBittorrent',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/qBittorrent.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageqBittorrentEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageqBittorrentEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageqBittorrentAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageqBittorrentAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'qBittorrentURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['qBittorrentURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'qBittorrentUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['qBittorrentUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'qBittorrentPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['qBittorrentPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'qBittorrentHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['qBittorrentHideSeeding']
- ), array(
- 'type' => 'switch',
- 'name' => 'qBittorrentHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['qBittorrentHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'qBittorrentSortOrder',
- 'label' => 'Order',
- 'value' => $GLOBALS['qBittorrentSortOrder'],
- 'options' => $qBittorrentSortOptions
- ), array(
- 'type' => 'switch',
- 'name' => 'qBittorrentReverseSorting',
- 'label' => 'Reverse Sorting',
- 'value' => $GLOBALS['qBittorrentReverseSorting']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'qBittorrentCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['qBittorrentCombine']
- ),
- )
- )
- ),
- array(
- 'name' => 'rTorrent',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/rTorrent.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'FYI' => array(
- array(
- 'type' => 'html',
- 'label' => '',
- 'override' => 12,
- 'html' => '
- <div class="row">
- <div class="col-lg-12">
- <div class="panel panel-info">
- <div class="panel-heading">
- <span lang="en">This module requires XMLRPC</span>
- </div>
- <div class="panel-wrapper collapse in" aria-expanded="true">
- <div class="panel-body">
- <span lang="en">Status: [ <b>' . $xmlStatus . '</b> ]</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- '
- )
- ),
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagerTorrentEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagerTorrentEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagerTorrentAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagerTorrentAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'rTorrentURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['rTorrentURL'],
- 'help' => 'Only use if you cannot connect. Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'rTorrentURLOverride',
- 'label' => 'rTorrent API URL Override',
- 'value' => $GLOBALS['rTorrentURLOverride'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port/xmlrpc'
- ),
- array(
- 'type' => 'input',
- 'name' => 'rTorrentUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['rTorrentUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'rTorrentPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['rTorrentPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'rTorrentHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['rTorrentHideSeeding']
- ), array(
- 'type' => 'switch',
- 'name' => 'rTorrentHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['rTorrentHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'rTorrentSortOrder',
- 'label' => 'Order',
- 'value' => $GLOBALS['rTorrentSortOrder'],
- 'options' => $rTorrentSortOptions
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'rTorrentCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['rTorrentCombine']
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'rtorrent\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Deluge',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/deluge.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'custom' => '
- <div class="row">
- <div class="col-lg-12">
- <div class="panel panel-info">
- <div class="panel-heading">
- <span lang="en">Notice</span>
- </div>
- <div class="panel-wrapper collapse in" aria-expanded="true">
- <div class="panel-body">
- <ul class="list-icons">
- <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://github.com/idlesign/deluge-webapi/tree/master/dist" target="_blank">Download Plugin</a></li>
- <li><i class="fa fa-chevron-right text-danger"></i> Open Deluge Web UI, go to "Preferences -> Plugins -> Install plugin" and choose egg file.</li>
- <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- ',
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageDelugeEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageDelugeEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDelugeAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageDelugeAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'delugeURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['delugeURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password',
- 'name' => 'delugePassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['delugePassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'delugeHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['delugeHideSeeding']
- ), array(
- 'type' => 'switch',
- 'name' => 'delugeHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['delugeHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'delugeCombine',
- 'label' => 'Add to Combined Downloader',
- 'value' => $GLOBALS['delugeCombine']
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'deluge\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Sonarr',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sonarr.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSonarrEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSonarrEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSonarrAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSonarrAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sonarrURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sonarrURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sonarrToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sonarrToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'number',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'number',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'sonarrUnmonitored',
- 'label' => 'Show Unmonitored',
- 'value' => $GLOBALS['sonarrUnmonitored']
- )
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'sonarr\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Lidarr',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/lidarr.png',
- 'category' => 'PMR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageLidarrEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageLidarrEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageLidarrAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageLidarrAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'lidarrURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['lidarrURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'lidarrToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['lidarrToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'number',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'number',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- ),
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'lidarr\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'Radarr',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/radarr.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageRadarrEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageRadarrEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRadarrAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageRadarrAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'radarrURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['radarrURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'radarrToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['radarrToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'number',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'number',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- )
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'radarr\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'CouchPotato',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/couchpotato.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageCouchpotatoEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageCouchpotatoEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageCouchpotatoAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageCouchpotatoAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'couchpotatoURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['couchpotatoURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'couchpotatoToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['couchpotatoToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- )
- )
- )
- ),
- array(
- 'name' => 'SickRage',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sickrage.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSickrageEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSickrageEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSickrageAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSickrageAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sickrageURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sickrageURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sickrageToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sickrageToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => optionTime()
- )
- )
- )
- ),
- array(
- 'name' => 'Ombi',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/ombi.png',
- 'category' => 'Requests',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageOmbiEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageOmbiEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageOmbiAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageOmbiAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'ombiURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['ombiURL'],
- 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'ombiToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['ombiToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageOmbiRequestAuth',
- 'label' => 'Minimum Group to Request',
- 'value' => $GLOBALS['homepageOmbiRequestAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'ombiTvDefault',
- 'label' => 'TV Show Default Request',
- 'value' => $GLOBALS['ombiTvDefault'],
- 'options' => $ombiTvOptions
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiLimitUser',
- 'label' => 'Limit to User',
- 'value' => $GLOBALS['ombiLimitUser']
- ),
- array(
- 'type' => 'number',
- 'name' => 'ombiLimit',
- 'label' => 'Item Limit',
- 'value' => $GLOBALS['ombiLimit'],
- ),
- array(
- 'type' => 'select',
- 'name' => 'ombiRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['ombiRefresh'],
- 'options' => optionTime()
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiAlias',
- 'label' => 'Use Ombi Alias Names',
- 'value' => $GLOBALS['ombiAlias'],
- 'help' => 'Use Ombi Alias Names instead of Usernames - If Alias is blank, Alias will fallback to Username'
- )
- ),
- 'Default Filter' => array(
- array(
- 'type' => 'switch',
- 'name' => 'ombiDefaultFilterAvailable',
- 'label' => 'Show Available',
- 'value' => $GLOBALS['ombiDefaultFilterAvailable'],
- 'help' => 'Show All Available Ombi Requests'
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiDefaultFilterUnavailable',
- 'label' => 'Show Unavailable',
- 'value' => $GLOBALS['ombiDefaultFilterUnavailable'],
- 'help' => 'Show All Unavailable Ombi Requests'
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiDefaultFilterApproved',
- 'label' => 'Show Approved',
- 'value' => $GLOBALS['ombiDefaultFilterApproved'],
- 'help' => 'Show All Approved Ombi Requests'
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiDefaultFilterUnapproved',
- 'label' => 'Show Unapproved',
- 'value' => $GLOBALS['ombiDefaultFilterUnapproved'],
- 'help' => 'Show All Unapproved Ombi Requests'
- ),
- array(
- 'type' => 'switch',
- 'name' => 'ombiDefaultFilterDenied',
- 'label' => 'Show Denied',
- 'value' => $GLOBALS['ombiDefaultFilterDenied'],
- 'help' => 'Show All Denied Ombi Requests'
- )
- ),
- 'Test Connection' => array(
- array(
- 'type' => 'blank',
- 'label' => 'Please Save before Testing'
- ),
- array(
- 'type' => 'button',
- 'label' => '',
- 'icon' => 'fa fa-flask',
- 'class' => 'pull-right',
- 'text' => 'Test Connection',
- 'attr' => 'onclick="testAPIConnection(\'ombi\')"'
- ),
- )
- )
- ),
- array(
- 'name' => 'HealthChecks',
- 'enabled' => true,
- 'image' => 'plugins/images/tabs/healthchecks.png',
- 'category' => 'Monitor',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageHealthChecksEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageHealthChecksEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageHealthChecksAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageHealthChecksAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'healthChecksURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['healthChecksURL'],
- 'help' => 'URL for HealthChecks API',
- 'placeholder' => 'HealthChecks API URL'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'healthChecksToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['healthChecksToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'healthChecksTags',
- 'label' => 'Tags',
- 'value' => $GLOBALS['healthChecksTags'],
- 'help' => 'Pull only checks with this tag - Blank for all',
- 'placeholder' => 'Multiple tags using CSV - tag1,tag2'
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageHealthChecksRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageHealthChecksRefresh'],
- 'options' => optionTime()
- ),
- ),
- )
- ),
- array(
- 'name' => 'CustomHTML-1',
- 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/custom1.png',
- 'category' => 'Custom',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagCustomHTMLoneEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagCustomHTMLoneAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
- 'options' => $groups
- )
- ),
- 'Code' => array(
- array(
- 'type' => 'textbox',
- 'name' => 'customHTMLone',
- 'class' => 'hidden customHTMLoneTextarea',
- 'label' => '',
- 'value' => $GLOBALS['customHTMLone'],
- ),
- array(
- 'type' => 'html',
- 'override' => 12,
- 'label' => 'Custom HTML/JavaScript',
- 'html' => '<button type="button" class="hidden savecustomHTMLoneTextarea btn btn-info btn-circle pull-right m-r-5 m-l-10"><i class="fa fa-save"></i> </button><div id="customHTMLoneEditor" style="height:300px">' . htmlentities($GLOBALS['customHTMLone']) . '</div>'
- ),
- )
- )
- ),
- array(
- 'name' => 'CustomHTML-2',
- 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/custom2.png',
- 'category' => 'Custom',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagCustomHTMLtwoEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagCustomHTMLtwoAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
- 'options' => $groups
- )
- ),
- 'Code' => array(
- array(
- 'type' => 'textbox',
- 'name' => 'customHTMLtwo',
- 'class' => 'hidden customHTMLtwoTextarea',
- 'label' => '',
- 'value' => $GLOBALS['customHTMLtwo'],
- ),
- array(
- 'type' => 'html',
- 'override' => 12,
- 'label' => 'Custom HTML/JavaScript',
- 'html' => '<button type="button" class="hidden savecustomHTMLtwoTextarea btn btn-info btn-circle pull-right m-r-5 m-l-10"><i class="fa fa-save"></i> </button><div id="customHTMLtwoEditor" style="height:300px">' . htmlentities($GLOBALS['customHTMLtwo']) . '</div>'
- ),
- )
- )
- )
- );
- }
- function buildHomepageSettings()
- {
- $homepageOrder = homepageOrder();
- $homepageList = '<h4>Drag Homepage Items to Order Them</h4><div id="homepage-items-sort" class="external-events">';
- $inputList = '<form id="homepage-values" class="row">';
- foreach ($homepageOrder as $key => $val) {
- switch ($key) {
- case 'homepageOrdercustomhtml':
- $class = 'bg-info';
- $image = 'plugins/images/tabs/custom1.png';
- if (!$GLOBALS['homepagCustomHTMLoneEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdercustomhtmlTwo':
- $class = 'bg-info';
- $image = 'plugins/images/tabs/custom2.png';
- if (!$GLOBALS['homepagCustomHTMLtwoEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdertransmission':
- $class = 'bg-transmission';
- $image = 'plugins/images/tabs/transmission.png';
- if (!$GLOBALS['homepageTransmissionEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdernzbget':
- $class = 'bg-nzbget';
- $image = 'plugins/images/tabs/nzbget.png';
- if (!$GLOBALS['homepageNzbgetEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderjdownloader':
- $class = 'bg-sab';
- $image = 'plugins/images/tabs/jdownloader.png';
- if (!$GLOBALS['homepageJdownloaderEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdersabnzbd':
- $class = 'bg-sab';
- $image = 'plugins/images/tabs/sabnzbd.png';
- if (!$GLOBALS['homepageSabnzbdEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderdeluge':
- $class = 'bg-deluge';
- $image = 'plugins/images/tabs/deluge.png';
- if (!$GLOBALS['homepageDelugeEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderqBittorrent':
- $class = 'bg-qbit';
- $image = 'plugins/images/tabs/qBittorrent.png';
- if (!$GLOBALS['homepageqBittorrentEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderrTorrent':
- $class = 'bg-qbit';
- $image = 'plugins/images/tabs/rTorrent.png';
- if (!$GLOBALS['homepagerTorrentEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderplexnowplaying':
- case 'homepageOrderplexrecent':
- case 'homepageOrderplexplaylist':
- $class = 'bg-plex';
- $image = 'plugins/images/tabs/plex.png';
- if (!$GLOBALS['homepagePlexEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderembynowplaying':
- case 'homepageOrderembyrecent':
- $class = 'bg-emby';
- $image = 'plugins/images/tabs/emby.png';
- if (!$GLOBALS['homepageEmbyEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderombi':
- $class = 'bg-inverse';
- $image = 'plugins/images/tabs/ombi.png';
- if (!$GLOBALS['homepageOmbiEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdercalendar':
- $class = 'bg-primary';
- $image = 'plugins/images/tabs/calendar.png';
- if (!$GLOBALS['homepageSonarrEnabled'] && !$GLOBALS['homepageRadarrEnabled'] && !$GLOBALS['homepageSickrageEnabled'] && !$GLOBALS['homepageCouchpotatoEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderdownloader':
- $class = 'bg-inverse';
- $image = 'plugins/images/tabs/downloader.png';
- if (!$GLOBALS['jdownloaderCombine'] && !$GLOBALS['sabnzbdCombine'] && !$GLOBALS['nzbgetCombine'] && !$GLOBALS['rTorrentCombine'] && !$GLOBALS['delugeCombine'] && !$GLOBALS['transmissionCombine'] && !$GLOBALS['qBittorrentCombine']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderhealthchecks':
- $class = 'bg-healthchecks';
- $image = 'plugins/images/tabs/healthchecks.png';
- if (!$GLOBALS['homepageHealthChecksEnabled']) {
- $class .= ' faded';
- }
- break;
- default:
- $class = 'blue-bg';
- $image = '';
- break;
- }
- $homepageList .= '
- <div class="col-md-3 col-xs-12 sort-homepage m-t-10 hvr-grow">
- <div class="homepage-drag fc-event ' . $class . ' lazyload" data-src="' . $image . '">
- <span class="ordinal-position text-uppercase badge bg-org homepage-number" data-link="' . $key . '" style="float:left;width: 30px;">' . $val . '</span>
- <span class="homepage-text"> ' . strtoupper(substr($key, 13)) . '</span>
- </div>
- </div>
- ';
- $inputList .= '<input type="hidden" name="' . $key . '">';
- }
- $homepageList .= '</div>';
- $inputList .= '</form>';
- return $homepageList . $inputList;
- }
- function ombiTVDefault($type)
- {
- switch ($type) {
- case 'all':
- return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
- case 'first':
- return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
- case 'last':
- return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
- default:
- return false;
- }
- return false;
- }
|