autotako

Service to monitor moombox for completed livestream downloads to upload for distribution
git clone https://code.alwayswait.ing/autotako.git
Log | Files | Refs

commit 8156d40e56803d5cdbc15160ead2fff835173df3
parent 0677f90263aee6937ca6044e1662c1896b4d80e0
Author: archiveanon <>
Date:   Fri, 14 Feb 2025 01:59:42 +0000

Add custom upload note field

Diffstat:
Msrc/autotako/job_render.py | 2++
Msrc/autotako/static/style.css | 4++++
Msrc/autotako/templates/edit.html | 1+
Msrc/autotako/templates/job.md | 7+++++++
4 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/autotako/job_render.py b/src/autotako/job_render.py @@ -109,6 +109,7 @@ def _extract_name_from_stream_title(title: str) -> str | None: class JobConfig(msgspec.Struct): name: str upload: JobUploadCriteria + author_note: str | None = None @classmethod def from_moombox_job(cls, job: MoomboxJobInfo) -> Self: @@ -378,6 +379,7 @@ async def _process_job(jobid): job=job, author_override=channel.name if channel else None, stream_time=stream_time.strftime("%Y-%m-%dT%H:%M:%SZ") if stream_time else "(unknown)", + config=job_config, **render_kwargs, ) if readme_finalized and config.webdav and channel and channel.webdav_path: diff --git a/src/autotako/static/style.css b/src/autotako/static/style.css @@ -102,6 +102,10 @@ a { font-size: var(--sl-font-size-large); font-weight: var(--sl-font-weight-semibold); } +.job-editor__note::part(textarea) { + font-family: var(--sl-font-mono); + font-size: var(--sl-font-size-small); +} .return { padding-bottom: var(--sl-spacing-small); } diff --git a/src/autotako/templates/edit.html b/src/autotako/templates/edit.html @@ -22,6 +22,7 @@ <sl-radio value="private">If made private</sl-radio> <sl-radio value="cut">If contents cut</sl-radio> </sl-radio-group> + <sl-textarea class="job-editor__note" name="author_note" label="Custom upload note (markdown-formatted):" {% if config.author_note -%} value="{{ config.author_note }}" {%- endif %}></sl-textarea> <div> <sl-button variant="primary" type="submit">Save</sl-button> <sl-button variant="default" href="/render/{{ job.id }}/config">Cancel</sl-button> diff --git a/src/autotako/templates/job.md b/src/autotako/templates/job.md @@ -18,3 +18,10 @@ Number of fragments: {{job.manifest_progress.values() | sum(attribute="video_seq WARN: Fragments may overlap on multi-broadcast videos, or if unlucky, some portions may be missing entirely. Ideally the operator is available to manually process the raw download into a single video. {%- endif %} +{% if config.author_note -%} +---- + +Note: + +{{ config.author_note }} +{% endif %}