MediaServer.kt
20 lines · 695 bytes
Changed in: 0.5.0
| 1 | package dev.stave.domain.model |
| 2 | |
| 3 | /** |
| 4 | * A UPnP/DLNA MediaServer discovered on the LAN that advertises a ContentDirectory service. |
| 5 | * We key by [udn] (Unique Device Name) since that's stable across IP changes. |
| 6 | */ |
| 7 | data class MediaServer( |
| 8 | val udn: String, |
| 9 | val friendlyName: String, |
| 10 | val manufacturer: String?, |
| 11 | val modelName: String?, |
| 12 | val modelDescription: String?, |
| 13 | val baseUrl: String, |
| 14 | val iconUrl: String? = null, |
| 15 | ) { |
| 16 | /** Best-effort label for known classical-friendly servers. */ |
| 17 | val isMinimServer: Boolean |
| 18 | get() = modelName?.contains("MinimServer", ignoreCase = true) == true || |
| 19 | manufacturer?.contains("minim", ignoreCase = true) == true |
| 20 | } |


