- Feed and profile cards show a progress bar with elapsed/total time, only when the source reports a real position (Plex, Jellyfin, the Android reader). It ticks locally between updates. Apple Music's guessed position is no longer reported. - The Android reader advances MediaSession's stale position to now, stamps when it was read (the server corrects for upload delay), and reports seeks. The server pushes an update to watchers when a position jumps. - When a polled source says where in the song someone is, the next poll is scheduled just after the song ends (never sooner than 5s), instead of waiting out the full interval. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
@@ -49,6 +49,8 @@ export const devicePlaybackSchema = z
|
||||
state: z.enum(['playing', 'paused', 'stopped']),
|
||||
track: reportedTrack.nullish(),
|
||||
positionMs: z.number().int().min(0).nullish(),
|
||||
/** Phone's clock (epoch ms) when positionMs was read; lets the server account for upload delay. */
|
||||
positionAt: z.number().int().positive().nullish(),
|
||||
})
|
||||
.refine((v) => v.state === 'stopped' || v.track, { message: 'track is required unless stopped', path: ['track'] });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user