Add IP Address to listening session to provide a more accurate history of the network location for each playback.

This commit is contained in:
Peter BALIVET 2025-06-23 10:38:43 +02:00
parent 108b2a60f5
commit 7fb2acc500
5 changed files with 81 additions and 2 deletions

View file

@ -62,6 +62,7 @@ class PlaybackSessionManager {
if (existingDevice.update(deviceInfo)) {
await Database.deviceModel.updateFromOld(existingDevice)
}
existingDevice.ipAddress = ip
return existingDevice
}
}
@ -181,6 +182,7 @@ class PlaybackSessionManager {
// New session from local
session = new PlaybackSession(sessionJson)
session.deviceInfo = deviceInfo
session.ipAddress = deviceInfo.ipAddress
if (session.mediaMetadata == null) {
session.mediaMetadata = {}