Homer 27933dd495 Make the player answer the keyboard and the mouse
PlayerPanel.keyPressEvent handled Space, F and Escape and was dead code:
nothing in the player called setFocusPolicy, so focus went to whichever child
button, slider or combo box was first in the tab order, and that child ate the
keys. Fixing focus alone would not have been enough -- clicking play parks
focus on the play button, which then swallows Space -- so the control bar is
explicitly NoFocus and the bindings are QShortcuts with
WidgetWithChildrenShortcut context on the panel. That fires whichever
descendant holds focus, and does not reach the Search box or the URL field on
other tabs the way an application shortcut would.

mpv's own input stays disabled. With vo=libmpv there is no mpv-owned window,
so its input layer receives nothing; enabling default bindings would mean
hand-forwarding events through a Qt-to-mpv key-name table, handing mpv the
OSD and OSC that are switched off here, and letting `q` quit the core out from
under the Qt UI. One declarative action table now drives the shortcuts, the
context menu and the buttons.

There was no mouse handling at all. Click pauses, double-click goes
fullscreen -- via a doubleClickInterval timer, so a double-click does not also
pause on the way -- the wheel changes volume and Ctrl+wheel seeks, with
sub-notch deltas accumulated so a trackpad is not inert.

The control bar gained previous, next and mute. Mute and volume are driven by
observed mpv properties rather than assumed, so the icon follows a change made
by key, menu or mpv itself. Buffering was completely invisible: a stalled
stream showed a frozen frame for 25 seconds before the retry with nothing on
screen, so paused-for-cache now surfaces a label over the video.

WatchPage owns next/previous because it owns the queue; the panel only asks.
Previous restarts the current item when it is more than five seconds in, as
every other player does, and pushes the interrupted item back onto the head of
the queue rather than dropping it.

Verified: all 38 bindings install, every action is a no-op rather than an
exception with nothing loaded, focus policies are as intended, and a
fullscreen round trip drives the player state correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 01:04:16 +02:00

SageTube

A watch-first YouTube client for the desktop. Search, browse channels and playlists, follow subscriptions, and stream videos in an embedded mpv player — with the full yt-dlp download feature set inherited from YTSage.

Features

Watching

  • 📺 Embedded mpv player (Wayland/X11/Windows/macOS) with quality selector, speed, volume, subtitles, fullscreen
  • 🔍 In-app YouTube search with thumbnail card grid
  • 📂 Channel browsing (Videos / Shorts / Live) and playlist views
  • 🔔 Local subscriptions — no Google account needed — with an aggregated feed; optional real account feed via browser cookies
  • ⏯️ Watch history with resume positions and a persistent play queue
  • ⬇️ One click from any video card into the downloader

Downloading (from YTSage)

  • Format table, audio extraction, subtitles, SponsorBlock, chapters, playlists, trimming, speed limits, proxies, cookies, custom yt-dlp commands, download history — see the upstream README

Install

pip install .
sagetube

Requires libmpv for playback (Arch: pacman -S mpv) — see Building. Without it the app works as a downloader.

Fork notes

SageTube is a fork of YTSage by oop7 (MIT). The internal package keeps the ytsage name so upstream fixes remain mergeable — see Tracking upstream. The fork also fixes a number of upstream bugs (unsafe partial-file cleanup, unverified binary updates, thread-safety issues, PATH corruption on Windows — see the git log).

License

MIT — see LICENSE.

S
Description
No description provided
Readme MIT 12 MiB
5.5.2 Latest
2026-08-08 23:38:07 +00:00
Languages
Python 94.2%
Inno Setup 5.8%