Working search

This commit is contained in:
Fishandchips321 2026-02-22 21:58:23 +00:00
parent 271cf1f407
commit 2a572e8bc4
15 changed files with 217 additions and 39 deletions

View file

@ -25,6 +25,24 @@ public class ClientService : IClientService
return _clients;
}
public async Task<JellyfinApiClient> GetClientForServerId(string serverId)
{
if (!_clients.Any())
{
await LoadClients();
}
foreach (var client in _clients)
{
if (client.ID == serverId)
{
return client;
}
}
throw new Exception($"Client with ID {serverId} not found");
}
private async Task LoadClients()
{
var servers = await _repository.GetServers();