homepage-functions.php 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <?php
  2. //homepage order
  3. function homepageOrder(){
  4. $homepageOrder = array(
  5. "homepageOrdercustomhtml" => $GLOBALS['homepageOrdercustomhtml'],
  6. "homepageOrdercustomhtmlTwo" => $GLOBALS['homepageOrdercustomhtmlTwo'],
  7. "homepageOrdernotice" => $GLOBALS['homepageOrdernotice'],
  8. "homepageOrderplexsearch" => $GLOBALS['homepageOrderplexsearch'],
  9. "homepageOrderspeedtest" => $GLOBALS['homepageOrderspeedtest'],
  10. "homepageOrdernzbget" => $GLOBALS['homepageOrdernzbget'],
  11. "homepageOrdersabnzbd" => $GLOBALS['homepageOrdersabnzbd'],
  12. "homepageOrderplexnowplaying" => $GLOBALS['homepageOrderplexnowplaying'],
  13. "homepageOrderplexrecent" => $GLOBALS['homepageOrderplexrecent'],
  14. "homepageOrderplexplaylist" => $GLOBALS['homepageOrderplexplaylist'],
  15. "homepageOrderembynowplaying" => $GLOBALS['homepageOrderembynowplaying'],
  16. "homepageOrderembyrecent" => $GLOBALS['homepageOrderembyrecent'],
  17. "homepageOrderombi" => $GLOBALS['homepageOrderombi'],
  18. "homepageOrdercalendar" => $GLOBALS['homepageOrdercalendar'],
  19. "homepageOrdernoticeguest" => $GLOBALS['homepageOrdernoticeguest'],
  20. "homepageOrdertransmission" => $GLOBALS['homepageOrdertransmission'],
  21. "homepageOrderqBittorrent" => $GLOBALS['homepageOrderqBittorrent'],
  22. "homepageOrderdeluge" => $GLOBALS['homepageOrderdeluge'],
  23. );
  24. asort($homepageOrder);
  25. return $homepageOrder;
  26. }
  27. function buildHomepage(){
  28. $homepageOrder = homepageOrder();
  29. $homepageBuilt = '';
  30. foreach ($homepageOrder as $key => $value) {
  31. $homepageBuilt .= buildHomepageItem($key);
  32. }
  33. return $homepageBuilt;
  34. }
  35. function buildHomepageItem($homepageItem){
  36. $item = '<div id="'.$homepageItem.'">';
  37. switch ($homepageItem) {
  38. case 'homepageOrderplexsearch':
  39. break;
  40. case 'homepageOrdercustomhtml':
  41. if($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth']) ){
  42. $item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
  43. }
  44. break;
  45. case 'homepageOrdercustomhtmlTwo':
  46. if($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth']) ){
  47. $item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
  48. }
  49. break;
  50. case 'homepageOrdernotice':
  51. break;
  52. case 'homepageOrdernoticeguest':
  53. break;
  54. case 'homepageOrderspeedtest':
  55. break;
  56. case 'homepageOrderqBittorrent':
  57. if($GLOBALS['homepageqBittorrentEnabled']){
  58. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  59. $item .= '
  60. <script>
  61. // homepageOrderqBittorrent
  62. homepageDownloader("qBittorrent", "'.$GLOBALS['homepageDownloadRefresh'].'");
  63. // End homepageOrderqBittorrent
  64. </script>
  65. ';
  66. }
  67. break;
  68. case 'homepageOrderdeluge':
  69. if($GLOBALS['homepageDelugeEnabled']){
  70. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  71. $item .= '
  72. <script>
  73. // Deluge
  74. homepageDownloader("deluge", "'.$GLOBALS['homepageDownloadRefresh'].'");
  75. // End Deluge
  76. </script>
  77. ';
  78. }
  79. break;
  80. case 'homepageOrdertransmission':
  81. if($GLOBALS['homepageTransmissionEnabled']){
  82. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  83. $item .= '
  84. <script>
  85. // Transmission
  86. homepageDownloader("transmission", "'.$GLOBALS['homepageDownloadRefresh'].'");
  87. // End Transmission
  88. </script>
  89. ';
  90. }
  91. break;
  92. case 'homepageOrdernzbget':
  93. if($GLOBALS['homepageNzbgetEnabled']){
  94. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  95. $item .= '
  96. <script>
  97. // NZBGet
  98. homepageDownloader("nzbget", "'.$GLOBALS['homepageDownloadRefresh'].'");
  99. // End NZBGet
  100. </script>
  101. ';
  102. }
  103. break;
  104. case 'homepageOrdersabnzbd':
  105. if($GLOBALS['homepageSabnzbdEnabled']){
  106. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  107. $item .= '
  108. <script>
  109. // SabNZBd
  110. homepageDownloader("sabnzbd", "'.$GLOBALS['homepageDownloadRefresh'].'");
  111. // End SabNZBd
  112. </script>
  113. ';
  114. }
  115. break;
  116. case 'homepageOrderplexnowplaying':
  117. if($GLOBALS['homepagePlexStreams']){
  118. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  119. $item .= '
  120. <script>
  121. // Plex Stream
  122. homepageStream("plex", "'.$GLOBALS['homepageStreamRefresh'].'");
  123. // End Plex Stream
  124. </script>
  125. ';
  126. }
  127. break;
  128. case 'homepageOrderplexrecent':
  129. if($GLOBALS['homepagePlexRecent']){
  130. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  131. $item .= '
  132. <script>
  133. // Plex Recent
  134. homepageRecent("plex", "'.$GLOBALS['homepageRecentRefresh'].'");
  135. // End Plex Recent
  136. </script>
  137. ';
  138. }
  139. break;
  140. case 'homepageOrderplexplaylist':
  141. if($GLOBALS['homepagePlexPlaylist']){
  142. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
  143. $item .= '
  144. <script>
  145. // Plex Playlist
  146. homepagePlaylist("plex");
  147. // End Plex Playlist
  148. </script>
  149. ';
  150. }
  151. break;
  152. case 'homepageOrderembynowplaying':
  153. if($GLOBALS['homepageEmbyStreams']){
  154. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  155. $item .= '
  156. <script>
  157. // Emby Stream
  158. homepageStream("emby", "'.$GLOBALS['homepageStreamRefresh'].'");
  159. // End Emby Stream
  160. </script>
  161. ';
  162. }
  163. break;
  164. case 'homepageOrderembyrecent':
  165. if($GLOBALS['homepageEmbyRecent']){
  166. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  167. $item .= '
  168. <script>
  169. // Emby Recent
  170. homepageRecent("emby", "'.$GLOBALS['homepageRecentRefresh'].'");
  171. // End Emby Recent
  172. </script>
  173. ';
  174. }
  175. break;
  176. case 'homepageOrderombi':
  177. if($GLOBALS['homepageOmbiEnabled']){
  178. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
  179. $item .= '
  180. <script>
  181. // Ombi Requests
  182. homepageRequests("'.$GLOBALS['ombiRefresh'].'");
  183. // End Ombi Requests
  184. </script>
  185. ';
  186. }
  187. break;
  188. case 'homepageOrdercalendar':
  189. if($GLOBALS['homepageSonarrEnabled'] && qualifyRequest($GLOBALS['homepageSonarrAuth']) || ($GLOBALS['homepageRadarrEnabled'] && qualifyRequest($GLOBALS['homepageRadarrAuth'])) || ($GLOBALS['homepageSickrageEnabled'] && qualifyRequest($GLOBALS['homepageSickrageAuth'])) || ($GLOBALS['homepageCouchpotatoEnabled'] && qualifyRequest($GLOBALS['homepageCouchpotatoAuth']))){
  190. $item .= '
  191. <div id="calendar" class="fc fc-ltr animated zoomIn"></div>
  192. <script>
  193. // Calendar
  194. homepageCalendar("'.$GLOBALS['calendarRefresh'].'");
  195. // End Calendar
  196. </script>
  197. ';
  198. }
  199. break;
  200. default:
  201. # code...
  202. break;
  203. }
  204. return $item.'</div>';
  205. }
  206. function getHomepageList(){
  207. $groups = groupSelect();
  208. $mediaServers = array(
  209. array(
  210. 'name' => 'N/A',
  211. 'value' => ''
  212. ),
  213. array(
  214. 'name' => 'Plex',
  215. 'value' => 'plex'
  216. ),
  217. array(
  218. 'name' => 'Emby [Not Available]',
  219. 'value' => 'emby'
  220. )
  221. );
  222. $time = array(
  223. array(
  224. 'name' => '5',
  225. 'value' => '5000'
  226. ),
  227. array(
  228. 'name' => '10',
  229. 'value' => '10000'
  230. ),
  231. array(
  232. 'name' => '15',
  233. 'value' => '15000'
  234. ),
  235. array(
  236. 'name' => '30',
  237. 'value' => '30000'
  238. ),
  239. array(
  240. 'name' => '60 [1 Minute]',
  241. 'value' => '60000'
  242. ),
  243. array(
  244. 'name' => '300 [5 Minutes]',
  245. 'value' => '300000'
  246. ),
  247. array(
  248. 'name' => '900 [15 Minutes]',
  249. 'value' => '900000'
  250. ),
  251. array(
  252. 'name' => '1800 [30 Minutes]',
  253. 'value' => '1800000'
  254. ),
  255. array(
  256. 'name' => '3600 [1 Hour]',
  257. 'value' => '3600000'
  258. ),
  259. );
  260. $limit = array(
  261. array(
  262. 'name' => '1 Item',
  263. 'value' => '1'
  264. ),
  265. array(
  266. 'name' => '2 Items',
  267. 'value' => '2'
  268. ),
  269. array(
  270. 'name' => '3 Items',
  271. 'value' => '3'
  272. ),
  273. array(
  274. 'name' => '4 Items',
  275. 'value' => '4'
  276. ),
  277. array(
  278. 'name' => '5 Items',
  279. 'value' => '5'
  280. ),
  281. array(
  282. 'name' => '6 Items',
  283. 'value' => '6'
  284. ),
  285. array(
  286. 'name' => '7 Items',
  287. 'value' => '7'
  288. ),
  289. array(
  290. 'name' => '8 Items',
  291. 'value' => '8'
  292. ),
  293. array(
  294. 'name' => 'Unlimited',
  295. 'value' => '1000'
  296. ),
  297. );
  298. $day = array(
  299. array(
  300. 'name' => 'Sunday',
  301. 'value' => '0'
  302. ),
  303. array(
  304. 'name' => 'Monday',
  305. 'value' => '1'
  306. ),
  307. array(
  308. 'name' => 'Tueday',
  309. 'value' => '2'
  310. ),
  311. array(
  312. 'name' => 'Wednesday',
  313. 'value' => '3'
  314. ),
  315. array(
  316. 'name' => 'Thursday',
  317. 'value' => '4'
  318. ),
  319. array(
  320. 'name' => 'Friday',
  321. 'value' => '5'
  322. ),
  323. array(
  324. 'name' => 'Saturday',
  325. 'value' => '6'
  326. )
  327. );
  328. $calendarDefault = array(
  329. array(
  330. 'name' => 'Month',
  331. 'value' => 'month'
  332. ),
  333. array(
  334. 'name' => 'Day',
  335. 'value' => 'basicDay'
  336. ),
  337. array(
  338. 'name' => 'Week',
  339. 'value' => 'basicWeek'
  340. )
  341. );
  342. $timeFormat = array(
  343. array(
  344. 'name' => '6p',
  345. 'value' => 'h(:mm)t'
  346. ),
  347. array(
  348. 'name' => '6:00p',
  349. 'value' => 'h:mmt'
  350. ),
  351. array(
  352. 'name' => '6:00',
  353. 'value' => 'h:mm'
  354. ),
  355. array(
  356. 'name' => '18',
  357. 'value' => 'H(:mm)'
  358. ),
  359. array(
  360. 'name' => '18:00',
  361. 'value' => 'H:mm'
  362. )
  363. );
  364. $qBittorrentSortOptions = array(
  365. array(
  366. 'name' => 'Hash',
  367. 'value' => 'hash'
  368. ),
  369. array(
  370. 'name' => 'Name',
  371. 'value' => 'name'
  372. ),
  373. array(
  374. 'name' => 'Size',
  375. 'value' => 'size'
  376. ),
  377. array(
  378. 'name' => 'Progress',
  379. 'value' => 'progress'
  380. ),
  381. array(
  382. 'name' => 'Download Speed',
  383. 'value' => 'dlspeed'
  384. ),
  385. array(
  386. 'name' => 'Upload Speed',
  387. 'value' => 'upspeed'
  388. ),
  389. array(
  390. 'name' => 'Priority',
  391. 'value' => 'priority'
  392. ),
  393. array(
  394. 'name' => 'Number of Seeds',
  395. 'value' => 'num_seeds'
  396. ),
  397. array(
  398. 'name' => 'Number of Seeds in Swarm',
  399. 'value' => 'num_complete'
  400. ),
  401. array(
  402. 'name' => 'Number of Leechers',
  403. 'value' => 'num_leechs'
  404. ),
  405. array(
  406. 'name' => 'Number of Leechers in Swarm',
  407. 'value' => 'num_incomplete'
  408. ),
  409. array(
  410. 'name' => 'Ratio',
  411. 'value' => 'ratio'
  412. ),
  413. array(
  414. 'name' => 'ETA',
  415. 'value' => 'eta'
  416. ),
  417. array(
  418. 'name' => 'State',
  419. 'value' => 'state'
  420. ),
  421. array(
  422. 'name' => 'Category',
  423. 'value' => 'category'
  424. )
  425. );
  426. return array(
  427. array(
  428. 'name' => 'Plex',
  429. 'enabled' => true,
  430. 'image' => 'plugins/images/tabs/plex.png',
  431. 'category' => 'Media Server',
  432. 'settings' => array(
  433. 'Enable' => array(
  434. array(
  435. 'type' => 'switch',
  436. 'name' => 'homepagePlexEnabled',
  437. 'label' => 'Enable',
  438. 'value' => $GLOBALS['homepagePlexEnabled']
  439. ),
  440. array(
  441. 'type' => 'select',
  442. 'name' => 'homepagePlexAuth',
  443. 'label' => 'Minimum Authentication',
  444. 'value' => $GLOBALS['homepagePlexAuth'],
  445. 'options' => $groups
  446. )
  447. ),
  448. 'Connection' => array(
  449. array(
  450. 'type' => 'input',
  451. 'name' => 'plexURL',
  452. 'label' => 'URL',
  453. 'value' => $GLOBALS['plexURL'],
  454. 'placeholder' => 'http(s)://hostname:port'
  455. ),
  456. array(
  457. 'type' => 'password-alt',
  458. 'name' => 'plexToken',
  459. 'label' => 'Token',
  460. 'value' => $GLOBALS['plexToken']
  461. ),
  462. array(
  463. 'type' => 'password-alt',
  464. 'name' => 'plexID',
  465. 'label' => 'Plex Machine',
  466. 'value' => $GLOBALS['plexID']
  467. )
  468. ),
  469. 'Active Streams' => array(
  470. array(
  471. 'type' => 'switch',
  472. 'name' => 'homepagePlexStreams',
  473. 'label' => 'Enable',
  474. 'value' => $GLOBALS['homepagePlexStreams']
  475. ),
  476. array(
  477. 'type' => 'select',
  478. 'name' => 'homepagePlexStreamsAuth',
  479. 'label' => 'Minimum Authorization',
  480. 'value' => $GLOBALS['homepagePlexStreamsAuth'],
  481. 'options' => $groups
  482. ),
  483. array(
  484. 'type' => 'switch',
  485. 'name' => 'homepageShowStreamNames',
  486. 'label' => 'User Information',
  487. 'value' => $GLOBALS['homepageShowStreamNames']
  488. ),
  489. array(
  490. 'type' => 'select',
  491. 'name' => 'homepageShowStreamNamesAuth',
  492. 'label' => 'Minimum Authorization',
  493. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  494. 'options' => $groups
  495. ),
  496. array(
  497. 'type' => 'select',
  498. 'name' => 'homepageStreamRefresh',
  499. 'label' => 'Refresh Seconds',
  500. 'value' => $GLOBALS['homepageStreamRefresh'],
  501. 'options' => $time
  502. ),
  503. ),
  504. 'Recent Items' => array(
  505. array(
  506. 'type' => 'switch',
  507. 'name' => 'homepagePlexRecent',
  508. 'label' => 'Enable',
  509. 'value' => $GLOBALS['homepagePlexRecent']
  510. ),
  511. array(
  512. 'type' => 'select',
  513. 'name' => 'homepagePlexRecentAuth',
  514. 'label' => 'Minimum Authorization',
  515. 'value' => $GLOBALS['homepagePlexRecentAuth'],
  516. 'options' => $groups
  517. ),
  518. array(
  519. 'type' => 'select',
  520. 'name' => 'homepageRecentRefresh',
  521. 'label' => 'Refresh Seconds',
  522. 'value' => $GLOBALS['homepageRecentRefresh'],
  523. 'options' => $time
  524. ),
  525. ),
  526. 'Media Search' => array(
  527. array(
  528. 'type' => 'switch',
  529. 'name' => 'mediaSearch',
  530. 'label' => 'Enable',
  531. 'value' => $GLOBALS['mediaSearch']
  532. ),
  533. array(
  534. 'type' => 'select',
  535. 'name' => 'mediaSearchAuth',
  536. 'label' => 'Minimum Authorization',
  537. 'value' => $GLOBALS['mediaSearchAuth'],
  538. 'options' => $groups
  539. ),
  540. array(
  541. 'type' => 'select',
  542. 'name' => 'mediaSearchType',
  543. 'label' => 'Media Server',
  544. 'value' => $GLOBALS['mediaSearchType'],
  545. 'options' => $mediaServers
  546. ),
  547. ),
  548. 'Playlists' => array(
  549. array(
  550. 'type' => 'switch',
  551. 'name' => 'homepagePlexPlaylist',
  552. 'label' => 'Enable',
  553. 'value' => $GLOBALS['homepagePlexPlaylist']
  554. ),
  555. array(
  556. 'type' => 'select',
  557. 'name' => 'homepagePlexPlaylistAuth',
  558. 'label' => 'Minimum Authorization',
  559. 'value' => $GLOBALS['homepagePlexPlaylistAuth'],
  560. 'options' => $groups
  561. ),
  562. ),
  563. 'Misc Options' => array(
  564. array(
  565. 'type' => 'input',
  566. 'name' => 'plexTabName',
  567. 'label' => 'Plex Tab Name',
  568. 'value' => $GLOBALS['plexTabName'],
  569. 'placeholder' => 'Only use if you have Plex in a reverse proxy'
  570. ),
  571. array(
  572. 'type' => 'input',
  573. 'name' => 'plexTabURL',
  574. 'label' => 'Plex Tab WAN URL',
  575. 'value' => $GLOBALS['plexTabURL'],
  576. 'placeholder' => 'http(s)://hostname:port'
  577. )
  578. )
  579. )
  580. ),
  581. array(
  582. 'name' => 'Emby',
  583. 'enabled' => true,
  584. 'image' => 'plugins/images/tabs/emby.png',
  585. 'category' => 'Media Server',
  586. 'settings' => array(
  587. 'Enable' => array(
  588. array(
  589. 'type' => 'switch',
  590. 'name' => 'homepageEmbyEnabled',
  591. 'label' => 'Enable',
  592. 'value' => $GLOBALS['homepageEmbyEnabled']
  593. ),
  594. array(
  595. 'type' => 'select',
  596. 'name' => 'homepageEmbyAuth',
  597. 'label' => 'Minimum Authentication',
  598. 'value' => $GLOBALS['homepageEmbyAuth'],
  599. 'options' => $groups
  600. )
  601. ),
  602. 'Connection' => array(
  603. array(
  604. 'type' => 'input',
  605. 'name' => 'embyURL',
  606. 'label' => 'URL',
  607. 'value' => $GLOBALS['embyURL'],
  608. 'placeholder' => 'http(s)://hostname:port'
  609. ),
  610. array(
  611. 'type' => 'password-alt',
  612. 'name' => 'embyToken',
  613. 'label' => 'Token',
  614. 'value' => $GLOBALS['embyToken']
  615. )
  616. ),
  617. 'Active Streams' => array(
  618. array(
  619. 'type' => 'switch',
  620. 'name' => 'homepageEmbyStreams',
  621. 'label' => 'Enable',
  622. 'value' => $GLOBALS['homepageEmbyStreams']
  623. ),
  624. array(
  625. 'type' => 'select',
  626. 'name' => 'homepageEmbyStreamsAuth',
  627. 'label' => 'Minimum Authorization',
  628. 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
  629. 'options' => $groups
  630. ),
  631. array(
  632. 'type' => 'switch',
  633. 'name' => 'homepageShowStreamNames',
  634. 'label' => 'User Information',
  635. 'value' => $GLOBALS['homepageShowStreamNames']
  636. ),
  637. array(
  638. 'type' => 'select',
  639. 'name' => 'homepageShowStreamNamesAuth',
  640. 'label' => 'Minimum Authorization',
  641. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  642. 'options' => $groups
  643. ),
  644. array(
  645. 'type' => 'select',
  646. 'name' => 'homepageStreamRefresh',
  647. 'label' => 'Refresh Seconds',
  648. 'value' => $GLOBALS['homepageStreamRefresh'],
  649. 'options' => $time
  650. ),
  651. ),
  652. 'Recent Items' => array(
  653. array(
  654. 'type' => 'switch',
  655. 'name' => 'homepageEmbyRecent',
  656. 'label' => 'Enable',
  657. 'value' => $GLOBALS['homepageEmbyRecent']
  658. ),
  659. array(
  660. 'type' => 'select',
  661. 'name' => 'homepageEmbyRecentAuth',
  662. 'label' => 'Minimum Authorization',
  663. 'value' => $GLOBALS['homepageEmbyRecentAuth'],
  664. 'options' => $groups
  665. ),
  666. array(
  667. 'type' => 'select',
  668. 'name' => 'homepageRecentRefresh',
  669. 'label' => 'Refresh Seconds',
  670. 'value' => $GLOBALS['homepageRecentRefresh'],
  671. 'options' => $time
  672. ),
  673. ),
  674. 'Misc Options' => array(
  675. array(
  676. 'type' => 'input',
  677. 'name' => 'embyTabName',
  678. 'label' => 'Emby Tab Name',
  679. 'value' => $GLOBALS['embyTabName'],
  680. 'placeholder' => 'Only use if you have Plex in a reverse proxy'
  681. ),
  682. array(
  683. 'type' => 'input',
  684. 'name' => 'embyTabURL',
  685. 'label' => 'Emby Tab WAN URL',
  686. 'value' => $GLOBALS['embyTabURL'],
  687. 'placeholder' => 'http(s)://hostname:port'
  688. )
  689. )
  690. )
  691. ),
  692. array(
  693. 'name' => 'SabNZBD',
  694. 'enabled' => false,
  695. 'image' => 'plugins/images/tabs/sabnzbd.png',
  696. 'category' => 'Downloader',
  697. 'settings' => array(
  698. 'Enable' => array(
  699. array(
  700. 'type' => 'switch',
  701. 'name' => 'homepageSabnzbdEnabled',
  702. 'label' => 'Enable',
  703. 'value' => $GLOBALS['homepageSabnzbdEnabled']
  704. ),
  705. array(
  706. 'type' => 'select',
  707. 'name' => 'homepageSabnzbdAuth',
  708. 'label' => 'Minimum Authentication',
  709. 'value' => $GLOBALS['homepageSabnzbdAuth'],
  710. 'options' => $groups
  711. )
  712. ),
  713. 'Connection' => array(
  714. array(
  715. 'type' => 'input',
  716. 'name' => 'sabnzbdURL',
  717. 'label' => 'URL',
  718. 'value' => $GLOBALS['sabnzbdURL'],
  719. 'placeholder' => 'http(s)://hostname:port'
  720. ),
  721. array(
  722. 'type' => 'password-alt',
  723. 'name' => 'sabnzbdToken',
  724. 'label' => 'Token',
  725. 'value' => $GLOBALS['sabnzbdToken']
  726. )
  727. ),
  728. 'Misc Options' => array(
  729. array(
  730. 'type' => 'select',
  731. 'name' => 'homepageDownloadRefresh',
  732. 'label' => 'Refresh Seconds',
  733. 'value' => $GLOBALS['homepageDownloadRefresh'],
  734. 'options' => $time
  735. )
  736. )
  737. )
  738. ),
  739. array(
  740. 'name' => 'NZBGet',
  741. 'enabled' => false,
  742. 'image' => 'plugins/images/tabs/nzbget.png',
  743. 'category' => 'Downloader',
  744. 'settings' => array(
  745. 'Enable' => array(
  746. array(
  747. 'type' => 'switch',
  748. 'name' => 'homepageNzbgetEnabled',
  749. 'label' => 'Enable',
  750. 'value' => $GLOBALS['homepageNzbgetEnabled']
  751. ),
  752. array(
  753. 'type' => 'select',
  754. 'name' => 'homepageNzbgetAuth',
  755. 'label' => 'Minimum Authentication',
  756. 'value' => $GLOBALS['homepageNzbgetAuth'],
  757. 'options' => $groups
  758. )
  759. ),
  760. 'Connection' => array(
  761. array(
  762. 'type' => 'input',
  763. 'name' => 'nzbgetURL',
  764. 'label' => 'URL',
  765. 'value' => $GLOBALS['nzbgetURL'],
  766. 'placeholder' => 'http(s)://hostname:port'
  767. ),
  768. array(
  769. 'type' => 'input',
  770. 'name' => 'nzbgetUsername',
  771. 'label' => 'Username',
  772. 'value' => $GLOBALS['nzbgetUsername']
  773. ),
  774. array(
  775. 'type' => 'password',
  776. 'name' => 'nzbgetPassword',
  777. 'label' => 'Password',
  778. 'value' => $GLOBALS['nzbgetPassword']
  779. )
  780. ),
  781. 'Misc Options' => array(
  782. array(
  783. 'type' => 'select',
  784. 'name' => 'homepageDownloadRefresh',
  785. 'label' => 'Refresh Seconds',
  786. 'value' => $GLOBALS['homepageDownloadRefresh'],
  787. 'options' => $time
  788. )
  789. )
  790. )
  791. ),
  792. array(
  793. 'name' => 'Transmission',
  794. 'enabled' => false,
  795. 'image' => 'plugins/images/tabs/transmission.png',
  796. 'category' => 'Downloader',
  797. 'settings' => array(
  798. 'Enable' => array(
  799. array(
  800. 'type' => 'switch',
  801. 'name' => 'homepageTransmissionEnabled',
  802. 'label' => 'Enable',
  803. 'value' => $GLOBALS['homepageTransmissionEnabled']
  804. ),
  805. array(
  806. 'type' => 'select',
  807. 'name' => 'homepageTransmissionAuth',
  808. 'label' => 'Minimum Authentication',
  809. 'value' => $GLOBALS['homepageTransmissionAuth'],
  810. 'options' => $groups
  811. )
  812. ),
  813. 'Connection' => array(
  814. array(
  815. 'type' => 'input',
  816. 'name' => 'transmissionURL',
  817. 'label' => 'URL',
  818. 'value' => $GLOBALS['transmissionURL'],
  819. 'placeholder' => 'http(s)://hostname:port'
  820. ),
  821. array(
  822. 'type' => 'input',
  823. 'name' => 'transmissionUsername',
  824. 'label' => 'Username',
  825. 'value' => $GLOBALS['transmissionUsername']
  826. ),
  827. array(
  828. 'type' => 'password',
  829. 'name' => 'transmissionPassword',
  830. 'label' => 'Password',
  831. 'value' => $GLOBALS['transmissionPassword']
  832. )
  833. ),
  834. 'Misc Options' => array(
  835. array(
  836. 'type' => 'switch',
  837. 'name' => 'transmissionHideSeeding',
  838. 'label' => 'Hide Seeding',
  839. 'value' => $GLOBALS['transmissionHideSeeding']
  840. ),array(
  841. 'type' => 'switch',
  842. 'name' => 'transmissionHideCompleted',
  843. 'label' => 'Hide Completed',
  844. 'value' => $GLOBALS['transmissionHideCompleted']
  845. ),
  846. array(
  847. 'type' => 'select',
  848. 'name' => 'homepageDownloadRefresh',
  849. 'label' => 'Refresh Seconds',
  850. 'value' => $GLOBALS['homepageDownloadRefresh'],
  851. 'options' => $time
  852. )
  853. )
  854. )
  855. ),
  856. array(
  857. 'name' => 'qBittorrent',
  858. 'enabled' => false,
  859. 'image' => 'plugins/images/tabs/qBittorrent.png',
  860. 'category' => 'Downloader',
  861. 'settings' => array(
  862. 'Enable' => array(
  863. array(
  864. 'type' => 'switch',
  865. 'name' => 'homepageqBittorrentEnabled',
  866. 'label' => 'Enable',
  867. 'value' => $GLOBALS['homepageqBittorrentEnabled']
  868. ),
  869. array(
  870. 'type' => 'select',
  871. 'name' => 'homepageqBittorrentAuth',
  872. 'label' => 'Minimum Authentication',
  873. 'value' => $GLOBALS['homepageqBittorrentAuth'],
  874. 'options' => $groups
  875. )
  876. ),
  877. 'Connection' => array(
  878. array(
  879. 'type' => 'input',
  880. 'name' => 'qBittorrentURL',
  881. 'label' => 'URL',
  882. 'value' => $GLOBALS['qBittorrentURL'],
  883. 'placeholder' => 'http(s)://hostname:port'
  884. ),
  885. array(
  886. 'type' => 'input',
  887. 'name' => 'qBittorrentUsername',
  888. 'label' => 'Username',
  889. 'value' => $GLOBALS['qBittorrentUsername']
  890. ),
  891. array(
  892. 'type' => 'password',
  893. 'name' => 'qBittorrentPassword',
  894. 'label' => 'Password',
  895. 'value' => $GLOBALS['qBittorrentPassword']
  896. )
  897. ),
  898. 'Misc Options' => array(
  899. array(
  900. 'type' => 'switch',
  901. 'name' => 'qBittorrentHideSeeding',
  902. 'label' => 'Hide Seeding',
  903. 'value' => $GLOBALS['qBittorrentHideSeeding']
  904. ),array(
  905. 'type' => 'switch',
  906. 'name' => 'qBittorrentnHideCompleted',
  907. 'label' => 'Hide Completed',
  908. 'value' => $GLOBALS['qBittorrentHideCompleted']
  909. ),
  910. array(
  911. 'type' => 'select',
  912. 'name' => 'qBittorrentSortOrder',
  913. 'label' => 'Order',
  914. 'value' => $GLOBALS['qBittorrentSortOrder'],
  915. 'options' => $qBittorrentSortOptions
  916. ),array(
  917. 'type' => 'switch',
  918. 'name' => 'qBittorrentReverseSorting',
  919. 'label' => 'Reverse Sorting',
  920. 'value' => $GLOBALS['qBittorrentReverseSorting']
  921. ),
  922. array(
  923. 'type' => 'select',
  924. 'name' => 'homepageDownloadRefresh',
  925. 'label' => 'Refresh Seconds',
  926. 'value' => $GLOBALS['homepageDownloadRefresh'],
  927. 'options' => $time
  928. )
  929. )
  930. )
  931. ),
  932. array(
  933. 'name' => 'Deluge',
  934. 'enabled' => false,
  935. 'image' => 'plugins/images/tabs/deluge.png',
  936. 'category' => 'Downloader',
  937. 'settings' => array(
  938. 'custom' => '
  939. <div class="row">
  940. <div class="col-lg-12">
  941. <div class="panel panel-info">
  942. <div class="panel-heading">
  943. <span lang="en">Notice</span>
  944. </div>
  945. <div class="panel-wrapper collapse in" aria-expanded="true">
  946. <div class="panel-body">
  947. <ul class="list-icons">
  948. <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://github.com/idlesign/deluge-webapi/raw/master/dist/WebAPI-0.2.0-py2.7.egg" target="_blank">Download Plugin</a></li>
  949. <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>
  950. <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
  951. </ul>
  952. </div>
  953. </div>
  954. </div>
  955. </div>
  956. </div>
  957. ',
  958. 'Enable' => array(
  959. array(
  960. 'type' => 'switch',
  961. 'name' => 'homepageDelugeEnabled',
  962. 'label' => 'Enable',
  963. 'value' => $GLOBALS['homepageDelugeEnabled']
  964. ),
  965. array(
  966. 'type' => 'select',
  967. 'name' => 'homepageDelugeAuth',
  968. 'label' => 'Minimum Authentication',
  969. 'value' => $GLOBALS['homepageDelugeAuth'],
  970. 'options' => $groups
  971. )
  972. ),
  973. 'Connection' => array(
  974. array(
  975. 'type' => 'input',
  976. 'name' => 'delugeURL',
  977. 'label' => 'URL',
  978. 'value' => $GLOBALS['delugeURL'],
  979. 'placeholder' => 'http(s)://hostname:port'
  980. ),
  981. array(
  982. 'type' => 'password',
  983. 'name' => 'delugePassword',
  984. 'label' => 'Password',
  985. 'value' => $GLOBALS['delugePassword']
  986. )
  987. ),
  988. 'Misc Options' => array(
  989. array(
  990. 'type' => 'switch',
  991. 'name' => 'delugeHideSeeding',
  992. 'label' => 'Hide Seeding',
  993. 'value' => $GLOBALS['delugeHideSeeding']
  994. ),array(
  995. 'type' => 'switch',
  996. 'name' => 'delugeHideCompleted',
  997. 'label' => 'Hide Completed',
  998. 'value' => $GLOBALS['delugeHideCompleted']
  999. ),
  1000. array(
  1001. 'type' => 'select',
  1002. 'name' => 'homepageDownloadRefresh',
  1003. 'label' => 'Refresh Seconds',
  1004. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1005. 'options' => $time
  1006. )
  1007. )
  1008. )
  1009. ),
  1010. array(
  1011. 'name' => 'Sonarr',
  1012. 'enabled' => false,
  1013. 'image' => 'plugins/images/tabs/sonarr.png',
  1014. 'category' => 'PVR',
  1015. 'settings' => array(
  1016. 'Enable' => array(
  1017. array(
  1018. 'type' => 'switch',
  1019. 'name' => 'homepageSonarrEnabled',
  1020. 'label' => 'Enable',
  1021. 'value' => $GLOBALS['homepageSonarrEnabled']
  1022. ),
  1023. array(
  1024. 'type' => 'select',
  1025. 'name' => 'homepageSonarrAuth',
  1026. 'label' => 'Minimum Authentication',
  1027. 'value' => $GLOBALS['homepageSonarrAuth'],
  1028. 'options' => $groups
  1029. )
  1030. ),
  1031. 'Connection' => array(
  1032. array(
  1033. 'type' => 'input',
  1034. 'name' => 'sonarrURL',
  1035. 'label' => 'URL',
  1036. 'value' => $GLOBALS['sonarrURL'],
  1037. 'placeholder' => 'http(s)://hostname:port'
  1038. ),
  1039. array(
  1040. 'type' => 'password-alt',
  1041. 'name' => 'sonarrToken',
  1042. 'label' => 'Token',
  1043. 'value' => $GLOBALS['sonarrToken']
  1044. )
  1045. ),
  1046. 'Misc Options' => array(
  1047. array(
  1048. 'type' => 'input',
  1049. 'name' => 'calendarStart',
  1050. 'label' => '# of Days Before',
  1051. 'value' => $GLOBALS['calendarStart'],
  1052. 'placeholder' => ''
  1053. ),
  1054. array(
  1055. 'type' => 'input',
  1056. 'name' => 'calendarEnd',
  1057. 'label' => '# of Days After',
  1058. 'value' => $GLOBALS['calendarEnd'],
  1059. 'placeholder' => ''
  1060. ),
  1061. array(
  1062. 'type' => 'select',
  1063. 'name' => 'calendarFirstDay',
  1064. 'label' => 'Start Day',
  1065. 'value' => $GLOBALS['calendarFirstDay'],
  1066. 'options' => $day
  1067. ),
  1068. array(
  1069. 'type' => 'select',
  1070. 'name' => 'calendarDefault',
  1071. 'label' => 'Default View',
  1072. 'value' => $GLOBALS['calendarDefault'],
  1073. 'options' => $calendarDefault
  1074. ),
  1075. array(
  1076. 'type' => 'select',
  1077. 'name' => 'calendarTimeFormat',
  1078. 'label' => 'Time Format',
  1079. 'value' => $GLOBALS['calendarTimeFormat'],
  1080. 'options' => $timeFormat
  1081. ),
  1082. array(
  1083. 'type' => 'select',
  1084. 'name' => 'calendarLimit',
  1085. 'label' => 'Items Per Day',
  1086. 'value' => $GLOBALS['calendarLimit'],
  1087. 'options' => $limit
  1088. ),
  1089. array(
  1090. 'type' => 'select',
  1091. 'name' => 'calendarRefresh',
  1092. 'label' => 'Refresh Seconds',
  1093. 'value' => $GLOBALS['calendarRefresh'],
  1094. 'options' => $time
  1095. )
  1096. )
  1097. )
  1098. ),
  1099. array(
  1100. 'name' => 'Radarr',
  1101. 'enabled' => false,
  1102. 'image' => 'plugins/images/tabs/radarr.png',
  1103. 'category' => 'PVR',
  1104. 'settings' => array(
  1105. 'Enable' => array(
  1106. array(
  1107. 'type' => 'switch',
  1108. 'name' => 'homepageRadarrEnabled',
  1109. 'label' => 'Enable',
  1110. 'value' => $GLOBALS['homepageRadarrEnabled']
  1111. ),
  1112. array(
  1113. 'type' => 'select',
  1114. 'name' => 'homepageRadarrAuth',
  1115. 'label' => 'Minimum Authentication',
  1116. 'value' => $GLOBALS['homepageRadarrAuth'],
  1117. 'options' => $groups
  1118. )
  1119. ),
  1120. 'Connection' => array(
  1121. array(
  1122. 'type' => 'input',
  1123. 'name' => 'radarrURL',
  1124. 'label' => 'URL',
  1125. 'value' => $GLOBALS['radarrURL'],
  1126. 'placeholder' => 'http(s)://hostname:port'
  1127. ),
  1128. array(
  1129. 'type' => 'password-alt',
  1130. 'name' => 'radarrToken',
  1131. 'label' => 'Token',
  1132. 'value' => $GLOBALS['radarrToken']
  1133. )
  1134. ),
  1135. 'Misc Options' => array(
  1136. array(
  1137. 'type' => 'input',
  1138. 'name' => 'calendarStart',
  1139. 'label' => '# of Days Before',
  1140. 'value' => $GLOBALS['calendarStart'],
  1141. 'placeholder' => ''
  1142. ),
  1143. array(
  1144. 'type' => 'input',
  1145. 'name' => 'calendarEnd',
  1146. 'label' => '# of Days After',
  1147. 'value' => $GLOBALS['calendarEnd'],
  1148. 'placeholder' => ''
  1149. ),
  1150. array(
  1151. 'type' => 'select',
  1152. 'name' => 'calendarFirstDay',
  1153. 'label' => 'Start Day',
  1154. 'value' => $GLOBALS['calendarFirstDay'],
  1155. 'options' => $day
  1156. ),
  1157. array(
  1158. 'type' => 'select',
  1159. 'name' => 'calendarDefault',
  1160. 'label' => 'Default View',
  1161. 'value' => $GLOBALS['calendarDefault'],
  1162. 'options' => $calendarDefault
  1163. ),
  1164. array(
  1165. 'type' => 'select',
  1166. 'name' => 'calendarTimeFormat',
  1167. 'label' => 'Time Format',
  1168. 'value' => $GLOBALS['calendarTimeFormat'],
  1169. 'options' => $timeFormat
  1170. ),
  1171. array(
  1172. 'type' => 'select',
  1173. 'name' => 'calendarLimit',
  1174. 'label' => 'Items Per Day',
  1175. 'value' => $GLOBALS['calendarLimit'],
  1176. 'options' => $limit
  1177. ),
  1178. array(
  1179. 'type' => 'select',
  1180. 'name' => 'calendarRefresh',
  1181. 'label' => 'Refresh Seconds',
  1182. 'value' => $GLOBALS['calendarRefresh'],
  1183. 'options' => $time
  1184. )
  1185. )
  1186. )
  1187. ),
  1188. array(
  1189. 'name' => 'CouchPotato',
  1190. 'enabled' => false,
  1191. 'image' => 'plugins/images/tabs/couchpotato.png',
  1192. 'category' => 'PVR',
  1193. 'settings' => array(
  1194. 'Enable' => array(
  1195. array(
  1196. 'type' => 'switch',
  1197. 'name' => 'homepageCouchpotatoEnabled',
  1198. 'label' => 'Enable',
  1199. 'value' => $GLOBALS['homepageCouchpotatoEnabled']
  1200. ),
  1201. array(
  1202. 'type' => 'select',
  1203. 'name' => 'homepageCouchpotatoAuth',
  1204. 'label' => 'Minimum Authentication',
  1205. 'value' => $GLOBALS['homepageCouchpotatoAuth'],
  1206. 'options' => $groups
  1207. )
  1208. ),
  1209. 'Connection' => array(
  1210. array(
  1211. 'type' => 'input',
  1212. 'name' => 'couchpotatoURL',
  1213. 'label' => 'URL',
  1214. 'value' => $GLOBALS['couchpotatoURL'],
  1215. 'placeholder' => 'http(s)://hostname:port'
  1216. ),
  1217. array(
  1218. 'type' => 'password-alt',
  1219. 'name' => 'couchpotatoToken',
  1220. 'label' => 'Token',
  1221. 'value' => $GLOBALS['couchpotatoToken']
  1222. )
  1223. ),
  1224. 'Misc Options' => array(
  1225. array(
  1226. 'type' => 'select',
  1227. 'name' => 'calendarFirstDay',
  1228. 'label' => 'Start Day',
  1229. 'value' => $GLOBALS['calendarFirstDay'],
  1230. 'options' => $day
  1231. ),
  1232. array(
  1233. 'type' => 'select',
  1234. 'name' => 'calendarDefault',
  1235. 'label' => 'Default View',
  1236. 'value' => $GLOBALS['calendarDefault'],
  1237. 'options' => $calendarDefault
  1238. ),
  1239. array(
  1240. 'type' => 'select',
  1241. 'name' => 'calendarTimeFormat',
  1242. 'label' => 'Time Format',
  1243. 'value' => $GLOBALS['calendarTimeFormat'],
  1244. 'options' => $timeFormat
  1245. ),
  1246. array(
  1247. 'type' => 'select',
  1248. 'name' => 'calendarLimit',
  1249. 'label' => 'Items Per Day',
  1250. 'value' => $GLOBALS['calendarLimit'],
  1251. 'options' => $limit
  1252. ),
  1253. array(
  1254. 'type' => 'select',
  1255. 'name' => 'calendarRefresh',
  1256. 'label' => 'Refresh Seconds',
  1257. 'value' => $GLOBALS['calendarRefresh'],
  1258. 'options' => $time
  1259. )
  1260. )
  1261. )
  1262. ),
  1263. array(
  1264. 'name' => 'SickRage',
  1265. 'enabled' => false,
  1266. 'image' => 'plugins/images/tabs/sickrage.png',
  1267. 'category' => 'PVR',
  1268. 'settings' => array(
  1269. 'Enable' => array(
  1270. array(
  1271. 'type' => 'switch',
  1272. 'name' => 'homepageSickrageEnabled',
  1273. 'label' => 'Enable',
  1274. 'value' => $GLOBALS['homepageSickrageEnabled']
  1275. ),
  1276. array(
  1277. 'type' => 'select',
  1278. 'name' => 'homepageSickrageAuth',
  1279. 'label' => 'Minimum Authentication',
  1280. 'value' => $GLOBALS['homepageSickrageAuth'],
  1281. 'options' => $groups
  1282. )
  1283. ),
  1284. 'Connection' => array(
  1285. array(
  1286. 'type' => 'input',
  1287. 'name' => 'sickrageURL',
  1288. 'label' => 'URL',
  1289. 'value' => $GLOBALS['sickrageURL'],
  1290. 'placeholder' => 'http(s)://hostname:port'
  1291. ),
  1292. array(
  1293. 'type' => 'password-alt',
  1294. 'name' => 'sickrageToken',
  1295. 'label' => 'Token',
  1296. 'value' => $GLOBALS['sickrageToken']
  1297. )
  1298. ),
  1299. 'Misc Options' => array(
  1300. array(
  1301. 'type' => 'select',
  1302. 'name' => 'calendarFirstDay',
  1303. 'label' => 'Start Day',
  1304. 'value' => $GLOBALS['calendarFirstDay'],
  1305. 'options' => $day
  1306. ),
  1307. array(
  1308. 'type' => 'select',
  1309. 'name' => 'calendarDefault',
  1310. 'label' => 'Default View',
  1311. 'value' => $GLOBALS['calendarDefault'],
  1312. 'options' => $calendarDefault
  1313. ),
  1314. array(
  1315. 'type' => 'select',
  1316. 'name' => 'calendarTimeFormat',
  1317. 'label' => 'Time Format',
  1318. 'value' => $GLOBALS['calendarTimeFormat'],
  1319. 'options' => $timeFormat
  1320. ),
  1321. array(
  1322. 'type' => 'select',
  1323. 'name' => 'calendarLimit',
  1324. 'label' => 'Items Per Day',
  1325. 'value' => $GLOBALS['calendarLimit'],
  1326. 'options' => $limit
  1327. ),
  1328. array(
  1329. 'type' => 'select',
  1330. 'name' => 'calendarRefresh',
  1331. 'label' => 'Refresh Seconds',
  1332. 'value' => $GLOBALS['calendarRefresh'],
  1333. 'options' => $time
  1334. )
  1335. )
  1336. )
  1337. ),
  1338. array(
  1339. 'name' => 'Ombi',
  1340. 'enabled' => false,
  1341. 'image' => 'plugins/images/tabs/ombi.png',
  1342. 'category' => 'Requests',
  1343. 'settings' => array(
  1344. 'Enable' => array(
  1345. array(
  1346. 'type' => 'switch',
  1347. 'name' => 'homepageOmbiEnabled',
  1348. 'label' => 'Enable',
  1349. 'value' => $GLOBALS['homepageOmbiEnabled']
  1350. ),
  1351. array(
  1352. 'type' => 'select',
  1353. 'name' => 'homepageOmbiAuth',
  1354. 'label' => 'Minimum Authentication',
  1355. 'value' => $GLOBALS['homepageOmbiAuth'],
  1356. 'options' => $groups
  1357. )
  1358. ),
  1359. 'Connection' => array(
  1360. array(
  1361. 'type' => 'input',
  1362. 'name' => 'ombiURL',
  1363. 'label' => 'URL',
  1364. 'value' => $GLOBALS['ombiURL'],
  1365. 'placeholder' => 'http(s)://hostname:port'
  1366. ),
  1367. array(
  1368. 'type' => 'password-alt',
  1369. 'name' => 'ombiToken',
  1370. 'label' => 'Token',
  1371. 'value' => $GLOBALS['ombiToken']
  1372. )
  1373. ),
  1374. 'Misc Options' => array(
  1375. array(
  1376. 'type' => 'switch',
  1377. 'name' => 'ombiLimitUser',
  1378. 'label' => 'Limit to User',
  1379. 'value' => $GLOBALS['ombiLimitUser']
  1380. ),
  1381. array(
  1382. 'type' => 'select',
  1383. 'name' => 'ombiRefresh',
  1384. 'label' => 'Refresh Seconds',
  1385. 'value' => $GLOBALS['ombiRefresh'],
  1386. 'options' => $time
  1387. )
  1388. )
  1389. )
  1390. ),
  1391. array(
  1392. 'name' => 'CustomHTML-1',
  1393. 'enabled' => false,
  1394. 'image' => 'plugins/images/tabs/custom1.png',
  1395. 'category' => 'Custom',
  1396. 'settings' => array(
  1397. 'Enable' => array(
  1398. array(
  1399. 'type' => 'switch',
  1400. 'name' => 'homepagCustomHTMLoneEnabled',
  1401. 'label' => 'Enable',
  1402. 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
  1403. ),
  1404. array(
  1405. 'type' => 'select',
  1406. 'name' => 'homepagCustomHTMLoneAuth',
  1407. 'label' => 'Minimum Authentication',
  1408. 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
  1409. 'options' => $groups
  1410. )
  1411. ),
  1412. 'Code' => array(
  1413. array(
  1414. 'type' => 'textbox',
  1415. 'name' => 'customHTMLone',
  1416. 'class' => 'hidden customHTMLoneTextarea',
  1417. 'label' => '',
  1418. 'value' => $GLOBALS['customHTMLone'],
  1419. ),
  1420. array(
  1421. 'type' => 'html',
  1422. 'override' => 12,
  1423. 'label' => 'Custom HTML/JavaScript',
  1424. '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>'
  1425. ),
  1426. )
  1427. )
  1428. ),
  1429. array(
  1430. 'name' => 'CustomHTML-2',
  1431. 'enabled' => false,
  1432. 'image' => 'plugins/images/tabs/custom2.png',
  1433. 'category' => 'Custom',
  1434. 'settings' => array(
  1435. 'Enable' => array(
  1436. array(
  1437. 'type' => 'switch',
  1438. 'name' => 'homepagCustomHTMLtwoEnabled',
  1439. 'label' => 'Enable',
  1440. 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
  1441. ),
  1442. array(
  1443. 'type' => 'select',
  1444. 'name' => 'homepagCustomHTMLtwoAuth',
  1445. 'label' => 'Minimum Authentication',
  1446. 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
  1447. 'options' => $groups
  1448. )
  1449. ),
  1450. 'Code' => array(
  1451. array(
  1452. 'type' => 'textbox',
  1453. 'name' => 'customHTMLtwo',
  1454. 'class' => 'hidden customHTMLtwoTextarea',
  1455. 'label' => '',
  1456. 'value' => $GLOBALS['customHTMLtwo'],
  1457. ),
  1458. array(
  1459. 'type' => 'html',
  1460. 'override' => 12,
  1461. 'label' => 'Custom HTML/JavaScript',
  1462. '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>'
  1463. ),
  1464. )
  1465. )
  1466. )
  1467. );
  1468. }