Wire up playback reporting, fix duration flash, hide video from audio mini player
Playback reporting (position sync / resume-on-another-device): - player_configure_jellyfin now builds a PlaybackReporter sharing the player controller's Arc, so Start/Progress/Stopped actually reach Jellyfin on every auth path (login/restore/reauth); previously they never did. - The PlaybackReporterWrapper now shares the same Arc the controller and MPV progress loop report through, instead of a dead parallel Option. - Android position callbacks now emit throttled progress reports (30s/item), mirroring the MPV backend. Duration flash on pause: - resolveDuration() prefers the live store duration for the already-loaded track over the runTimeTicks estimate, so pausing no longer clobbers the slider's max to 0 when runTimeTicks is missing. Video leaking into audio mini player: - isVideoItem() also checks the backend PlayerMediaItem mediaType discriminator, so a video started via player_play_item (no Jellyfin `type`, mediaType "video") no longer surfaces in the audio mini player. Middle-truncation of long media names: - New truncateMiddle util applied to track/episode/card/mini-player titles so distinguishing tails (episode numbers, suffixes) stay visible. Adds regression tests for the duration and mini-player fixes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1018,9 +1018,13 @@ pub fn run() {
|
||||
let repository_manager_wrapper = RepositoryManagerWrapper(repository_manager);
|
||||
app.manage(repository_manager_wrapper);
|
||||
|
||||
// Initialize playback reporter wrapper (initially empty, set on login)
|
||||
// Initialize playback reporter wrapper. This MUST share the same Arc
|
||||
// the player controller and MPV progress loop report through (created
|
||||
// above at `playback_reporter`), otherwise `playback_reporter_init`
|
||||
// would populate a dead, parallel Option and no Start/Progress/Stopped
|
||||
// would ever reach Jellyfin.
|
||||
info!("[INIT] Initializing playback reporter wrapper...");
|
||||
let playback_reporter_wrapper = PlaybackReporterWrapper(Arc::new(tokio::sync::Mutex::new(None)));
|
||||
let playback_reporter_wrapper = PlaybackReporterWrapper(playback_reporter.clone());
|
||||
app.manage(playback_reporter_wrapper);
|
||||
|
||||
info!("[INIT] Application setup completed successfully");
|
||||
|
||||
Reference in New Issue
Block a user