2021-09-05 17:10:14 +00:00
{% extends "home/base.html" %}
2021-12-17 08:09:21 +00:00
{% load static %}
2021-09-05 17:10:14 +00:00
{% block content %}
2021-12-06 11:05:25 +00:00
< div class = "boxed-content" >
2021-12-17 08:09:21 +00:00
< div id = "notifications" data = "setting" > < / div >
2021-12-06 11:05:25 +00:00
< div class = "title-bar" >
< h1 > User Configurations< / h1 >
< / div >
< form action = "/settings/" method = "POST" name = "user-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 >
{{ user_form.colors }}
< / 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 >
{{ user_form.page_size }}
< / div >
< / div >
< button type = "submit" name = "user-settings" > Update User Configurations< / button >
< / form >
< div class = "title-bar" >
< h1 > Application Configurations< / h1 >
< / div >
< form action = "/settings/" method = "POST" name = "application-update" >
{% csrf_token %}
< div class = "settings-group" >
< h2 id = "subscriptions" > Subscriptions< / h2 >
< div class = "settings-item" >
< p > Current page size: < span class = "settings-current" > {{ config.subscriptions.channel_size }}< / span > < / p >
< i > Recent videos for channels and playlist to check when running < b > Rescan subscriptions< / b > , max recommended 50.< / i > < br >
{{ app_form.subscriptions_channel_size }}
< / 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 >
{{ app_form.downloads_limit_count }}
< / div >
< div class = "settings-item" >
< p > Current download speed limit in KB/s: < span class = "settings-current" > {{ config.downloads.limit_speed }}< / span > < / p >
2022-04-10 15:33:00 +00:00
< i > Limit download speed. 0 (zero) to deactivate, e.g. 1000 (1MB/s). Speeds are in KB/s. Setting takes effect on new download jobs or application restart.< / i > < br >
2021-12-06 11:05:25 +00:00
{{ app_form.downloads_limit_speed }}
< / div >
< div class = "settings-item" >
< p > Current throttled rate limit in KB/s: < span class = "settings-current" > {{ config.downloads.throttledratelimit }}< / span > < / p >
< i > Download will restart if speeds drop below specified amount. 0 (zero) to deactivate, e.g. 100. Speeds are in KB/s.< / i > < br >
{{ app_form.downloads_throttledratelimit }}
< / 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 >
{{ app_form.downloads_sleep_interval }}
< / div >
2021-12-16 05:44:37 +00:00
< div class = "settings-item" >
< p > < span class = "danger-zone" > Danger Zone< / span > : Current auto delete watched videos: < span class = "settings-current" > {{ config.downloads.autodelete_days }}< / span > < / p >
< i > Auto delete watched videos after x days, 0 (zero) to deactivate:< / i > < br >
{{ app_form.downloads_autodelete_days }}
< / div >
2021-12-06 11:05:25 +00:00
< / 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" > bestvideo[height< =1080][VCODEC=avc1]+bestaudio[ACODEC=mp4a]/mp4< / span > : Max 1080p video height with iOS compatible video and audio codecs.< / 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 >
{{ app_form.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 >
{{ app_form.downloads_add_metadata }}
< / 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 >
{{ app_form.downloads_add_thumbnail }}
< / div >
2022-02-11 06:36:36 +00:00
< / div >
< div class = "settings-group" >
< h2 id = "format" > Subtitles< / h2 >
2022-01-30 13:10:29 +00:00
< div class = "settings-item" >
< p > Subtitles download setting: < span class = "settings-current" > {{ config.downloads.subtitle }}< / span > < br >
< i > Choose which subtitles to download, add comma separated two letter language ISO code,< br >
e.g. < span class = "settings-current" > en, de< / span > < / i > < br >
{{ app_form.downloads_subtitle }}< / p >
< / div >
< div class = "settings-item" >
< p > Subtitle source settings: < span class = "settings-current" > {{ config.downloads.subtitle_source }}< / span > < / p >
< i > Download only user generated, or also less accurate auto generated subtitles.< / i > < br >
{{ app_form.downloads_subtitle_source }}
< / div >
2022-02-11 06:36:36 +00:00
< div class = "settings-item" >
< p > Index and make subtitles searchable: < span class = "settings-current" > {{ config.downloads.subtitle_index }}< / span > < / p >
< i > Store subtitle lines in Elasticsearch. Not recommended for low-end hardware.< / i > < br >
{{ app_form.downloads_subtitle_index }}
< / div >
2021-12-06 11:05:25 +00:00
< / div >
2022-04-29 11:38:43 +00:00
< div class = "settings-group" >
< h2 id = "format" > Cookie< / h2 >
< div class = "settings-item" >
< p > Import YouTube cookie: < span class = "settings-current" > {{ config.downloads.cookie_import }}< / span > < br > < / p >
2022-07-03 09:46:45 +00:00
< p > For automatic cookie import use < b > Tube Archivist Companion< / b > < a href = "https://github.com/tubearchivist/browser-extension" target = "_blank" > browser extension< / a > .< / p >
< i > For manual cookie import, place your cookie file named < span class = "settings-current" > cookies.google.txt< / span > in < span class = "settings-current" > cache/import< / span > before enabling. Instructions in the < a href = "https://github.com/tubearchivist/tubearchivist/wiki/Settings" target = "_blank" > Wiki.< / a > < / i > < br >
2022-05-04 10:07:01 +00:00
{{ app_form.downloads_cookie_import }}< br >
{% if config.downloads.cookie_import %}
< div id = "cookieMessage" >
< button onclick = "handleCookieValidate()" type = "button" id = "cookieButton" > Validate Cookie File< / button >
< / div >
{% endif %}
2022-04-29 11:38:43 +00:00
< / div >
< / div >
2022-01-05 07:06:07 +00:00
< div class = "settings-group" >
< h2 id = "integrations" > Integrations< / h2 >
< div class = "settings-item" >
2022-02-11 10:18:37 +00:00
< p > API token: < button type = "button" onclick = "textReveal()" id = "text-reveal-button" > Show< / button > < / p >
< div id = "text-reveal" class = "description-text" >
< p > {{ api_token }}< / p >
2022-02-11 11:19:10 +00:00
< button class = "danger-button" type = "button" onclick = "resetToken()" > Revoke< / button >
2022-02-11 10:18:37 +00:00
< / div >
2022-01-11 07:15:36 +00:00
< / div >
2022-01-05 07:06:07 +00:00
< div class = "settings-item" >
2022-04-08 10:18:33 +00:00
< p > Integrate with < a href = "https://returnyoutubedislike.com/" target = "_blank" > returnyoutubedislike.com< / a > to get dislikes and average ratings back: < span class = "settings-current" > {{ config.downloads.integrate_ryd }}< / span > < / p >
2022-01-05 07:43:24 +00:00
< i > Before activating that, make sure you have a scraping sleep interval of at least 3 secs set to avoid ratelimiting issues.< / i > < br >
2022-01-05 07:06:07 +00:00
{{ app_form.downloads_integrate_ryd }}
< / div >
2022-04-04 16:08:44 +00:00
< div class = "settings-item" >
2022-04-08 10:18:33 +00:00
< p > Integrate with < a href = "https://sponsor.ajay.app/" target = "_blank" > SponsorBlock< / a > to get sponsored timestamps: < span class = "settings-current" > {{ config.downloads.integrate_sponsorblock }}< / span > < / p >
2022-04-04 16:08:44 +00:00
< i > Before activating that, make sure you have a scraping sleep interval of at least 3 secs set to avoid ratelimiting issues.< / i > < br >
{{ app_form.downloads_integrate_sponsorblock }}
< / div >
2022-01-11 11:31:22 +00:00
< div class = "settings-item" >
2022-01-15 06:33:16 +00:00
< p > Current Cast integration: < span class = "settings-current" > {{ config.application.enable_cast }}< / span > < / p >
< i > Enabling Cast will load an additional JS library from Google. HTTPS and a supported browser are required for this integration.< / i > < br >
2022-01-11 11:31:22 +00:00
{{ app_form.application_enable_cast }}
< / div >
2022-01-05 07:06:07 +00:00
< / div >
2021-12-06 11:05:25 +00:00
< button type = "submit" name = "application-settings" > Update Application Configurations< / button >
< / form >
< div class = "title-bar" >
2021-12-13 03:55:57 +00:00
< h1 > Scheduler Setup< / h1 >
< div class = "settings-group" >
< p > Schedule settings expect a cron like format, where the first value is minute, second is hour and third is day of the week.< / p >
< p > Examples:< / p >
< ul >
< li > < span class = "settings-current" > 0 15 *< / span > : Run task every day at 15:00 in the afternoon.< / li >
< li > < span class = "settings-current" > 30 8 */2< / span > : Run task every second day of the week (Sun, Tue, Thu, Sat) at 08:30 in the morning.< / li >
2021-12-14 12:06:47 +00:00
< li > < span class = "settings-current" > auto< / span > : Sensible default.< / li >
2021-12-13 03:55:57 +00:00
< li > < span class = "settings-current" > 0< / span > : (zero), deactivate that task.< / li >
< / ul >
< p > Note:< / p >
< ul >
< li > Changes in the scheduler settings require a container restart to take effect.< / li >
< li > Avoid an unnecessary frequent schedule to not get blocked by YouTube. For that reason < i > *< / i > or < i > wildcard< / i > for minutes is not supported.< / li >
< / ul >
< / div >
2021-12-06 11:05:25 +00:00
< / div >
< form action = "/settings/" method = "POST" name = "scheduler-update" >
{% csrf_token %}
< div class = "settings-group" >
2021-12-13 03:55:57 +00:00
< h2 > Rescan Subscriptions< / h2 >
< div class = "settings-item" >
< p > Current rescan schedule: < span class = "settings-current" >
{% if config.scheduler.update_subscribed %}
{% for key, value in config.scheduler.update_subscribed.items %}
{{ value }}
{% endfor %}
{% else %}
False
{% endif %}
< / span > < / p >
< p > Periodically rescan your subscriptions:< / p >
2021-12-06 11:05:25 +00:00
{{ scheduler_form.update_subscribed }}
< / div >
2021-12-13 03:55:57 +00:00
< / div >
< div class = "settings-group" >
< h2 > Start download< / h2 >
< div class = "settings-item" >
< p > Current Download schedule: < span class = "settings-current" >
{% if config.scheduler.download_pending %}
{% for key, value in config.scheduler.download_pending.items %}
{{ value }}
{% endfor %}
{% else %}
False
{% endif %}
< / span > < / p >
< p > Automatic video download schedule:< / p >
2021-12-06 11:05:25 +00:00
{{ scheduler_form.download_pending }}
< / div >
2021-12-13 03:55:57 +00:00
< / div >
< div class = "settings-group" >
< h2 > Refresh Metadata< / h2 >
< div class = "settings-item" >
< p > Current Metadata refresh schedule: < span class = "settings-current" >
{% if config.scheduler.check_reindex %}
{% for key, value in config.scheduler.check_reindex.items %}
{{ value }}
{% endfor %}
{% else %}
False
{% endif %}
< / span > < / p >
< p > Daily schedule to refresh metadata from YouTube:< / p >
2021-12-06 11:05:25 +00:00
{{ scheduler_form.check_reindex }}
< / div >
< div class = "settings-item" >
2021-12-17 08:09:21 +00:00
< p > Current refresh for metadata older than x days: < span class = "settings-current" > {{ config.scheduler.check_reindex_days }}< / span > < / p >
< p > Refresh older than x days, recommended 90:< / p >
2021-12-13 03:55:57 +00:00
{{ scheduler_form.check_reindex_days }}
< / div >
< / div >
< div class = "settings-group" >
< h2 > Thumbnail check< / h2 >
< div class = "settings-item" >
< p > Current thumbnail check schedule: < span class = "settings-current" >
{% if config.scheduler.thumbnail_check %}
{% for key, value in config.scheduler.thumbnail_check.items %}
{{ value }}
{% endfor %}
{% else %}
False
{% endif %}
< / span > < / p >
< p > Periodically check and cleanup thumbnails:< / p >
2021-12-06 11:05:25 +00:00
{{ scheduler_form.thumbnail_check }}
< / div >
2021-12-13 03:55:57 +00:00
< / div >
< div class = "settings-group" >
< h2 > Index backup< / h2 >
< div class = "settings-item" >
< p > Current index backup schedule: < span class = "settings-current" >
{% if config.scheduler.run_backup %}
{% for key, value in config.scheduler.run_backup.items %}
{{ value }}
{% endfor %}
{% else %}
False
{% endif %}
< / span > < / p >
< p > Automatically backup metadata to a zip file:< / p >
2021-12-06 11:05:25 +00:00
{{ scheduler_form.run_backup }}
< / div >
2021-12-13 03:55:57 +00:00
< div class = "settings-item" >
< p > Current backup files to keep: < span class = "settings-current" > {{ config.scheduler.run_backup_rotate }}< / span > < / p >
< p > Max auto backups to keep:< / p >
{{ scheduler_form.run_backup_rotate }}
< / div >
2021-12-06 11:05:25 +00:00
< / div >
< button type = "submit" name = "scheduler-settings" > Update Scheduler Settings< / button >
< / form >
< div class = "title-bar" >
< h1 > Actions< / h1 >
2021-09-05 17:10:14 +00:00
< / div >
2022-05-30 09:06:12 +00:00
< div class = "settings-group" >
< h2 > Delete download queue< / h2 >
< p > Delete your pending or previously ignored videos from your download queue.< p >
< button onclick = "deleteQueue(this)" id = "ignore-button" data-id = "ignore" title = "Delete all previously ignored videos from the queue" > Delete all ignored< / button >
< button onclick = "deleteQueue(this)" id = "pending-button" data-id = "pending" title = "Delete all pending videos from the queue" > Delete all queued< / button >
< / div >
2021-09-05 17:10:14 +00:00
< div class = "settings-group" >
2021-12-06 11:05:25 +00:00
< h2 > Manual media files import.< / h2 >
2022-04-15 15:35:13 +00:00
< 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/tubearchivist/tubearchivist/wiki/Settings" target = "_blank" > Wiki< / a > .< / p >
2021-12-06 11:05:25 +00:00
< div id = "manual-import" >
< button onclick = "manualImport()" > Start import< / button >
2021-09-05 17:10:14 +00:00
< / div >
< / div >
< div class = "settings-group" >
2021-12-06 11:05:25 +00:00
< h2 > Embed thumbnails into media file.< / h2 >
< p > Set extracted youtube thumbnail as cover art of the media file.< / p >
< div id = "re-embed" >
< button onclick = "reEmbed()" > Start process< / button >
2021-09-05 17:10:14 +00:00
< / div >
< / div >
< div class = "settings-group" >
2021-12-06 11:05:25 +00:00
< 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 >
2021-09-05 17:10:14 +00:00
< / div >
< / div >
< div class = "settings-group" >
2021-12-06 11:05:25 +00:00
< h2 > Restore from backup< / h2 >
< p > < span class = "danger-zone" > Danger Zone< / span > : This will replace your existing index with the backup.< / p >
2021-12-14 12:06:47 +00:00
< p > Restore from available backup files from < span class = "settings-current" > cache/backup< / span > .< / p >
{% if available_backups %}
< div class = "backup-grid-row" >
< span > < / span >
< span > Timestamp< / span >
< span > Source< / span >
< span > Filename< / span >
< / div >
{% for backup in available_backups %}
< div class = "backup-grid-row" id = "{{ backup.filename }}" >
< button onclick = "dbRestore(this)" data-id = "{{ backup.filename }}" > Restore< / button >
< span > {{ backup.timestamp }}< / span >
< span > {{ backup.reason }}< / span >
< span > {{ backup.filename }}< / span >
< / div >
{% endfor %}
{% else %}
< p > No backups found.< / p >
{% endif %}
2021-09-05 17:10:14 +00:00
< / div >
2021-12-02 11:38:32 +00:00
< div class = "settings-group" >
2021-12-06 11:05:25 +00:00
< h2 > Rescan filesystem< / h2 >
< p > < span class = "danger-zone" > Danger Zone< / span > : This will delete the metadata of deleted videos from the filesystem.< / p >
2022-04-15 15:35:13 +00:00
< p > Rescan your media folder looking for missing videos and clean up index. More infos on the Github < a href = "https://github.com/tubearchivist/tubearchivist/wiki/Settings" target = "_blank" > Wiki< / a > .< / p >
2021-12-06 11:05:25 +00:00
< div id = "fs-rescan" >
< button onclick = "fsRescan()" > Rescan filesystem< / button >
2021-12-02 11:38:32 +00:00
< / div >
2021-12-06 11:05:25 +00:00
< / div >
{% if request.user.is_superuser %}
< div class = "title-bar" >
< h1 > Users< / h1 >
2021-12-02 11:38:32 +00:00
< / div >
2021-12-06 11:05:25 +00:00
< div class = "settings-group" >
< h2 > User Management< / h2 >
< p > Access the admin interface for basic user management functionality like adding and deleting users, changing passwords and more.< / p >
< a href = "/admin/" > < button > Admin Interface< / button > < / a >
2021-12-02 11:38:32 +00:00
< / div >
2021-12-06 11:05:25 +00:00
{% endif %}
2021-09-05 17:10:14 +00:00
< / div >
2021-12-17 08:09:21 +00:00
< script type = "text/javascript" src = "{% static 'progress.js' %}" > < / script >
2022-01-15 06:33:16 +00:00
{% endblock content %}