feat: movie download monitor

This commit is contained in:
2025-05-03 09:34:40 -05:00
parent 993b34d668
commit babcb00440
13 changed files with 552 additions and 3 deletions

View File

@@ -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 = [];