Forráskód Böngészése

fix plex lib issue on invite - error message in log
added minimal login toggle
fix live TV string

causefx 8 éve
szülő
commit
c13a0c26c9

+ 2 - 1
api/config/default.php

@@ -173,5 +173,6 @@ return array(
 	'themeVersion' => '',
 	'installedPlugins' => '',
 	'authDebug' => false,
-	'customJava' => ''
+	'customJava' => '',
+	'minimalLoginScreen' => false
 );

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

@@ -311,7 +311,7 @@ function resolvePlexItem($item)
 		case 'clip':
 			$useImage = (isset($item['live']) ? "plugins/images/cache/livetv.png" : null);
 			$plexItem['type'] = 'clip';
-			$plexItem['title'] = (string)$item['title'];
+			$plexItem['title'] = (isset($item['live']) ? 'Live TV' : (string)$item['title']);
 			$plexItem['summary'] = (string)$item['summary'];
 			$plexItem['ratingKey'] = (string)$item['parentRatingKey'];
 			$plexItem['thumb'] = (string)$item['thumb'];

+ 8 - 1
api/functions/organizr-functions.php

@@ -68,7 +68,8 @@ function organizrSpecialSettings()
 			'themeInstalled' => $GLOBALS['themeInstalled'],
 			'themeVersion' => $GLOBALS['themeVersion'],
 			'return' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : false,
-			'authDebug' => $GLOBALS['authDebug']
+			'authDebug' => $GLOBALS['authDebug'],
+			'minimalLoginScreen' => $GLOBALS['minimalLoginScreen']
 		)
 	);
 }
@@ -786,6 +787,12 @@ function getCustomizeAppearance()
 					'name' => 'loginWallpaper',
 					'label' => 'Login Wallpaper',
 					'value' => $GLOBALS['loginWallpaper']
+				),
+				array(
+					'type' => 'switch',
+					'name' => 'minimalLoginScreen',
+					'label' => 'Minimal Login Screen',
+					'value' => $GLOBALS['minimalLoginScreen']
 				)
 			),
 			'Options' => array(

+ 5 - 1
api/plugins/invites.php

@@ -267,7 +267,7 @@ function inviteAction($username, $action = null, $type = null)
 							$response = Requests::post($url, $headers, json_encode($data), array());
 							break;
 						case 'unshare':
-							$id = (is_numeric($username) ? $id : convertPlexName($username, "id"));
+							$id = (is_numeric($username) ? $username : convertPlexName($username, "id"));
 							$url = $url . $id;
 							$response = Requests::delete($url, $headers, array());
 							break;
@@ -288,6 +288,10 @@ function inviteAction($username, $action = null, $type = null)
 								writeLog('error', 'Plex Invite Function - Incorrect Token', 'SYSTEM');
 								return false;
 								break;
+							case 404:
+								writeLog('error', 'Plex Invite Function - Libraries not setup correct [' . $GLOBALS['INVITES-plexLibraries'] . ']', 'SYSTEM');
+								return false;
+								break;
 							default:
 								writeLog('error', 'Plex Invite Function - An error occurred [' . $response->status_code . ']', $username);
 								return false;

+ 5 - 0
js/functions.js

@@ -275,6 +275,11 @@ function swapDisplay(type){
 			$('.iFrame-listing').addClass('hidden').removeClass('show');
 			$('.internal-listing').addClass('hidden').removeClass('show');
 			$('.login-area').addClass('show').removeClass('hidden');
+			if(activeInfo.settings.misc.minimalLoginScreen == true){
+                $('.sidebar').addClass('hidden');
+                $('.navbar').addClass('hidden');
+                $('#pagewrapper').addClass('hidden');
+            }
 			break;
 		default:
 	}