Explorar o código

Fix invites check for libraries which no longer exist

Every time I saved it was adding "No longer exists - id" for each of the libraries, as it was checking for if the library exists in Plex rather than if it doesn't :)
TehMuffinMoo %!s(int64=4) %!d(string=hai) anos
pai
achega
afce3cfed2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      api/plugins/invites/plugin.php

+ 2 - 2
api/plugins/invites/plugin.php

@@ -196,7 +196,7 @@ class Invites extends Organizr
 								$noLongerId = 0;
 								$libraries = explode(',', $this->config['INVITES-plexLibraries']);
 								foreach ($libraries as $child) {
-									if ($this->search_for_value($child, $libraryList)) {
+									if (!$this->search_for_value($child, $libraryList)) {
 										$libraryList['libraries']['No Longer Exists - ' . $noLongerId] = $child;
 										$noLongerId++;
 									}
@@ -484,4 +484,4 @@ class Invites extends Organizr
 		return (!empty($plexUser) ? $plexUser : null);
 	}
 	
-}
+}