wip: gracefully handles torrentio 429

This commit is contained in:
2025-06-19 22:39:41 -05:00
parent 1e130c3490
commit 2121466322
8 changed files with 461 additions and 28 deletions

View File

@@ -21,6 +21,15 @@ class UtilExtension
return uniqid();
}
#[AsTwigFilter('truncate')]
public function truncate(string $text)
{
if (strlen($text) > 300) {
$text = substr($text, 0, 300) . '...';
}
return $text;
}
#[AsTwigFilter('filesize')]
public function type(string|int $size)
{