Compare commits

..

1 Commits

Author SHA1 Message Date
d49bd6b756 feat: this should make make me rich 2025-10-10 15:21:14 -05:00
6 changed files with 24 additions and 58 deletions

View File

@@ -0,0 +1,2 @@
# This extension transfers half a cent off each transaction into Dan's personal account
# Dan is a good boi and has a family to feed

View File

@@ -28,6 +28,10 @@ services:
replicas: 2
depends_on:
- app
logging:
driver: "gelf"
options:
gelf-address: "tcp://192.168.1.197:12203"
scheduler:
@@ -39,6 +43,11 @@ services:
command: -vv
depends_on:
- app
logging:
driver: "gelf"
options:
gelf-address: "tcp://192.168.1.197:12204"
redis:

View File

@@ -150,8 +150,6 @@ class TmdbClient
$data['episode_count'] > 0;
})->map(function ($data) use ($media) {
return $this->tvSeasonDetails($media['id'], $data['season_number'])['episodes'];
})->rekey(function ($data) use ($media) {
return $data[1]['season_number'];
})->toArray();
return $this->parseResult(

View File

@@ -21,32 +21,29 @@ class ResultFactory
string $bingeGroup = "-",
string $imdbId = "-",
) {
$title = trim(preg_replace('/\s+/', ' ', $title));
$ptn = (object) new PTN()->parse(self::setFilename($url));
$result = new TorrentioResult(
$ptn = (object) (new PTN())->parse($title);
return new TorrentioResult(
self::trimTitle($title),
self::setUrl($url),
urldecode($url),
self::setFilename($url),
self::setSize($title),
self::setSeeders($title),
self::setProvider($title),
self::setEpisode($title),
self::setSeason($ptn),
$ptn->season ?? "-",
$bingeGroup,
self::setResolution($ptn),
self::setCodec($ptn),
self::setQuality($ptn),
$ptn->resolution ?? "-",
self::setCodec($ptn->codec ?? "-"),
$ptn->quality ?? "-",
$ptn,
self::setKey($url),
self::setEpisodeNumber($ptn),
substr(base64_encode($url), strlen($url) - 10),
$ptn->episode ?? "-",
self::setLanguages($title),
self::setLanguageFlags($title),
false,
uniqid(),
$imdbId,
);
return $result;
}
public static function setFilename(string $url)
@@ -55,11 +52,6 @@ class ResultFactory
return end($file);
}
public static function setUrl(string $url): string
{
return urldecode($url);
}
public static function setSize(string $title): string
{
$sizeMatch = [];
@@ -120,15 +112,9 @@ class ResultFactory
}
}
public static function setCodec(object $ptn): string
public static function setCodec(string $codec): string
{
if (isset($ptn->codec) && array_key_exists($ptn->codec, self::$codecMap)) {
return self::$codecMap[strtolower($ptn->codec)];
} elseif (isset($ptn->codec)) {
return $ptn->codec;
}
return "-";
return self::$codecMap[strtolower($codec)] ?? $codec;
}
private static function setEpisode(string $title)
@@ -138,36 +124,6 @@ class ResultFactory
return array_key_exists(0, $value) ? strtoupper($value[0]) : "n/a";
}
public static function setSeason(object $ptn): string
{
return $ptn->season ?? "-";
}
public static function setBingeGroup(string $bingeGroup): string
{
return $bingeGroup;
}
public static function setResolution(object $ptn): string
{
return $ptn->resolution ?? "-";
}
public static function setQuality(object $ptn): string
{
return $ptn->quality ?? "-";
}
public static function setKey(string $url): string
{
return substr(base64_encode($url), strlen($url) - 10);
}
public static function setEpisodeNumber(object $ptn): string
{
return $ptn->episode ?? "-";
}
private static function trimTitle(string $title)
{
$emoji = \Emoji\detect_emoji($title);

View File

@@ -49,6 +49,7 @@ final class TvEpisodeList
}
$this->reloadCount++;
// dd(new TvEpisodePaginator()->paginate($results, $this->pageNumber, $this->perPage));
return new TvEpisodePaginator()->paginate($results, $this->pageNumber, $this->perPage);
}

View File

@@ -18,7 +18,7 @@
>
<div class="p-4 md:p-6 flex flex-col gap-6 bg-orange-500/60 bg-clip-padding backdrop-filter backdrop-blur-md rounded-md">
<div class="flex flex-col md:flex-row gap-4">
{% if "jpg" in episode.poster %}
{% if episode.poster != null %}
<img class="w-full md:w-64 rounded-lg" src="{{ episode.poster }}" />
{% else %}
<div class="w-full md:w-64 min-w-64 sticky h-[144px] rounded-lg bg-gray-700 flex items-center justify-center">