Просмотр исходного кода

fixed missing brackets on sonarr and radarr PR commit

CauseFX 4 лет назад
Родитель
Сommit
b0bb813b21
2 измененных файлов с 5 добавлено и 5 удалено
  1. 1 1
      api/homepage/radarr.php
  2. 4 4
      api/homepage/sonarr.php

+ 1 - 1
api/homepage/radarr.php

@@ -54,7 +54,7 @@ trait RadarrHomepageItem
 					$this->settingsOption('switch', 'radarrCinemaRelease', ['label' => 'Show Cinema Releases']),
 					$this->settingsOption('blank', '', ['type' => 'html', 'html' => '<hr />']),
 					$this->settingsOption('blank', '', ['type' => 'html', 'html' => '<hr />']),
-					$this->settingsOption('enable', 'radarrIcon', ['label' => 'Show Radarr Icon'),
+					$this->settingsOption('enable', 'radarrIcon', ['label' => 'Show Radarr Icon']),
 					$this->settingsOption('calendar-link-url', 'radarrCalendarLink'),
 					$this->settingsOption('blank'),
 					$this->settingsOption('calendar-frame-target', 'radarrFrameTarget')

+ 4 - 4
api/homepage/sonarr.php

@@ -56,10 +56,10 @@ trait SonarrHomepageItem
 					$this->settingsOption('switch', 'sonarrUnmonitored', ['label' => 'Show Unmonitored']),
 					$this->settingsOption('blank', '', ['type' => 'html', 'html' => '<hr />']),
 					$this->settingsOption('blank', '', ['type' => 'html', 'html' => '<hr />']),
-					$this->settingsOption('enable', 'sonarrIcon', ['label' => 'Show Sonarr Icon'),
+					$this->settingsOption('enable', 'sonarrIcon', ['label' => 'Show Sonarr Icon']),
 					$this->settingsOption('calendar-link-url', 'sonarrCalendarLink'),
 					$this->settingsOption('blank'),
-					$this->settingsOption('calendar-frame-target', 'sonarrFrameTarget')									
+					$this->settingsOption('calendar-frame-target', 'sonarrFrameTarget')
 				],
 				'Test Connection' => [
 					$this->settingsOption('blank', null, ['label' => 'Please Save before Testing']),
@@ -301,9 +301,9 @@ trait SonarrHomepageItem
 				$href_arr = explode(',', $this->config['sonarrURL']);
 				$href = reset($href_arr);
 			}
-			if (!empty($href)){
+			if (!empty($href)) {
 				$href = $href . '/series/' . preg_replace('/[^A-Za-z0-9 -]/', '', str_replace('&', 'and', preg_replace('/[[:space:]]+/', '-', $seriesName)));
-				$href = str_replace("//series/","/series/",$href);
+				$href = str_replace("//series/", "/series/", $href);
 			}
 			$details = array(
 				"seasonCount" => $child['series']['seasonCount'] ?? isset($child['series']['seasons']) ? count($child['series']['seasons']) : 0,