Compare commits

...

1 Commits

Author SHA1 Message Date
538fde40fe fix: actually fixes broken monitor -> media links 2025-09-17 13:10:07 -05:00
2 changed files with 4 additions and 12 deletions

View File

@@ -23,7 +23,6 @@ class GetMediaInfoHandler implements HandlerInterface
$handlers = [ $handlers = [
MediaType::Movie->value => 'getMovieDetails', MediaType::Movie->value => 'getMovieDetails',
MediaType::TvShow->value => 'getTvshowDetails', MediaType::TvShow->value => 'getTvshowDetails',
MediaType::TvEpisode->value => 'getTvshowDetails',
]; ];
$handler = $handlers[$command->mediaType]; $handler = $handlers[$command->mediaType];
$media = $this->$handler($command); $media = $this->$handler($command);

View File

@@ -14,17 +14,10 @@
> >
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-stone-800 truncate"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-stone-800 truncate">
<a href="{{ path('app_search_result', {imdbId: monitor.imdbId, mediaType: monitor.monitorType|as_download_type}) }}" <a href="{{ path('app_search_result', {imdbId: monitor.imdbId, mediaType: monitor.monitorType|as_download_type}) }}"
class="mr-1 hover:underline rounded-md" class="mr-1 hover:underline rounded-md">
> {% set episodeIdDto = extract_from_episode_id(monitor|monitor_media_id) %}
{% set routeParams = {imdbId: monitor.imdbId, mediaType: monitor.monitorType|as_download_type, season: episodeIdDto.season, episode: episodeIdDto.episode} %}
{% if monitor.monitorType == "movies" %} {% set route = path('app_search_result', routeParams) ~ "#" ~ episode_anchor(episodeIdDto.season, episodeIdDto.episode) %}
{% set routeParams = {imdbId: monitor.imdbId, mediaType: monitor.monitorType} %}
{% set route = path('app_search_result', routeParams) %}
{% else %}
{% set episodeIdDto = extract_from_episode_id(monitor|monitor_media_id) %}
{% set routeParams = {imdbId: monitor.imdbId, mediaType: monitor.monitorType, season: episodeIdDto.season, episode: episodeIdDto.episode} %}
{% set route = path('app_search_result', routeParams) ~ "#" ~ episode_anchor(episodeIdDto.season, episodeIdDto.episode) %}
{% endif %}
<a href="{{ route }}" <a href="{{ route }}"
class="mr-1 hover:underline rounded-md max-w-[10ch] md:max-w-[unset] truncate dark:text-white"> class="mr-1 hover:underline rounded-md max-w-[10ch] md:max-w-[unset] truncate dark:text-white">
{{ monitor.title }} {{ monitor.title }}