Improve patreon filebrowser

This commit is contained in:
2025-09-21 23:10:53 +02:00
parent 74cece07e1
commit 9be33db14f
2 changed files with 28 additions and 16 deletions

View File

@@ -24,6 +24,18 @@ class DownloadsPatreon extends Component
$this->resetPage();
}
public function clicked($downloadId)
{
$download = Downloads::find($downloadId);
if (!$download) {
return;
}
$download->count++;
$download->save();
cache()->forget("episode_{$download->episode->id}_download_{$download->type}");
}
public function render()
{
$orderby = 'created_at';