ソースを参照

Stop using the season-url file

Zachary Kotlarek 12 年 前
親
コミット
583c141203
3 ファイル変更、2 行追加、34 行削除
  1. 1 1
      web/includes/config.php
  2. 0 5
      web/includes/display.php
  3. 1 28
      web/includes/season.php

+ 1 - 1
web/includes/config.php

@@ -14,6 +14,6 @@ $TVDB_URL         = 'http://thetvdb.com/?tab=series';
 
 ### App Config
 $EXISTS_FILES  = array('no_quality_checks', 'more_number_formats', 'skip');
-$CONTENT_FILES = array('must_match', 'search_name');
+$CONTENT_FILES = array('must_match', 'search_name', 'excludes');
 
 ?>

+ 0 - 5
web/includes/display.php

@@ -68,11 +68,6 @@ function printSeries($series) {
 				echo 'checked="checked"';
 			}
 			echo '/></label><br/>';
-			echo '<label>Search URL: <input type="text" size="150" name="url_' . $season_html . '" value="';
-			if ($monitored !== false && $monitored !== true) {
-				echo htmlspecialchars($monitored);
-			}
-			echo '"/></label><br/>';
 			echo '<input type="submit" name="season_del_' . $season_html . '" value="Delete"><br/>';
 			echo 'Episode count: ' . count($episodes) . '<br/>';
 			echo 'Highest episode number: ' . @max(array_keys($episodes)) . '<br/>';

+ 1 - 28
web/includes/season.php

@@ -42,20 +42,6 @@ function isMonitored($series, $season) {
 	return true;
 }
 
-# Get the season search status, including the URL (if any) for the provided path
-function seasonSearch($series, $season) {
-	$retval = isMonitored($series, $season);
-
-	if ($retval) {
-		$file = seasonPath($series, $season) . '/url';
-		if (is_readable($file)) {
-			$retval = trim(file_get_contents($file));
-		}
-	}
-
-	return $retval;
-}
-
 # Find all the season in a provided series folder and determine which are being monitored
 function findSeasons($series) {
 	$retval = array();
@@ -81,7 +67,7 @@ function findSeasons($series) {
 		# Record the season number and search status
 		if (preg_match('/Season\s+(\d+)/i', $season, $matches)) {
 			$season_num = $matches[1];
-			$retval[ $season_num ] = seasonSearch($series, $season_num);
+			$retval[ $season_num ] = isMonitored($series, $season_num);
 		}
 	}
 	closedir($dir);
@@ -116,19 +102,6 @@ function saveSeasons($series, $data, $series_last, $seasons_last) {
 			}
 		}
 
-		$url = $data[ 'url_' . $season ];
-		$url_path = $season_path . '/url';
-		if ($url) {
-			if (isMonitored($series, $season)) {
-				file_put_contents($url_path, $url . "\n");
-			}
-		} else {
-			if ($seasons_last[ $season ] && isMonitored($series, $season)) {
-				if (file_exists($url_path)) {
-					unlink($url_path);
-				}
-			}
-		}
 	}
 }