Fix on print of LabelDevice + redundant code changes

This commit is contained in:
Peter BALIVET 2025-06-23 11:34:04 +02:00
parent 7fb2acc500
commit a5f33a5502
3 changed files with 2 additions and 3 deletions

View File

@ -136,7 +136,7 @@ export default {
return this._session.deviceInfo || {}
},
hasDeviceInfo() {
return Object.keys(this.deviceInfo).length || this._session.ipAddress
return Object.keys(this.deviceInfo).length
},
osDisplayName() {
if (!this.deviceInfo.osName) return null

View File

@ -62,7 +62,6 @@ class PlaybackSessionManager {
if (existingDevice.update(deviceInfo)) {
await Database.deviceModel.updateFromOld(existingDevice)
}
existingDevice.ipAddress = ip
return existingDevice
}
}

View File

@ -226,7 +226,7 @@ class PlaybackSession {
this.mediaPlayer = mediaPlayer
this.deviceInfo = deviceInfo || new DeviceInfo()
this.ipAddress = this.deviceInfo.ipAddress
this.ipAddress = deviceInfo?.ipAddress || null
this.serverVersion = serverVersion
this.timeListening = 0