mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2025-04-04 19:40:13 +00:00
137 lines
7.0 KiB
HTML
137 lines
7.0 KiB
HTML
{% extends "home/base.html" %}
|
|
{% block content %}
|
|
<div class="title-bar">
|
|
<h1>Settings</h1>
|
|
</div>
|
|
<form action="/settings/" method="POST" name="settings-update">
|
|
{% csrf_token %}
|
|
<div class="settings-group">
|
|
<h2>Color scheme</h2>
|
|
<div class="settings-item">
|
|
<p>Current color scheme: <span class="settings-current">{{ config.application.colors }}</span></p>
|
|
<i>Select your preferred color scheme between dark and light mode.</i><br>
|
|
<select name="application.colors" id="application.colors">
|
|
<option value="" disabled selected> -- change color scheme -- </option>
|
|
<option value="dark">dark mode</option>
|
|
<option value="light">light mode</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2>Archive View</h2>
|
|
<div class="settings-item">
|
|
<p>Current page size: <span class="settings-current">{{ config.archive.page_size }}</span></p>
|
|
<i>Result of videos showing in archive page</i><br>
|
|
<input type="number" name="archive.page_size" id="archive.page_size">
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2 id="subscriptions">Subscriptions</h2>
|
|
<div class="settings-item">
|
|
<p>Current channel page size: <span class="settings-current">{{ config.subscriptions.channel_size }}</span></p>
|
|
<i>Recent videos to check on check pending, max recommended 50.</i><br>
|
|
<input type="number" name="subscriptions.channel_size" id="subscriptions.channel_size">
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Auto scan subscribed channels:</p>
|
|
<i>Coming soon</i>
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Auto download pending:</p>
|
|
<i>Coming soon</i>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2 id="downloads">Downloads</h2>
|
|
<div class="settings-item">
|
|
<p>Current download limit: <span class="settings-current">{{ config.downloads.limit_count }}</span></p>
|
|
<i>Limit the number of videos getting downloaded on every run. 0 (zero) to deactivate.</i><br>
|
|
<input type="number" name="downloads.limit_count" id="downloads.limit_count">
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Current download speed limit: <span class="settings-current">{{ config.downloads.limit_speed }}</span></p>
|
|
<i>Limit download speed. 0 (zero) to deactivate.</i><br>
|
|
<input type="number" name="downloads.limit_speed" id="downloads.limit_speed"><span>KB/sec</span>
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Current scraping sleep interval: <span class="settings-current">{{ config.downloads.sleep_interval }}</p>
|
|
<i>Seconds to sleep between calls to YouTube. Might be necessary to avoid throttling. Recommended 3.</i><br>
|
|
<input type="number" name="downloads.sleep_interval" id="downloads.sleep_interval">
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>External downloader:</p>
|
|
<i>Coming soon</i>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2 id="format">Download Format</h2>
|
|
<div class="settings-item">
|
|
<p>Limit video and audio quality format for yt-dlp.<br>
|
|
Currently: <span class="settings-current">{{ config.downloads.format }}</span>
|
|
</p>
|
|
<p>Example configurations:</p>
|
|
<ul>
|
|
<li><span class="settings-current">bestvideo[height<=720]+bestaudio/best[height<=720]</span>: best audio and max video height of 720p.</li>
|
|
<li><span class="settings-current">bestvideo[height<=1080]+bestaudio/best[height<=1080]</span>: best audio and max video height of 1080p.</li>
|
|
<li><span class="settings-current">0</span>: deactivate and download the best quality possible as decided by yt-dlp.</li>
|
|
</ul>
|
|
<i>Make sure your custom format gets merged into a single file. Check out the <a href="https://github.com/yt-dlp/yt-dlp#format-selection" target="_blank">documentation</a> for valid configurations.</i><br>
|
|
<input type="text" name="downloads.format" id="downloads.format">
|
|
<br>
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Current metadata embed setting: <span class="settings-current">{{ config.downloads.add_metadata }}</span></p>
|
|
<i>Metadata is not embedded into the downloaded files by default.</i><br>
|
|
<select name="downloads.add_metadata" id="downloads.add_metadata"">
|
|
<option value="" disabled selected> -- change metadata embed -- </option>
|
|
<option value="0">don't embed metadata</option>
|
|
<option value="1">embed metadata</option>
|
|
</select>
|
|
</div>
|
|
<div class="settings-item">
|
|
<p>Current thumbnail embed setting: <span class="settings-current">{{ config.downloads.add_thumbnail }}</span></p>
|
|
<i>Embed thumbnail into the mediafile.</i><br>
|
|
<select name="downloads.add_thumbnail" id="downloads.add_thumbnail"">
|
|
<option value="" disabled selected> -- change thumbnail embed -- </option>
|
|
<option value="0">don't embed thumbnail</option>
|
|
<option value="1">embed thumbnail</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<button type="submit">Update Settings</button>
|
|
</form>
|
|
<div class="title-bar">
|
|
<h1>Actions</h1>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2>Manual media files import.</h2>
|
|
<p>Add files to the <span class="settings-current">cache/import</span> folder. Make sure to follow the instructions in the Github <a href="https://github.com/bbilly1/tubearchivist/wiki/Settings" target="_blank">Wiki</a>.</p>
|
|
<div id="manual-import">
|
|
<button onclick="manualImport()">Start import</button>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2>Backup database</h2>
|
|
<p>Export your database to a zip file stored at <span class="settings-current">cache/backup</span>.</p>
|
|
<div id="db-backup">
|
|
<button onclick="dbBackup()">Start backup</button>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2>Restore from backup</h2>
|
|
<p><span class="danger-zone">Danger Zone</span>: This will replace your existing index with the backup.</p>
|
|
<p>Add the backup zip file to the <span class="settings-current">cache/backup</span> folder.</p>
|
|
<div id="db-restore">
|
|
<button onclick="dbRestore()">Restore backup</button>
|
|
</div>
|
|
</div>
|
|
<div class="settings-group">
|
|
<h2>Rescan filesystem</h2>
|
|
<p><span class="danger-zone">Danger Zone</span>: This will delete the metadata of deleted videos from the filesystem.</p>
|
|
<p>Rescan your media folder looking for missing videos and clean up index. More infos on the Github <a href="https://github.com/bbilly1/tubearchivist/wiki/Settings" target="_blank">Wiki</a>.</p>
|
|
<div id="fs-rescan">
|
|
<button onclick="fsRescan()">Rescan filesystem</button>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|