From c5ca94ba7224b129607030d13c2863591504b62f Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 18 Feb 2012 17:56:39 +0000 Subject: [PATCH 1/3] Update calls to PECL/HTTP functions --- source/lib/DownloadDispatcher/Source/Plugin/TV.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php index be44ef1..066e582 100644 --- a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php +++ b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php @@ -286,8 +286,8 @@ EOSH; DownloadDispatcher_LogEntry::debug($this->log, "Response code: {$response->getResponseCode()}."); if ($response->getResponseCode() == 200) { - $response_data = $response->getResponseData(); - if (preg_match('/Removed episode .* from series .*/', $response_data['body'])) { + $response_body = $response->getBody(); + if (preg_match('/Removed episode .* from series .*/', $response_body)) { DownloadDispatcher_LogEntry::info($this->log, "Successfully made flexget forget about {$series} s{$season}e{$episode}."); } else { DownloadDispatcher_LogEntry::warning($this->log, "Failed to make flexget forget about {$series} s{$season}e{$episode}."); From f9200718cf8774305f21ad9cf3ae59cadbe1ef6d Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sun, 19 Feb 2012 00:07:10 +0000 Subject: [PATCH 2/3] Update season and episode regex to support tv shows with release year after the Series name --- source/lib/DownloadDispatcher/Source/Plugin/TV.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php index 066e582..77d0f8b 100644 --- a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php +++ b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php @@ -156,7 +156,7 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug return null; }; - if (preg_match('/(\d+)x\d+|s(\d+)e\d+|(?:(?:19|20)\d{2}[\s\.]+)?(\d+)\d{2}/i', $name, $matches)) { + if (preg_match('/(\d+)\d{2}(?!\d|[\s\.](?:\d+x\d+|s\d+e\d+))|(\d+)x\d+|s(\d+)e\d+/i', $name, $matches)) { return $set_season($matches); } else { return 0; @@ -173,7 +173,8 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug return null; }; - if (preg_match('/\d+x(\d+)|s\d+e(\d+)|(?:(?:19|20)\d{2}[\s\.]+)?\d+(\d{2})/i', $name, $matches)) { +# if (preg_match('/\d+x(\d+)|s\d+e(\d+)|(?:(?:19|20)\d{2}[\s\.]+)?\d+(\d{2})/i', $name, $matches)) { + if (preg_match('/\d+(\d{2})(?!\d|[\s\.](?:\d+x\d+|s\d+e\d+))|\d+x(\d+)|s\d+e(\d+)/i', $name, $matches)) { return $set_episode($matches); } else { return 0; From cb2194f5353e3b43c2740908079a88370cb40a8d Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Wed, 14 Mar 2012 08:33:19 +0000 Subject: [PATCH 3/3] Add support for sXepY episode numbering --- source/lib/DownloadDispatcher/Source/Plugin/TV.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php index 77d0f8b..944060f 100644 --- a/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php +++ b/source/lib/DownloadDispatcher/Source/Plugin/TV.class.php @@ -156,7 +156,7 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug return null; }; - if (preg_match('/(\d+)\d{2}(?!\d|[\s\.](?:\d+x\d+|s\d+e\d+))|(\d+)x\d+|s(\d+)e\d+/i', $name, $matches)) { + if (preg_match('/(\d+)\d{2}(?!\d|[\s\.](?:\d+x\d+|s\d+ep?\d+))|(\d+)x\d+|s(\d+)e\d+/i', $name, $matches)) { return $set_season($matches); } else { return 0; @@ -174,7 +174,7 @@ class DownloadDispatcher_Source_Plugin_TV extends DownloadDispatcher_Source_Plug }; # if (preg_match('/\d+x(\d+)|s\d+e(\d+)|(?:(?:19|20)\d{2}[\s\.]+)?\d+(\d{2})/i', $name, $matches)) { - if (preg_match('/\d+(\d{2})(?!\d|[\s\.](?:\d+x\d+|s\d+e\d+))|\d+x(\d+)|s\d+e(\d+)/i', $name, $matches)) { + if (preg_match('/\d+(\d{2})(?!\d|[\s\.](?:\d+x\d+|s\d+ep?\d+))|\d+x(\d+)|s\d+e(\d+)/i', $name, $matches)) { return $set_episode($matches); } else { return 0;