Skip to content

Fix startup crashes, decouple modules, repair extension, add tests, C… - #1

Merged
1e1 merged 1 commit into
mainfrom
develop
Jul 1, 2026
Merged

1e1 merged 1 commit into
mainfrom
develop

Conversation

@1e1

@1e1 1e1 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

…I and tooling

Backend:

  • add missing typing imports in core.py (import-time NameError)
  • fix undefined variables in get_cache (crash on disk-mode startup)
  • guard None thumbnails/title/url in RSS generation; escape feed link
  • fix undefined 'redirect' variable in enclosure URL
  • add per-entry cache TTL; short TTL for signed video URLs
  • validate video_id before building YouTube URLs
  • make CORS origins configurable; restrict methods to GET
  • drop dead imports and unused dependencies

Module layout:

  • extract settings.py and cache.py so the import graph is acyclic (settings <- cache <- api <- main); routers no longer import main, making startup order-independent

Video proxy:

  • parametrable size cap via YT2RSS_MAX_VIDEO_BYTES (early 413 on known size, streaming byte-count backstop, yt-dlp max_filesize on fallback)

Extension:

  • make background/content/options scripts work on Firefox (MV2) and Chrome (MV3)
  • switch content messaging to sendResponse pattern for cross-browser support
  • escape RSS URL injected into the toast
  • remove reference to missing toast.css
  • single parametric build.sh producing correct MV2 and MV3 packages

Infra:

  • slim multi-stage Dockerfile, drop non-reproducible network warmup
  • wire memcached in compose, align volume with _DATA, add env docs

Quality gates:

  • pytest suite (49 tests): cache, helpers, routes, size cap, streaming branch (truncation + content-length), and an import-order regression guard
  • ruff lint + format config, applied across the codebase
  • CI: ruff, pytest on Python 3.10/3.12, Docker build with /healthz smoke test
  • Release workflow: build and push versioned image to GHCR on tags

Backend correctness & robustness:
- fix import-time crashes (missing typing imports; undefined vars in the
  disk cache path) that prevented the app from starting at all
- guard None fields in RSS generation and escape all feed output
- per-entry cache TTL, with a short TTL for signed video URLs
- validate video_id before building YouTube URLs
- configurable CORS; parametrable /video size cap (YT2RSS_MAX_VIDEO_BYTES)

Architecture:
- split settings.py and cache.py out of main so the import graph is
  acyclic (settings <- cache <- api <- main); startup is order-independent

Dependencies & LAN discovery:
- pin modern minimums; add zeroconf
- optional mDNS/DNS-SD announcement (YT2RSS_MDNS_ENABLED) so other LAN
  services can discover the instance; registered via the app lifespan and
  degrading gracefully when multicast is unavailable

Browser extension (subcRiSS):
- Firefox (MV2) + Chrome/Edge (MV3) from one source via build.sh
- one-click server registration (activeTab handshake on the yt2rss
  homepage), multiple servers with an active picker
- cross-browser messaging and permissions kept minimal

Quality gates:
- pytest suite (61 tests, offline): cache, helpers, routes, streaming
  cap, discovery, extension packaging, and an import-order guard
- ruff lint + format; CI (ruff, pytest on 3.10/3.12, Docker build with a
  /healthz smoke test); release workflow pushing versioned images to GHCR

Identity & docs:
- Playcast logo used across the README, page favicons, and extension icons
- README illustrations (logo + how-it-works) and full env/usage docs
- slim multi-stage Dockerfile; memcached wired in compose
@1e1
1e1 merged commit e2ac606 into main Jul 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants