Sfoglia il codice sorgente

edit upgrade function and test sonarr premier effect

causefx 8 anni fa
parent
commit
2293215043

+ 12 - 5
api/functions/homepage-connect-functions.php

@@ -52,6 +52,7 @@ function homepageConnect($array)
             # code...
             break;
     }
+    return false;
 }
 function streamType($value)
 {
@@ -87,7 +88,6 @@ function resolveEmbyItem($itemDetails)
     $nowPlayingWidth = 1200;
     $actorHeight = 450;
     $actorWidth = 300;
-    $widthOverride = 100;
     // Cache Directories
     $cacheDirectory = dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;
     $cacheDirectoryWeb = 'plugins/images/cache/';
@@ -278,7 +278,6 @@ function resolvePlexItem($item)
     $width = 200;
     $nowPlayingHeight = 675;
     $nowPlayingWidth = 1200;
-    $widthOverride = 100;
     // Cache Directories
     $cacheDirectory = dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR;
     $cacheDirectoryWeb = 'plugins/images/cache/';
@@ -630,6 +629,7 @@ function sabnzbdConnect()
         $api['content'] = isset($api['content']) ? $api['content'] : false;
         return $api;
     }
+    return false;
 }
 function nzbgetConnect()
 {
@@ -659,6 +659,7 @@ function nzbgetConnect()
         $api['content'] = isset($api['content']) ? $api['content'] : false;
         return $api;
     }
+    return false;
 }
 function transmissionConnect()
 {
@@ -715,12 +716,12 @@ function transmissionConnect()
         $api['content'] = isset($api['content']) ? $api['content'] : false;
         return $api;
     }
+    return false;
 }
 function qBittorrentConnect()
 {
     if ($GLOBALS['homepageqBittorrentEnabled'] && !empty($GLOBALS['qBittorrentURL']) && qualifyRequest($GLOBALS['homepageqBittorrentAuth'])) {
         $digest = qualifyURL($GLOBALS['qBittorrentURL'], true);
-        $passwordInclude = ($GLOBALS['qBittorrentUsername'] != '' && $GLOBALS['qBittorrentPassword'] != '') ? 'username='.$GLOBALS['qBittorrentUsername'].'&password='.decrypt($GLOBALS['qBittorrentPassword'])."@" : '';
         $data = array('username'=>$GLOBALS['qBittorrentUsername'], 'password'=> decrypt($GLOBALS['qBittorrentPassword']));
         $url = $digest['scheme'].'://'.$digest['host'].$digest['port'].$digest['path'].'/login';
         try {
@@ -768,6 +769,7 @@ function qBittorrentConnect()
         $api['content'] = isset($api['content']) ? $api['content'] : false;
         return $api;
     }
+    return false;
 }
 function delugeConnect()
 {
@@ -909,7 +911,7 @@ function getSonarrCalendar($array, $number)
         if (!isset($episodeID)) {
             $episodeID = "";
         }
-        $episodeName = htmlentities($child['title'], ENT_QUOTES);
+        //$episodeName = htmlentities($child['title'], ENT_QUOTES);
         if ($child['episodeNumber'] == "1") {
             $episodePremier = "true";
         } else {
@@ -923,7 +925,7 @@ function getSonarrCalendar($array, $number)
         }
         $downloaded = $child['hasFile'];
         if ($downloaded == "0" && isset($unaired) && $episodePremier == "true") {
-            $downloaded = "text-primary";
+            $downloaded = "text-primary animated flash";
         } elseif ($downloaded == "0" && isset($unaired)) {
             $downloaded = "text-info";
         } elseif ($downloaded == "1") {
@@ -978,6 +980,7 @@ function getSonarrCalendar($array, $number)
     if ($i != 0) {
         return $gotCalendar;
     }
+    return false;
 }
 function getRadarrCalendar($array, $number, $url)
 {
@@ -1068,6 +1071,7 @@ function getRadarrCalendar($array, $number, $url)
     if ($i != 0) {
         return $gotCalendar;
     }
+	return false;
 }
 function getCouchCalendar($array, $number)
 {
@@ -1148,6 +1152,7 @@ function getCouchCalendar($array, $number)
     if ($i != 0) {
         return $gotCalendar;
     }
+	return false;
 }
 function getSickrageCalendarWanted($array, $number)
 {
@@ -1381,6 +1386,7 @@ function getSickrageCalendarWanted($array, $number)
     if ($i != 0) {
         return $gotCalendar;
     }
+	return false;
 }
 function getSickrageCalendarHistory($array, $number)
 {
@@ -1432,6 +1438,7 @@ function getSickrageCalendarHistory($array, $number)
     if ($i != 0) {
         return $gotCalendar;
     }
+	return false;
 }
 function ombiAPI($array)
 {

+ 2 - 4
api/functions/upgrade-functions.php

@@ -4,11 +4,10 @@ function upgradeCheck()
 {
     $updateDB = false;
     $compare = new Composer\Semver\Comparator;
-    $config = loadConfig();
-    $oldVer = $config['configVersion'];
+    $oldVer = $GLOBALS['installedVersion'];
     // Upgrade check start for version below
     $versionCheck = '2.0.0-alpha-100';
-    if (isset($config['dbLocation']) && (!isset($config['configVersion']) || $compare->lessThan($oldVer, $versionCheck))) {
+    if ($compare->lessThan($oldVer, $versionCheck)) {
         $updateDB = true;
         $oldVer = $versionCheck;
     }
@@ -16,7 +15,6 @@ function upgradeCheck()
     if ($updateDB == true) {
         //return 'Upgraded Needed - Current Version '.$oldVer.' - New Version: '.$versionCheck;
         // Upgrade database to latest version
-        unset($config);
         updateDB($GLOBALS['dbLocation'],$GLOBALS['dbName'],$oldVer);
     }
     return true;

+ 2 - 2
api/pages/login.php

@@ -7,7 +7,7 @@ $pageLogin = '
   <div class="login-box login-sidebar animated slideInRight">
     <div class="white-box">
       <form class="form-horizontal form-material" id="loginform" onsubmit="return false;">
-        <a href="javascript:void(0)" class="text-center db" id="login-logo">'.logoOrText().'</a>
+        <a href="javascript:void(0)" class="text-center db visible-xs" id="login-logo">'.logoOrText().'</a>
 
         <div class="form-group m-t-40">
           <div class="col-xs-12">
@@ -80,7 +80,7 @@ $pageLogin = '
         </div>
         <div class="form-group ">
           <div class="col-xs-12">
-            <input id="recover-input" class="form-control" name="email" type="text" required="" placeholder="Email" lang="en" required>
+            <input id="recover-input" class="form-control" name="email" type="text" placeholder="Email" lang="en" required>
           </div>
         </div>
         <div class="form-group text-center m-t-20">

+ 6 - 6
index.php

@@ -12,7 +12,6 @@
 	<title>Organizr v2</title>
 	<link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
 	<link href="plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css" rel="stylesheet">
-	<link href="css/animate.css" rel="stylesheet">
 	<link href="plugins/bower_components/toast-master/css/jquery.toast.css" rel="stylesheet">
 	<link href="plugins/bower_components/jquery-wizard-master/css/wizard.css" rel="stylesheet">
 	<link href="plugins/bower_components/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
@@ -23,7 +22,6 @@
 	<link href="plugins/bower_components/dropzone-master/dist/dropzone.css" rel="stylesheet" type="text/css" />
 	<link href="plugins/bower_components/css-chart/css-chart.css" rel="stylesheet">
 	<link href="plugins/bower_components/calendar/dist/fullcalendar.css" rel="stylesheet" />
-	<link rel="stylesheet" href="https://cdn.plyr.io/3.1.0/plyr.css">
 	<link href="plugins/bower_components/custom-select/custom-select.css" rel="stylesheet" type="text/css" />
 	<link href="plugins/bower_components/bootstrap-colorpicker-sliders/bootstrap.colorpickersliders.min.css" rel="stylesheet" type="text/css" />
 	<link href="plugins/bower_components/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" />
@@ -31,6 +29,9 @@
 	<link href="plugins/bower_components/owl.carousel/owl.carousel.min.css" rel="stylesheet" type="text/css" />
 	<link href="plugins/bower_components/owl.carousel/owl.theme.default.css" rel="stylesheet" type="text/css" />
 	<link href="plugins/bower_components/hover/hover-min.css" rel="stylesheet" type="text/css" />
+    <link href="css/animate.css" rel="stylesheet">
+    <link href="css/simplebar.css" rel="stylesheet">
+    <link href="css/plyr.css" rel="stylesheet">
 	<link id="style" href="css/dark.css?v=<?php echo $GLOBALS['installedVersion']; ?>" rel="stylesheet">
 	<link href="css/organizr.css?v=<?php echo $GLOBALS['installedVersion']; ?>" rel="stylesheet">
 	<?php echo pluginFiles('css'); ?>
@@ -148,7 +149,7 @@
 	<script src="plugins/bower_components/Magnific-Popup-master/dist/jquery.magnific-popup.min.js"></script>
 	<script src="plugins/bower_components/sweetalert/sweetalert.min.js"></script>
 	<script src="plugins/bower_components/switchery/dist/switchery.min.js"></script>
-	<script src="//cdnjs.cloudflare.com/ajax/libs/tinycolor/0.11.1/tinycolor.min.js"></script>
+	<script src="js/tinycolor.min.js"></script>
 	<script src="plugins/bower_components/bootstrap-colorpicker-sliders/bootstrap.colorpickersliders.min.js"></script>
 	<script src="plugins/bower_components/dropzone-master/dist/dropzone.js"></script>
 	<script src="plugins/bower_components/owl.carousel/owl.carousel.min.js"></script>
@@ -158,9 +159,8 @@
 	<script src="plugins/bower_components/tinymce/tinymce.min.js"></script>
 	<script src="plugins/bower_components/multiselect/js/jquery.multi-select.js"></script>
 	<script src="js/jquery.mousewheel.min.js"></script>
-	<script src="https://cdn.plyr.io/3.1.0/plyr.js"></script>
-	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/simplebar@latest/dist/simplebar.css">
-	<script src="https://cdn.jsdelivr.net/npm/simplebar@latest/dist/simplebar.js"></script>
+	<script src="js/plyr.js"></script>
+	<script src="js/simplebar.js"></script>
 	<script src="https://apis.google.com/js/client.js?onload=googleApiClientReady"></script>
 	<script src="js/functions.js?v=<?php echo $GLOBALS['installedVersion']; ?>"></script>
 	<script src="js/custom.js?v=<?php echo $GLOBALS['installedVersion']; ?>"></script>