feat: movie download monitor
This commit is contained in:
@@ -8,6 +8,14 @@ use Nihilarr\PTN;
|
||||
|
||||
class ResultFactory
|
||||
{
|
||||
public static $codecMap = [
|
||||
'h264' => 'h264',
|
||||
'h265' => 'h265',
|
||||
'x264' => 'h264',
|
||||
'x265' => 'h265',
|
||||
'-' => '-'
|
||||
];
|
||||
|
||||
public static function map(
|
||||
string $url,
|
||||
string $title,
|
||||
@@ -25,7 +33,7 @@ class ResultFactory
|
||||
$ptn->season ?? "-",
|
||||
$bingeGroup,
|
||||
$ptn->resolution ?? "-",
|
||||
$ptn->codec ?? "-",
|
||||
self::setCodec($ptn->codec ?? "-"),
|
||||
$ptn,
|
||||
substr(base64_encode($url), strlen($url) - 10),
|
||||
$ptn->episode ?? "-",
|
||||
@@ -101,6 +109,11 @@ class ResultFactory
|
||||
}
|
||||
}
|
||||
|
||||
public static function setCodec(string $codec): string
|
||||
{
|
||||
return self::$codecMap[strtolower($codec)] ?? $codec;
|
||||
}
|
||||
|
||||
private static function setEpisode(string $title)
|
||||
{
|
||||
$value = [];
|
||||
|
||||
Reference in New Issue
Block a user