Move current_image caching to plugins

This commit is contained in:
zv0n 2025-05-10 20:54:59 +02:00
parent 6bfd9a2d8b
commit 4aa67ce02d
6 changed files with 18 additions and 18 deletions

View file

@ -3,7 +3,7 @@
namespace App\Jobs;
use App\Models\Device;
use App\Models\PlaylistItem;
use App\Models\Plugin;
use Illuminate\Support\Facades\Storage;
use Ramsey\Uuid\Uuid;
use Spatie\Browsershot\Browsershot;
@ -62,8 +62,8 @@ class CommonFunctions
public static function cleanupFolder(): void
{
$activeDeviceImageUuids = Device::pluck('current_screen_image')->filter()->toArray();
$activePlaylistImageUuids = PlaylistItem::pluck('current_image')->filter()->toArray();
$activeImageUuids = array_merge($activeDeviceImageUuids, $activePlaylistImageUuids);
$activePluginImageUuids = Plugin::pluck('current_image')->filter()->toArray();
$activeImageUuids = array_merge($activeDeviceImageUuids, $activePluginImageUuids);
$files = Storage::disk('public')->files('/images/generated/');
foreach ($files as $file) {