瀏覽代碼

added more to sso console info
fixed emby public url
added token to ombi SSO

causefx 7 年之前
父節點
當前提交
3fbdf0c255
共有 2 個文件被更改,包括 13 次插入1 次删除
  1. 1 1
      api/functions/homepage-connect-functions.php
  2. 12 0
      api/functions/organizr-functions.php

+ 1 - 1
api/functions/homepage-connect-functions.php

@@ -193,7 +193,7 @@ function resolveEmbyItem($itemDetails)
 	$embyItem['user'] = ($GLOBALS['homepageShowStreamNames'] && qualifyRequest($GLOBALS['homepageShowStreamNamesAuth'])) ? @(string)$itemDetails['UserName'] : "";
 	$embyItem['userThumb'] = '';
 	$embyItem['userAddress'] = (isset($itemDetails['RemoteEndPoint']) ? $itemDetails['RemoteEndPoint'] : "x.x.x.x");
-	$embyItem['address'] = $GLOBALS['embyTabURL'] ? rtrim($GLOBALS['embyTabURL'], '/') . "/web/#!/itemdetails.html?id=" . $embyItem['uid'] : "https://app.emby.media/itemdetails.html?id=" . $embyItem['uid'] . "&serverId=" . $embyItem['id'];
+	$embyItem['address'] = $GLOBALS['embyTabURL'] ? rtrim($GLOBALS['embyTabURL'], '/') . "/web/#!/itemdetails.html?id=" . $embyItem['uid'] : "https://app.emby.media/web/#!/itemdetails.html?id=" . $embyItem['uid'] . "&serverId=" . $embyItem['id'];
 	$embyItem['nowPlayingOriginalImage'] = 'api/?v1/image&source=emby&type=' . $embyItem['nowPlayingImageType'] . '&img=' . $embyItem['nowPlayingThumb'] . '&height=' . $nowPlayingHeight . '&width=' . $nowPlayingWidth . '&key=' . $embyItem['nowPlayingKey'] . '$' . randString();
 	$embyItem['originalImage'] = 'api/?v1/image&source=emby&type=' . $embyItem['imageType'] . '&img=' . $embyItem['thumb'] . '&height=' . $height . '&width=' . $width . '&key=' . $embyItem['key'] . '$' . randString();
 	$embyItem['openTab'] = $GLOBALS['embyTabURL'] && $GLOBALS['embyTabName'] ? true : false;

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

@@ -31,14 +31,20 @@ function organizrSpecialSettings()
 				'enabled' => ($GLOBALS['ssoPlex']) ? true : false,
 				'cookie' => isset($_COOKIE['mpt']) ? true : false,
 				'machineID' => $GLOBALS['plexID'],
+				'token' => ($GLOBALS['plexToken'] !== '') ? true : false,
+				'oAuth' => ($GLOBALS['plexoAuth']) ? true : false,
+				'backend' => ($GLOBALS['authBackend'] == 'plex') ? true : false,
 			),
 			'ombi' => array(
 				'enabled' => ($GLOBALS['ssoOmbi']) ? true : false,
 				'cookie' => isset($_COOKIE['Auth']) ? true : false,
+				'url' => ($GLOBALS['ombiURL'] !== '') ? true : false,
+				'api' => ($GLOBALS['ombiToken'] !== '') ? true : false,
 			),
 			'tautulli' => array(
 				'enabled' => ($GLOBALS['ssoTautulli']) ? true : false,
 				'cookie' => !empty($tautulli) ? true : false,
+				'url' => ($GLOBALS['tautulliURL'] !== '') ? true : false,
 			),
 		),
 		'ping' => array(
@@ -730,6 +736,12 @@ function getSSO()
 				'value' => $GLOBALS['ombiURL'],
 				'placeholder' => 'http(s)://hostname:port'
 			),
+			array(
+				'type' => 'password-alt',
+				'name' => 'ombiToken',
+				'label' => 'Token',
+				'value' => $GLOBALS['ombiToken']
+			),
 			array(
 				'type' => 'switch',
 				'name' => 'ssoOmbi',