Skip to content

Commit 4071bd4

Browse files
authored
Merge pull request #4657 from Roardom/meta-update-when-missing
(Update) Allow refreshing tmdb metadata when missing from database
2 parents 42ffa04 + 9f699e7 commit 4071bd4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: resources/views/torrent/partials/movie_meta.blade.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,19 @@ class="meta__poster"
7777
</button>
7878
</form>
7979
</li>
80+
@endif
81+
82+
@if ($meta?->id || $torrent?->tmdb_movie_id ?? null)
8083
<li>
8184
<form
82-
action="{{ route('torrents.similar.update', ['category' => $category, 'metaId' => $meta->id]) }}"
85+
action="{{ route('torrents.similar.update', ['category' => $category, 'metaId' => $meta?->id ?? $torrent->tmdb_movie_id]) }}"
8386
method="post"
8487
>
8588
@csrf
8689
@method('PATCH')
8790

8891
<button
89-
@if (cache()->has('tmdb-movie-scraper:' . $meta->id) && ! auth()->user()->group->is_modo)
92+
@if (cache()->has('tmdb-movie-scraper:' . ($meta?->id ?? $torrent->tmdb_movie_id)) && ! auth()->user()->group->is_modo)
9093
disabled
9194
title="This item was recently updated. Try again tomorrow."
9295
@endif

Diff for: resources/views/torrent/partials/tv_meta.blade.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,18 @@ class="meta__poster"
7777
</button>
7878
</form>
7979
</li>
80+
@endif
81+
82+
@if ($meta?->id || $torrent?->tmdb_tv_id ?? null)
8083
<li>
8184
<form
82-
action="{{ route('torrents.similar.update', ['category' => $category, 'metaId' => $meta->id]) }}"
85+
action="{{ route('torrents.similar.update', ['category' => $category, 'metaId' => $meta?->id ?? $torrent->tmdb_tv_id]) }}"
8386
method="post"
8487
>
8588
@csrf
8689
@method('PATCH')
8790
<button
88-
@if (cache()->has('tmdb-tv-scraper:' . $meta->id) && ! auth()->user()->group->is_modo)
91+
@if (cache()->has('tmdb-tv-scraper:' . ($meta?->id ?? $torrent->tmdb_tv_id)) && ! auth()->user()->group->is_modo)
8992
disabled
9093
title="This item was recently updated. Try again tomorrow."
9194
@endif

0 commit comments

Comments
 (0)