mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 14:16:45 -05:00
Review fixes on top of the rebased /next-fallback work: - Fix TypeCastError when subreason is stored as JSON null: accessors use as_s?, and error returns go through a helper that omits nil subreason. - Restore graceful no-companion path by reverting player() to return nil, and drop the now-dead info.nil? branch in fetch_video. - Re-enable video caching when Invidious Companion is not configured. - Detect genuinely unavailable videos via playabilityStatus == "ERROR" instead of the localized "Video unavailable" string. - HTML-escape reason/subreason coming from YouTube to avoid HTML injection, and guard against a missing "runs" key. - Tidy published-date fallback and add a regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>