Răsfoiți Sursa

plex-library-include to options
add shareid to plex users

CauseFX 4 ani în urmă
părinte
comite
33ea1396d7
2 a modificat fișierele cu 11 adăugiri și 0 ștergeri
  1. 2 0
      api/classes/organizr.class.php
  2. 9 0
      api/functions/option-functions.php

+ 2 - 0
api/classes/organizr.class.php

@@ -6198,6 +6198,7 @@ class Organizr
 									foreach ($child->Server as $server) {
 										if ((string)$server['machineIdentifier'] == $this->config['plexID']) {
 											$machineMatches = true;
+											$shareId = $server['id'];
 										}
 									}
 									if ($machineMatches) {
@@ -6205,6 +6206,7 @@ class Organizr
 											'username' => (string)$child['username'],
 											'email' => (string)$child['email'],
 											'id' => (string)$child['id'],
+											'shareId' => (string)$shareId
 										);
 									}
 								} else {

+ 9 - 0
api/functions/option-functions.php

@@ -268,6 +268,15 @@ trait OptionsFunction
 					'options' => $extras['options']
 				];
 				break;
+			case 'plexlibraryinclude':
+				$settingMerge = [
+					'type' => 'select2',
+					'class' => 'select2-multiple',
+					'id' => $name . '-include-select',
+					'label' => 'Libraries to Include',
+					'options' => $extras['options']
+				];
+				break;
 			// HTML ITEMS
 			// precodeeditor possibly not needed anymore
 			case 'precodeeditor':