mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 10:44:32 +02:00
Update media item shares to close when changing shares on same device
This commit is contained in:
parent
dd1d2b7c92
commit
43217657d7
3 changed files with 14 additions and 11 deletions
|
@ -25,10 +25,19 @@ class ShareManager {
|
|||
* @param {import('../objects/PlaybackSession')} playbackSession
|
||||
*/
|
||||
addOpenSharePlaybackSession(playbackSession) {
|
||||
Logger.info(`[ShareManager] Adding new open share playback session ${playbackSession.shareSessionId}`)
|
||||
Logger.info(`[ShareManager] Adding new open share playback session "${playbackSession.displayTitle}"`)
|
||||
this.openSharePlaybackSessions.push(playbackSession)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('../objects/PlaybackSession')} playbackSession
|
||||
*/
|
||||
closeSharePlaybackSession(playbackSession) {
|
||||
Logger.info(`[ShareManager] Closing share playback session "${playbackSession.displayTitle}"`)
|
||||
this.openSharePlaybackSessions = this.openSharePlaybackSessions.filter((s) => s.id !== playbackSession.id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an open media item share by media item ID
|
||||
* @param {string} mediaItemId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue