浏览代码

Better error message

Zachary Kotlarek 11 年之前
父节点
当前提交
bfc94eb798
共有 1 个文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      web/includes/season.php

+ 2 - 2
web/includes/season.php

@@ -130,7 +130,7 @@ function addSeason($series, $season) {
 	# Ensure the season does not exist
 	$season_path = seasonPath($series, $season);
 	if (file_exists($season_path)) {
-		die('Invalid season: ' . htmlspecialchars($season) . "\n");
+		die(htmlspecialchars($series). ': Invalid season: ' . htmlspecialchars($season) . "\n");
 	}
 
 	# Ensure the season number is listed on TVDB
@@ -140,7 +140,7 @@ function addSeason($series, $season) {
 	}
 	$seasons = getTVDBSeasons($flags['tvdb-id'], $flags['tvdb-lid']);
 	if (!$seasons[ $season ]) {
-		die('Season not listed in TheTVDB: ' . htmlspecialchars($season) . "\n");
+		die(htmlspecialchars($series) . ': Season not listed in TheTVDB: ' . htmlspecialchars($season) . "\n");
 	}
 
 	# Create the directory