yt-dlp
This commit is contained in:
@@ -35,57 +35,57 @@
|
||||
</nav>
|
||||
<form class="form" id="site-search" action="/youtube.com/results">
|
||||
<input type="search" name="search_query" class="search-box" value="{{ search_box_value }}"
|
||||
{{ "autofocus" if (request.path in ("/", "/results") or error_message) else "" }} required placeholder="Type to search...">
|
||||
<button type="submit" value="Search" class="search-button">Search</button>
|
||||
{{ "autofocus" if (request.path in ("/", "/results") or error_message) else "" }} required placeholder="{{ _('Type to search...') }}">
|
||||
<button type="submit" value="Search" class="search-button">{{ _('Search') }}</button>
|
||||
<!-- options -->
|
||||
<div class="dropdown">
|
||||
<!-- hidden box -->
|
||||
<input id="options-toggle-cbox" class="opt-box" type="checkbox">
|
||||
<!-- end hidden box -->
|
||||
<label class="dropdown-label" for="options-toggle-cbox">Options</label>
|
||||
<label class="dropdown-label" for="options-toggle-cbox">{{ _('Options') }}</label>
|
||||
<div class="dropdown-content">
|
||||
<h3>Sort by</h3>
|
||||
<h3>{{ _('Sort by') }}</h3>
|
||||
<div class="option">
|
||||
<input type="radio" id="sort_relevance" name="sort" value="0">
|
||||
<label for="sort_relevance">Relevance</label>
|
||||
<label for="sort_relevance">{{ _('Relevance') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="sort_upload_date" name="sort" value="2">
|
||||
<label for="sort_upload_date">Upload date</label>
|
||||
<label for="sort_upload_date">{{ _('Upload date') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="sort_view_count" name="sort" value="3">
|
||||
<label for="sort_view_count">View count</label>
|
||||
<label for="sort_view_count">{{ _('View count') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="sort_rating" name="sort" value="1">
|
||||
<label for="sort_rating">Rating</label>
|
||||
<label for="sort_rating">{{ _('Rating') }}</label>
|
||||
</div>
|
||||
|
||||
<h3>Upload date</h3>
|
||||
<h3>{{ _('Upload date') }}</h3>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_any" name="time" value="0">
|
||||
<label for="time_any">Any</label>
|
||||
<label for="time_any">{{ _('Any') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_last_hour" name="time" value="1">
|
||||
<label for="time_last_hour">Last hour</label>
|
||||
<label for="time_last_hour">{{ _('Last hour') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_today" name="time" value="2">
|
||||
<label for="time_today">Today</label>
|
||||
<label for="time_today">{{ _('Today') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_this_week" name="time" value="3">
|
||||
<label for="time_this_week">This week</label>
|
||||
<label for="time_this_week">{{ _('This week') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_this_month" name="time" value="4">
|
||||
<label for="time_this_month">This month</label>
|
||||
<label for="time_this_month">{{ _('This month') }}</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" id="time_this_year" name="time" value="5">
|
||||
<label for="time_this_year">This year</label>
|
||||
<label for="time_this_year">{{ _('This year') }}</label>
|
||||
</div>
|
||||
|
||||
<h3>Type</h3>
|
||||
|
||||
@@ -31,11 +31,19 @@
|
||||
<input type="number" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}" step="1">
|
||||
{% endif %}
|
||||
{% elif setting_info['type'].__name__ == 'float' %}
|
||||
|
||||
<input type="number" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}" step="0.01">
|
||||
{% elif setting_info['type'].__name__ == 'str' %}
|
||||
<input type="text" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}">
|
||||
{% if 'options' is in(setting_info) %}
|
||||
<select id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}">
|
||||
{% for option in setting_info['options'] %}
|
||||
<option value="{{ option[0] }}" {{ 'selected' if option[0] == value else '' }}>{{ option[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="text" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span>Error: Unknown setting type: setting_info['type'].__name__</span>
|
||||
<span>Error: Unknown setting type: {{ setting_info['type'].__name__ }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user