Clean out old unused objects

This commit is contained in:
advplyr 2024-09-03 17:04:58 -05:00
parent 24923c0009
commit 0344a63b48
29 changed files with 180 additions and 1540 deletions

View file

@ -4,7 +4,6 @@ const serverVersion = require('../../package.json').version
const BookMetadata = require('./metadata/BookMetadata')
const PodcastMetadata = require('./metadata/PodcastMetadata')
const DeviceInfo = require('./DeviceInfo')
const VideoMetadata = require('./metadata/VideoMetadata')
class PlaybackSession {
constructor(session) {
@ -41,7 +40,6 @@ class PlaybackSession {
// Not saved in DB
this.lastSave = 0
this.audioTracks = []
this.videoTrack = null
this.stream = null
// Used for share sessions
this.shareSessionId = null
@ -114,7 +112,6 @@ class PlaybackSession {
startedAt: this.startedAt,
updatedAt: this.updatedAt,
audioTracks: this.audioTracks.map((at) => at.toJSON?.() || { ...at }),
videoTrack: this.videoTrack?.toJSON() || null,
libraryItem: libraryItem?.toJSONExpanded() || null
}
}
@ -157,8 +154,6 @@ class PlaybackSession {
this.mediaMetadata = new BookMetadata(session.mediaMetadata)
} else if (this.mediaType === 'podcast') {
this.mediaMetadata = new PodcastMetadata(session.mediaMetadata)
} else if (this.mediaType === 'video') {
this.mediaMetadata = new VideoMetadata(session.mediaMetadata)
}
}
this.displayTitle = session.displayTitle || ''