@if ($data['is_restricted'] == 1)
{{ __('frontend.age_restriction') }}
@endif
@if ($data['access'] == 'pay-per-view')
@php
$rentalStartDuration = trans_choice('messages.lbl_day_text', $data['available_for'], ['count' => $data['available_for']]);
$rentalWatchDuration = trans_choice('messages.lbl_day_text', $data['access_duration'], ['count' => $data['access_duration']]);
@endphp
@if ($data['purchase_type'] === 'rental')
{!! __('messages.rental_info', [
'start_duration' => $rentalStartDuration,
'watch_duration' => $rentalWatchDuration,
]) !!}
@else
{!! __('messages.purchase_info', [
'start_duration' => $rentalStartDuration,
]) !!}
@endif
@if (!\Modules\Entertainment\Models\Entertainment::isPurchased($data['id'], 'episode'))
@if ($data['purchase_type'] === 'rental')
@if ($data['discount'] > 0)
{!! __('messages.rent_button', ['price' => '' . Currency::format($data['price'] - $data['price'] * ($data['discount'] / 100), 2) . '']) !!}
{{ Currency::format($data['price'], 2) }}
@else
{!! __('messages.rent_button', ['price' => '' . Currency::format($data['price'], 2) . '']) !!}
@endif
@else
@if ($data['discount'] > 0)
{!! __('messages.one_time_button', ['price' => '' . Currency::format($data['price'] - $data['price'] * ($data['discount'] / 100), 2) . '']) !!}
{{ Currency::format($data['price'], 2) }}
@else
{!! __('messages.one_time_button', ['price' => '' . Currency::format($data['price'], 2) . '']) !!}
@endif
@endif
@endif
@endif
@if ($data['tvshow_name'])
{{ $data['tvshow_name'] }}
@endif
{{ $data['name'] }}
@if ($data['content_rating'])
{{ $data['content_rating'] }}
@endif
{!! Str::limit(strip_tags($data['description']), 300) !!}
@if(strlen(strip_tags($data['description'])) > 300)
{{ __('messages.read_more') }}
@endif
@php
$qualityOptions = [];
if ($data['enable_quality'] == 1) {
$videoLinks = $data['video_links'];
foreach ($videoLinks as $link) {
$qualityOptions[$link->quality] = [
'value' =>
$link->type === 'Local'
? setBaseUrlWithFileName($link->url, 'video', 'episode')
: Crypt::encryptString($link->url),
'type' => $link->type, // Add the type here
];
}
}
$type = $data['video_upload_type'];
$video_url = $data['video_url_input'];
if ($data['video_upload_type'] == 'Local' && !empty($data['bunny_video_url'] && env('ACTIVE_STORAGE') == 'bunny')) {
$type = 'HLS';
$video_url = Crypt::encryptString($data['bunny_video_url']);
} else {
$video_url = $data['video_url_input'];
}
$qualityOptionsJson = json_encode($qualityOptions);
$subtitleInfoJson = $data['subtitle_info']
? json_encode($data['subtitle_info']->toArray(request()))
: json_encode([]);
@endphp
@if ($data['access'] == 'pay-per-view' && \Modules\Entertainment\Models\Entertainment::isPurchased($data['id'], 'episode') == false)
@endif
-
@if (
$data['access'] != 'pay-per-view' ||
\Modules\Entertainment\Models\Entertainment::isPurchased($data['id'], 'episode'))
@php
$video_url = $data['video_url_input'];
$video_upload_type = $data['video_upload_type'];
$plan_type = getActionPlan('video-cast');
@endphp
@if (!empty($plan_type) && ($video_upload_type == 'Local' || $video_upload_type == 'URL'))
@php
$video_url11 =
$video_upload_type == 'URL' ? Crypt::decryptString($video_url) : $video_url;
@endphp
-
@endif
@endif