Ver Fonte

added plex admin for SSO - please fill out in settings

causefx há 8 anos atrás
pai
commit
d55093548a

+ 2 - 1
api/config/default.php

@@ -21,6 +21,7 @@ return array(
     'plexTabURL' => '',
     'plexToken' => '',
     'plexTabName' => '',
+    'plexAdmin' => '',
     'embyTabURL' => '',
     'embyTabName' => '',
     'embyURL' => '',
@@ -55,7 +56,7 @@ return array(
     'qBittorrentHideSeeding' => false,
     'qBittorrentHideCompleted' => false,
     'qBittorrentSortOrder' => 'eta',
-    'qBittorrentReverseSorting' => false,    
+    'qBittorrentReverseSorting' => false,
     'homepageSabnzbdEnabled' => false,
     'homepageSabnzbdAuth' => '1',
 	'homepageSonarrEnabled' => false,

+ 1 - 1
api/functions/auth-functions.php

@@ -42,7 +42,7 @@ function checkPlexUser($username){
 function plugin_auth_plex($username, $password) {
 	try{
 		$usernameLower = strtolower($username);
-		if(checkPlexUser($username)){
+		if((!empty($GLOBALS['plexAdmin']) && strtolower($GLOBALS['plexAdmin']) == $usernameLower) || checkPlexUser($username)){
 			//Login User
 			$url = 'https://plex.tv/users/sign_in.json';
 			$headers = array(

+ 11 - 0
api/functions/organizr-functions.php

@@ -306,6 +306,17 @@ function getSSO(){
     			'href' => '#sso-plex-machine-form',
     			'attr' => 'data-effect="mfp-3d-unfold"'
     		),
+			array(
+    			'type' => 'input',
+    			'name' => 'plexAdmin',
+    			'label' => 'Admin Username',
+    			'value' => $GLOBALS['plexAdmin'],
+    			'placeholder' => 'Admin username for Plex'
+    		),
+            array(
+                'type' => 'blank',
+                'label' => ''
+            ),
     		array(
     			'type' => 'html',
     			'label' => 'Plex Note',

+ 3 - 0
css/organizr.css

@@ -254,3 +254,6 @@ background: #2cabe3;
   margin: 0;
   padding: 19px 20px 11px 20px;
 }
+.fc-unthemed .fc-today {
+  color: inherit !important;
+}