Move fastext nav to page top, fix Settings header, add working search
All checks were successful
Deploy / deploy (push) Successful in 23s
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.
This commit is contained in:
parent
08491c0c9b
commit
abaccaaacd
6 changed files with 172 additions and 16 deletions
|
|
@ -1,11 +1,40 @@
|
|||
{% extends "_shell.html" %}
|
||||
{% from "_macros.html" import tile %}
|
||||
{% 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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue