Remove redundant check

This commit is contained in:
zv0n 2025-05-10 22:41:21 +02:00
parent 4aa67ce02d
commit 35660bfa8d

View file

@ -49,23 +49,21 @@ Route::get('/display', function (Request $request) {
$refreshTimeOverride = null; $refreshTimeOverride = null;
$nextPlaylistItem = $device->getNextPlaylistItem(); $nextPlaylistItem = $device->getNextPlaylistItem();
// Skip if cloud proxy is enabled for the device // Skip if cloud proxy is enabled for the device
if (! $device->proxy_cloud || $nextPlaylistItem) { if (! $device->proxy_cloud && $nextPlaylistItem) {
if ($nextPlaylistItem) { $refreshTimeOverride = $nextPlaylistItem->playlist()->first()->refresh_time;
$refreshTimeOverride = $nextPlaylistItem->playlist()->first()->refresh_time; $plugin = $nextPlaylistItem->plugin;
$plugin = $nextPlaylistItem->plugin;
// Check and update stale data if needed // Check and update stale data if needed
if ($plugin->isDataStale() || $plugin->current_image == null) { if ($plugin->isDataStale() || $plugin->current_image == null) {
$plugin->updateDataPayload(); $plugin->updateDataPayload();
if ($plugin->render_markup) { if ($plugin->render_markup) {
$markup = Blade::render($plugin->render_markup, ['data' => $plugin->data_payload]); $markup = Blade::render($plugin->render_markup, ['data' => $plugin->data_payload]);
} elseif ($plugin->render_markup_view) { } elseif ($plugin->render_markup_view) {
$markup = view($plugin->render_markup_view, ['data' => $plugin->data_payload])->render(); $markup = view($plugin->render_markup_view, ['data' => $plugin->data_payload])->render();
}
GeneratePluginJob::dispatchSync($plugin->id, $markup);
} }
GeneratePluginJob::dispatchSync($plugin->id, $markup);
} }
$plugin->refresh(); $plugin->refresh();