diff --git a/app/Filament/Resources/Torrent/TorrentResource.php b/app/Filament/Resources/Torrent/TorrentResource.php index 205d51f6..b237c04b 100644 --- a/app/Filament/Resources/Torrent/TorrentResource.php +++ b/app/Filament/Resources/Torrent/TorrentResource.php @@ -285,7 +285,7 @@ class TorrentResource extends Resource ]) ->icon('heroicon-o-sparkles') ->action(function (Collection $records, array $data) { - if (empty($data['hr'])) { + if (!isset($data['hr'])) { return; } $idArr = $records->pluck('id')->toArray(); diff --git a/app/Repositories/TorrentRepository.php b/app/Repositories/TorrentRepository.php index 52cdca90..033f68d7 100644 --- a/app/Repositories/TorrentRepository.php +++ b/app/Repositories/TorrentRepository.php @@ -668,6 +668,7 @@ class TorrentRepository extends BaseRepository 'hr' => $hrStatus, ]; $idArr = Arr::wrap($id); + do_log(sprintf("set torrent: %s hr: %s", implode(",", $idArr), $hrStatus)); return Torrent::query()->whereIn('id', $idArr)->update($update); } diff --git a/include/constants.php b/include/constants.php index 77a68df1..40d2701c 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@