arr-summary/templates/discover.html
Barely Removable cef66e7361
All checks were successful
Deploy / deploy (push) Successful in 24s
Search Sonarr/Radarr directly on Discover, full top nav, live System links
- Discover's search now hits Radarr's/Sonarr's own lookup endpoints
  directly (the same ones /add-to-radarr and /add-to-sonarr already
  use), instead of Ombi — one fewer round trip, and a result always
  resolves the same way its own Add button will. The Ombi-based
  ombi_search/_tmdb_poster helpers are gone.
- The top nav on every page but the index now lists all eight
  destinations (FULL_FASTEXT) instead of the original four; the index
  keeps the original four-entry row as its own closing line
  (HOME_FASTEXT), since its body already lists every destination once.
- System page's Transmission rows are now links to each service's own
  reverse-proxied instance (service_urls, already injected into every
  template but unused until now).
2026-08-30 08:40:52 -07:00

66 lines
2.5 KiB
HTML

{% extends "_shell.html" %}
{% from "_macros.html" import tile, service_error %}
{% block title %}P103 Discover{% endblock %}
{% block content %}
<h1 class="tt-dh bloom tt-masthead">DISCOVER</h1>
<p class="tt-empty">Popular right now, with anything already in library filtered out.</p>
{#- Search sits at the top for the same reason it does on Library: a
title in mind is the common case. This one hits Radarr's and
Sonarr's own lookup directly — the same call /add-to-radarr and
/add-to-sonarr already make — so a result here always resolves the
same way a click on its own Add button will. -#}
<form class="tt-search" action="{{ request.script_root }}/discover" method="get" role="search">
<label class="visually-hidden" for="q">Search Sonarr and Radarr for a title to add</label>
<input class="tt-input" type="search" id="q" name="q" value="{{ q }}"
placeholder="SEARCH TO ADD" autocomplete="off" spellcheck="false">
<button class="tt-btn" type="submit">Search</button>
</form>
{% if search %}
<div class="tt-field">
<span>Results</span>
<span class="tt-field-meta">&ldquo;{{ q }}&rdquo;</span>
</div>
{% if search.status != 'ok' %}
{{ service_error('Sonarr/Radarr', search.error) }}
{% elif search.results %}
<div class="tt-tiles">
{% for it in search.results %}
{{ tile(it.title, it.kind ~ (' · Held' if it.held else ''), it.poster, it.year, ('' if it.held else '+ Add'), it.target) }}
{% endfor %}
</div>
{% else %}
<p class="tt-empty">No matches for &ldquo;{{ q }}&rdquo;.</p>
{% endif %}
{% endif %}
<div class="tt-field">
<span>Films</span>
<span class="tt-field-meta">{{ rt_movies | length }} not in library</span>
</div>
{% if rt_movies %}
<div class="tt-tiles">
{% for m in rt_movies %}
{{ tile(m.title, m.year, m.poster, m.score, '+ Add', 'radarr') }}
{% endfor %}
</div>
{% else %}
<p class="tt-empty">Nothing to suggest &mdash; the feed is unreachable or it's all already in your library.</p>
{% endif %}
<div class="tt-field">
<span>Television</span>
<span class="tt-field-meta">{{ rt_tv | length }} not in library</span>
</div>
{% if rt_tv %}
<div class="tt-tiles">
{% for s in rt_tv %}
{{ tile(s.title, s.year, s.poster, s.score, '+ Add', 'sonarr') }}
{% endfor %}
</div>
{% else %}
<p class="tt-empty">Nothing to suggest &mdash; the feed is unreachable or you already hold it all.</p>
{% endif %}
{% endblock %}