feat: links to movies/series download results page from download list component
This commit is contained in:
@@ -148,9 +148,11 @@ class Tmdb
|
||||
$result = $finder->findBy($id, ['external_source' => 'imdb_id']);
|
||||
|
||||
if (count($result['movie_results']) > 0) {
|
||||
return $result['movie_results'][0];
|
||||
return $result['movie_results'][0]['id'];
|
||||
} elseif (count($result['tv_results']) > 0) {
|
||||
return $result['tv_results'][0];
|
||||
return $result['tv_results'][0]['id'];
|
||||
} elseif (count($result['tv_episode_results']) > 0) {
|
||||
return $result['tv_episode_results'][0]['show_id'];
|
||||
}
|
||||
|
||||
throw new \Exception("No results found for $id");
|
||||
@@ -193,7 +195,7 @@ class Tmdb
|
||||
|
||||
public function mediaDetails(string $id, string $type)
|
||||
{
|
||||
$id = $this->find($id)['id'];
|
||||
$id = $this->find($id);
|
||||
|
||||
if ($type === "movies") {
|
||||
return $this->movieDetails($id);
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<tr{{ attributes }} id="ad_download_{{ download.id }}">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-stone-800 truncate">
|
||||
{{ download.title }}
|
||||
<a href="{{ path('app_search_result', {imdbId: download.imdbId, mediaType: download.mediaType}) }}"
|
||||
class="hover:underline mr-1"
|
||||
>
|
||||
{{ download.title }}
|
||||
</a>
|
||||
|
||||
{% if download.mediaType == "tvshows" %}
|
||||
(S{{ download.ptn.season }}E{{ download.ptn.episode }})
|
||||
— <span class="ml-1">(S{{ download.ptn.season }}E{{ download.ptn.episode }})</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user