OverviewFilesCommitsIssuesDocsReleasesPeers

stremio-vsembed commits / 5cf280c

Subtitle sync: a track the user kept is reported, never re-synced (0.28.1)
The user restored the two Bleach S02E01-02 English tracks the backfill had withdrawn (+22 s / +17 s, correction did not hold). They are recorded as "kept" at the restored file identity, so later syncs skip them; Watch reads "English: kept as fetched (measured 22.18 s off)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5cf280ccd3a7ef6f8acce7ff1fc69c2455123729
by plankatron <fleeky@gmail.com> · 2026-10-05T02:19:36.000Z

Changed files (2) +22 -1

addon.py +5 -1
……@@ -619,7 +619,7 @@ TV_GENRES = [
619619
620620MANIFEST = {
621621 "id": "org.tabertron.vsembed",
622 "version": "0.28.0",
622 "version": "0.28.1",
623623 "name": "Tabertron VsEmbed",
624624 "description": "Self-hosted extractor with TMDB browse + search, played via vidcore and HdHub",
625625 "types": ["movie", "series"],
……@@ -2456,6 +2456,10 @@ def _subtitle_summary_focused(dest: str, present: list, records: dict,
24562456 if rec.get("status") == "corrected":
24572457 return (f"corrected (was {rec['offset']:+.2f} s, "
24582458 f"speed {rec['scale']:.3f})").replace("+", "")
2459 if rec.get("status") == "kept":
2460 # Withdrawn as out of sync, then restored by the user: the sync
2461 # skips it (identity matches) and says what it measured.
2462 return f"kept as fetched (measured {rec['offset']:.2f} s off)"
24592463 return {"in_sync": "in sync"}.get(rec.get("status"), "not yet checked")
24602464
24612465 if len(focus) == 1:
test_subtitle_sync.py +17 -0
……@@ -321,3 +321,20 @@ def test_the_summary_says_other_languages_are_not_checked(lib, monkeypatch):
321321 addon._sync_subtitles(dest)
322322 assert addon._subtitle_summary(dest) == \
323323 "English: corrected (was -2.25 s, speed 1.001) · 2 other languages not checked"
324
325
326def test_a_track_the_user_kept_is_reported_and_never_re_synced(lib, monkeypatch):
327 """2026-10-04: the user restored two withdrawn Bleach tracks. They are
328 recorded as "kept" at the restored file's identity, so a later sync skips
329 them instead of withdrawing them again, and Watch says so."""
330 dest, _ = lib
331 monkeypatch.setattr(addon, "SUBSYNC_LANGUAGES", ("en",))
332 en = _srt(dest, "en")
333 with open(addon.SUBTITLE_SYNC_FILE, "w") as f:
334 json.dump({os.path.abspath(en): {"status": "kept", "offset": 22.18,
335 "scale": 1.0,
336 "identity": addon._file_identity(en)}}, f)
337 monkeypatch.setattr(addon, "_subsync_measure",
338 lambda *a: pytest.fail("re-measured a kept track"))
339 assert addon._sync_subtitles(dest)["tracks"] == 0
340 assert addon._subtitle_summary(dest) == "English: kept as fetched (measured 22.18 s off)"