mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 07:27:47 +00:00
Remove redundant check
This commit is contained in:
parent
4aa67ce02d
commit
35660bfa8d
1 changed files with 12 additions and 14 deletions
|
|
@ -49,23 +49,21 @@ Route::get('/display', function (Request $request) {
|
|||
$refreshTimeOverride = null;
|
||||
$nextPlaylistItem = $device->getNextPlaylistItem();
|
||||
// Skip if cloud proxy is enabled for the device
|
||||
if (! $device->proxy_cloud || $nextPlaylistItem) {
|
||||
if ($nextPlaylistItem) {
|
||||
$refreshTimeOverride = $nextPlaylistItem->playlist()->first()->refresh_time;
|
||||
$plugin = $nextPlaylistItem->plugin;
|
||||
if (! $device->proxy_cloud && $nextPlaylistItem) {
|
||||
$refreshTimeOverride = $nextPlaylistItem->playlist()->first()->refresh_time;
|
||||
$plugin = $nextPlaylistItem->plugin;
|
||||
|
||||
// Check and update stale data if needed
|
||||
if ($plugin->isDataStale() || $plugin->current_image == null) {
|
||||
$plugin->updateDataPayload();
|
||||
// Check and update stale data if needed
|
||||
if ($plugin->isDataStale() || $plugin->current_image == null) {
|
||||
$plugin->updateDataPayload();
|
||||
|
||||
if ($plugin->render_markup) {
|
||||
$markup = Blade::render($plugin->render_markup, ['data' => $plugin->data_payload]);
|
||||
} elseif ($plugin->render_markup_view) {
|
||||
$markup = view($plugin->render_markup_view, ['data' => $plugin->data_payload])->render();
|
||||
}
|
||||
|
||||
GeneratePluginJob::dispatchSync($plugin->id, $markup);
|
||||
if ($plugin->render_markup) {
|
||||
$markup = Blade::render($plugin->render_markup, ['data' => $plugin->data_payload]);
|
||||
} elseif ($plugin->render_markup_view) {
|
||||
$markup = view($plugin->render_markup_view, ['data' => $plugin->data_payload])->render();
|
||||
}
|
||||
|
||||
GeneratePluginJob::dispatchSync($plugin->id, $markup);
|
||||
}
|
||||
|
||||
$plugin->refresh();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue