Ver código fonte

only update tautulli custom names config item if it doesn't match

CauseFX 4 anos atrás
pai
commit
f5ecaab217
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      api/homepage/plex.php

+ 5 - 2
api/homepage/plex.php

@@ -854,8 +854,11 @@ trait PlexHomepageItem
 	{
 		if ($this->config['tautulliURL'] && $this->config['tautulliApikey'] && $this->config['homepageUseCustomStreamNames']) {
 			$names = $this->getTautulliFriendlyNames(true);
-			$this->updateConfig(array('homepageCustomStreamNames' => json_encode($names)));
-			$this->config['homepageCustomStreamNames'] = json_encode($names);
+			if (json_encode($names) !== $this->config['homepageCustomStreamNames']) {
+				$this->updateConfig(array('homepageCustomStreamNames' => json_encode($names)));
+				$this->config['homepageCustomStreamNames'] = json_encode($names);
+				$this->debug('Updating Tautulli custom names config item', 'SYSTEM');
+			}
 		}
 	}