Update regex for new --series output
This commit is contained in:
9
mt.php
9
mt.php
@@ -184,13 +184,14 @@ if (!$returnValue) {
|
|||||||
$output = array_slice($output, 2, -2);
|
$output = array_slice($output, 2, -2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Name Latest Status
|
* Name Latest Status
|
||||||
-------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------
|
||||||
castle s02e10 *hdtv-Proper
|
* Castle S03E24 - 49d 7h *720p
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
foreach ($output as $line) {
|
foreach ($output as $line) {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (!preg_match('/^\s(?P<series>.{1,30})\s+(?P<episode>.{1,20})\s+(?P<quality>.*)\s+/', $line, $matches)) {
|
if (!preg_match('/^\s(?P<series>.{1,30})\s+(?P<episode>.{1,20}?)( - (?P<elapsed>[0-9dhms ]+))?\s+(?P<quality>.*)\s+/', $line, $matches)) {
|
||||||
$errors[] = "Failed to parse '$line'";
|
$errors[] = "Failed to parse '$line'";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user