Repository navigation
Sozo 3.2.1: Telegram-style desktop corner player, no endless loading, downloads and reconnect fixes - #46
Open
professorDeveloper wants to merge 10 commits into
Open
Sozo 3.2.1: Telegram-style desktop corner player, no endless loading, downloads and reconnect fixes#46professorDeveloper wants to merge 10 commits into
professorDeveloper wants to merge 10 commits into
Conversation
Each new episode folder started a prune without waiting. Two running side by side picked the same oldest folders; the second delete threw, and the catch around the whole loop gave up on the rest, leaving 25 of 24. That was the flaky preview_grid_test that turned master's CI red. Prunes are chained now, and each delete is guarded on its own.
On macOS, Windows and Linux the player can now dock into a small floating box in a corner of the app window. It keeps playing while the viewer moves around Home, Search, a detail page or anything else, because it lives in a layer above the Navigator (PlayerDockHost, in MaterialApp.router's builder). Nothing is handed over or restarted. /player now builds PlayerRoute, which gives PlayerPage a GlobalKey. Docking pops the route, and the same State moves into the host in the same frame. Expanding pushes /player again, and the route takes the key back. History ticks, auto-advance, subtitles, party sync and retries carry on as before, and closing the corner player disposes the page normally. - The corner box can be dragged, and on release it snaps to the nearest corner, taking the fling into account. Its inner edges resize it, between 240 px and 60% of the window. The corner and width are saved. - Hover controls: close, back to the full player, the title, previous and next episode, play/pause, 10-second steps when there is room, the time, and a timeline that seeks on click or drag. - I or the PiP button docks the player. Shift+I or a long press keeps the old whole-window always-on-top mini, which is still the only way to watch over other apps. - While docked, the keyboard stays with the page underneath. Clicking the corner player takes the keyboard. Esc or a click elsewhere gives it back without closing the video. I expands. - Opening another title closes the docked one first. Signing out, switching profile and onboarding close it too. - Fix: in the always-on-top mini window, regaining focus cleared _isPip and drew the full control bar into the 426-px window. Mobile and TV are unchanged. PlayerDock.supported is desktop-only, and the phone PiP paths are untouched.
'The source sent a web page instead of the video' failed whole episodes on vidapi and anikoto. Their CDNs serve real MPEG-TS segments as page-N.html / seg-N.html with Content-Type text/html; the player never reads that header and plays them, but both download engines refused them by it. - Kotlin and Dart engines read the first bytes and refuse only markup (<!doctype html, <html, <head, …); TS, fMP4, MKV, QuickTime and encrypted segments pass. A real web page fails once, without retries. - classify() no longer calls a network error 'web page' because a segment URL ends in .html. - A direct download is probed at tap time and refused there when it is a web page; a probe with no answer never blocks. - Mirrors under a WebView directive are sniffed instead of being taken as direct, and a locally proxied stream offers its upstream URL.
- libmpv reconnects a dropped HTTP/HLS stream itself, and a drop is only fatal once playback actually stops; then the player retries at the same position a few times before saying anything. 'Connection reset by peer' after two minutes no longer ends the episode. - Every server gets a start deadline (longer for torrents and WebView sniffing). Past it the player moves to the next server with a short notice, and when none plays it says so instead of 'Video loading…' forever. ExoPlayer's initialize() is bounded too. - Library error sentences are mapped to localized messages. - A labelled or remembered quality is pinned on ExoPlayer instead of ABR starting at the lowest rung, and Auto no longer claims the size it started at. - media_kit: the picture is forced to redraw once the texture exists, so a stream no longer stays black until the first seek.
MovieBox overrides only the paged search, and our host called the plain one, which CloudStream leaves as NotImplementedError. The host now falls back to the paged search (and the other way round).
… and the corner player; Continue Watching keeps up while docked
The tap-time probe failed the whole episode when the default mirror served a web page, even with a working mirror the choice sheet would have offered. Now only when every mirror does; otherwise the pages are dropped from the choice. The film page shows the web-page message instead of "play it first", and a stream played through the media-segment relay offers its upstream url for download rather than the 127.0.0.1 address that dies with the player.
…t once An end of file is judged before playhead movement: the cache carries the playhead past the drop, so a file the connection ended early always looked recovered and stopped silently mid-episode. The last tcp error is kept for that judgement. A live stream is no longer held through the 25 s grace once playing, and an end of a stream without length after a drop is fatal, so it reconnects. Torrents opened from torrent search get the torrent start budget.
Restoring, closing or opening another title while the left /player route was still animating out rebuilt the page there too: the same GlobalKey twice, or the page pulled into a dying route. Signing out and switching profile now close the corner player first, so its last history save lands before the account's rows are wiped instead of after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sozo 3.2.1
Fixes for every real problem reported in support since 3.2.0, plus the Telegram-style desktop corner player.
Desktop: corner player (Telegram-style PiP)
P) docks the running player into a small floating window in the corner of the app. You can drag it and resize it, and it stays on screen while you move between pages (home, search, details, settings).isDesktopPlatform, and Android native PiP works as before.Player: no endless "Video loading", recovers from dropped connections
initialize()is bounded and can no longer hang forever.Downloads: judge a web page by its bytes, not its Content-Type
text/html. Both the Kotlin foreground service and the Dart transfer engine now sniff the first 512 bytes and refuse only real markup.DownloadBuildFailure.webPage.CloudStream
PluginHostfalls back to paged search for plugins that only implement it (MovieBox threwNotImplementedError).Fixes from a pre-PR review
CI
preview_grid_testthat turned master red.Server-side (already deployed in sozo-backend, listed for context)
fayllar.comis signed./hindi/<slug>/to/<slug>/.m1.multimovies.courses) and new site theme; the iqsmartgames video chain behind it is unchanged.Support tickets covered
Tests
flutter analyze: cleanflutter test: 2387/2387 passedPluginSearchTest(6) passweb_page_sniff,transfer_engine,download_media_probe,download_request_builder,download_failure,download_choices_proxy,player_dock_geometry,player_dock_host,player_dock_source, plus the player readiness/retry testsWebPageSniffTestNotes for release
bump: patch(→ 3.2.1), then set the in-app updater in admin → AppVersions.