All checks were successful
Deploy / deploy (push) Successful in 23s
- Fastext colour keys now lead every page but the index, since they're the only nav those pages carry; the index keeps them as its closing row since its own body is already the full nav. - Settings page was missing page="settings" in its render_template call, so its header silently fell back to "P100 Index". - Library's search form posted a q param the route never read; it now filters the cached Sonarr/Radarr lists and shows matching tiles. - Discover gained a search bar that queries Ombi (already in front of TMDB/TVDB) and lets you add a result straight to Radarr/Sonarr, showing "Held" instead of a button for anything already in library. - Fixed the Add button's success check, which read d.ok against a response that actually sets d.success — it reported FAILED even when the add worked.
65 lines
2.4 KiB
HTML
65 lines
2.4 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 asks Ombi, which already
|
|
sits in front of TheMovieDB/TVDB, then lets you add straight to
|
|
Radarr/Sonarr from the result. -#}
|
|
<form class="tt-search" action="{{ request.script_root }}/discover" method="get" role="search">
|
|
<label class="visually-hidden" for="q">Search Ombi for a title</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">“{{ q }}”</span>
|
|
</div>
|
|
{% if search.status != 'ok' %}
|
|
{{ service_error('Ombi', 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 “{{ q }}”.</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 — 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 — the feed is unreachable or you already hold it all.</p>
|
|
{% endif %}
|
|
{% endblock %}
|