From dda09bdd3b8d0cab6c25531512cb96259cb838e8 Mon Sep 17 00:00:00 2001 From: tkrmagid Date: Sun, 14 Jun 2026 02:39:18 +0900 Subject: [PATCH] v0.4.39: log per-anchor play source (CACHE vs LIVE STREAM) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VideoPlayback.getOrStart now logs, for each anchor it starts, whether the source resolved to the local cache file or a live network stream. This is the single diagnostic that separates "cache miss -> fragile live stream" from "cached but decode failed" when comparing a working host log against a failing remote client's log — needed because the symptom is intermittent (videos that fail before their preload finishes vs ones that play once cached). Co-Authored-By: Claude Opus 4.7 --- gradle.properties | 2 +- .../videoplayer/client/playback/VideoPlayback.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index cef02f2..68bbb2a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.configuration-cache=false # Mod mod_id=video_player -mod_version=0.4.38 +mod_version=0.4.39 maven_group=com.ejclaw.videoplayer archives_base_name=video_player diff --git a/src/main/java/com/ejclaw/videoplayer/client/playback/VideoPlayback.java b/src/main/java/com/ejclaw/videoplayer/client/playback/VideoPlayback.java index 5a6a72f..8ab512b 100644 --- a/src/main/java/com/ejclaw/videoplayer/client/playback/VideoPlayback.java +++ b/src/main/java/com/ejclaw/videoplayer/client/playback/VideoPlayback.java @@ -68,6 +68,19 @@ public final class VideoPlayback { String source = cached != null ? cached.toAbsolutePath().toString() : VideoCache.encodeUrl(be.getUrl()); + // Diagnostic: record, per anchor, whether this play resolved to the local cache file or + // fell back to a live network stream. A LIVE STREAM line on a video that doesn't show + // means a cache miss (download hadn't finished / failed) and the failure is on the + // network/decoder-open path; a CACHE line that still doesn't show means the local file + // decoded badly. This is the single fact that splits "cache problem" from "decode + // problem" when comparing two clients' logs. + if (cached != null) { + VideoPlayerMod.LOG.info("[{}] play {} at {} -> CACHE {}", + VideoPlayerMod.MOD_ID, be.getUrl(), pos.toShortString(), cached.getFileName()); + } else { + VideoPlayerMod.LOG.info("[{}] play {} at {} -> LIVE STREAM (not cached yet)", + VideoPlayerMod.MOD_ID, be.getUrl(), pos.toShortString()); + } backend.play(source, be.isLoop()); backend.setVolume(be.isMuted() ? 0F : be.getVolume());