ShareController check ?t param is less than duration, revert frontend mounted usage of param

This commit is contained in:
advplyr 2026-04-25 17:13:22 -05:00
parent 5a6b3d8e61
commit 928051744a
2 changed files with 4 additions and 5 deletions

View file

@ -20,7 +20,7 @@ const ShareManager = require('../managers/ShareManager')
*/
class ShareController {
constructor() { }
constructor() {}
/**
* Public route
@ -54,7 +54,7 @@ class ShareController {
if (mediaItemShare.id === playbackSession.mediaItemShareId) {
Logger.debug(`[ShareController] Found share playback session ${req.cookies.share_session_id}`)
// If ?t was provided, override the cached currentTime
if (startTime > 0) {
if (startTime > 0 && startTime < playbackSession.duration) {
playbackSession.currentTime = startTime
}
mediaItemShare.playbackSession = playbackSession.toJSONForClient()