fix: links to series from monitor list row
This commit is contained in:
@@ -19,6 +19,19 @@ class MonitorExtension
|
||||
return $types[$type] ?? '-';
|
||||
}
|
||||
|
||||
#[AsTwigFilter('as_download_type')]
|
||||
public function monitorTypeToDownloadType(string $type)
|
||||
{
|
||||
$types = [
|
||||
'tvshows' => 'tvshows',
|
||||
'tvseason' => 'tvshows',
|
||||
'tvepisode' => 'tvshows',
|
||||
'movie' => 'movies',
|
||||
];
|
||||
|
||||
return $types[$type] ?? '-';
|
||||
}
|
||||
|
||||
#[AsTwigFilter('monitor_media_id')]
|
||||
public function mediaId(Monitor $monitor)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<tr{{ attributes }} id="monitor_{{ monitor.id }}" class="hover:bg-gray-200">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-stone-800 truncate">
|
||||
{{ monitor.title }}
|
||||
<a href="{{ path('app_search_result', {imdbId: monitor.imdbId, mediaType: monitor.monitorType|as_download_type}) }}"
|
||||
class="mr-1 hover:underline rounded-md"
|
||||
>
|
||||
{{ monitor.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800">
|
||||
{{ monitor|monitor_media_id }}
|
||||
|
||||
Reference in New Issue
Block a user