DiscoveryService

class DiscoveryService(jellyfin: Jellyfin)

Service for discovery related functionality.

Constructors

Link copied to clipboard
constructor(jellyfin: Jellyfin)

Functions

Link copied to clipboard
fun discoverLocalServers(timeout: Int = LocalServerDiscovery.DISCOVERY_TIMEOUT, maxServers: Int = LocalServerDiscovery.DISCOVERY_MAX_SERVERS): Flow<<Error class: unknown class>>

Discover servers on the local network.

Link copied to clipboard

Parses the given input and tries to fix common mistakes. The returned candidates are in order of most secure followed by most likely to work.

Link copied to clipboard
suspend fun getRecommendedServers(input: String, minimumScore: RecommendedServerInfoScore = RecommendedServerInfoScore.BAD): Collection<RecommendedServerInfo>

Utility function that calls getRecommendedServers with the output of getAddressCandidates.

suspend fun getRecommendedServers(servers: Collection<String>, minimumScore: RecommendedServerInfoScore = RecommendedServerInfoScore.BAD): Collection<RecommendedServerInfo>

Connects to the servers and returns a flow of scored servers in the same order as the input. Uses the RecommendedServerDiscovery rules to determine the recommendation.