Viktor Petersson da53e045a6 fix(server): stream the backup download so large libraries don't time out (#3005)
* fix(server): stream the backup download so large libraries don't time out

Part of issue #2987 ("Get backup" reportedly never completes on a
Pi 3B+): the settings download built the whole tar.gz on disk before
sending the first byte. tar+gzip at the default level 9 measures
98 s for 355 MB on a Pi 4 (~3.6 MB/s) — a multi-GB library on a Pi 3
sends nothing for longer than a browser keeps a byte-less request
alive, so the download always aborted.

- settings_backup now streams the archive while it is built
  (StreamingHttpResponse over a pipe fed by a tarfile producer
  thread): first bytes hit the wire immediately, nothing is staged
  on the SD card, and a client disconnect stops the producer.
- gzip level drops to 1 for both the streamed and the API
  (create_backup) paths — backups are mostly already-compressed
  media, so level 9 burned minutes of CPU for ~no size win.
- The Content-Disposition filename is RFC-8187-escaped via Django's
  content_disposition_header (player_name is operator-controlled).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(server): surface backup-stream producer failures, fix mypy type

- stream_backup() re-raises a producer failure once the pipe drains,
  so the response aborts mid-transfer instead of completing 200 with
  a silently truncated archive (review feedback). Client disconnects
  still log-and-stop without morphing into spurious errors.
- Return type is Generator (not Iterator) — the disconnect test
  calls .close(), which mypy rejects on Iterator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 08:00:28 +02:00
2026-06-02 22:17:00 +02:00

Anthias · Open Source Digital Signage Solution for Raspberry Pi and PC

Run Unit Tests CodeQL Run Python Linter
GitHub release (latest by date)


Anthias Logo


About Anthias

Anthias is a digital signage platform for Raspberry Pi devices and PCs. Formerly known as Screenly OSE, it was rebranded to clear up the confusion between Screenly (the paid version) and Anthias. More details can be found in this blog post.

Want to help Anthias thrive? Support us using GitHub Sponsor.

🚀 Getting Started

See this page for options on how to install Anthias.

Compatibility

balenaOS

Note

See this page for instructions on how to install Anthias on balenaOS. You can either use the images from balenaHub or download the images from the releases.

Raspberry Pi OS

See the supported hardware section on the website for the full list of supported devices.

Generic 64-bit ARM SBCs (best-effort)

The installer recognizes any 64-bit ARM host that isn't a Raspberry Pi as arm64 and runs the same Anthias stack on it — Armbian on Rock Pi, Orange Pi, Banana Pi and similar boards. The dashboard, scheduler, and asset library all work as on a Pi.

Anthias only supports Debian-based Armbian images (Bookworm / Trixie). The installer wires up the Docker apt repository under download.docker.com/linux/debian, so Ubuntu-based Armbian downloads (Jammy / Noble) will fail at the apt update step. Pick the Debian build of the image for your board on the Armbian site.

Things to know before you pick a board:

  • Videos decode in software — fine for casual 720p, stutter-prone at 1080p on slower SoCs, not suitable for 4K. If your content is mostly video, prefer a Pi 4 / 5 or x86.
  • Images and web pages run smoothly across the supported boards.
  • Tested boards: Rock Pi 4, Rock 5, Orange Pi 5, Banana Pi M5. Allwinner H616 / H618 boards (e.g. Orange Pi Zero 3) currently have weaker mainline display support and are best limited to non-video content.
  • The Plymouth boot splash is wired up but typically does not display on non-Pi boards (their U-Boot bootloaders don't hand the kernel an early DRM device for Plymouth to draw to). The kernel boot log scrolls on the screen until the viewer takes over and renders your first asset — functionally fine, just less polished than the Pi or x86 boot.

Per-SoC hardware video decode (Rockchip rkmpp, Allwinner cedrus, Amlogic meson-vdec) is the planned follow-up; see issue #2849.

Star History

Star History Chart

🐞 Issues and Bugs

Note

We are still in the process of knocking out some bugs. You can track the known issues here. You can also check the discussions in the Anthias forums.

Description
No description provided
Readme GPL-2.0 70 MiB
Languages
Python 70.6%
HTML 8.5%
Shell 5.7%
C++ 3.7%
CSS 3.3%
Other 8.1%