Files
ersatztv/ErsatzTV/Pages/JellyfinMediaSources.razor
T
Jason DoveandGitHub 9fbe950e6e support multiple local libraries (#317)
* allow multiple local libraries

* add "move library path" function
2021-07-20 07:47:12 -05:00

23 lines
895 B
Plaintext

@page "/media/sources/jellyfin"
@using ErsatzTV.Core.Interfaces.Jellyfin
@using ErsatzTV.Application.Jellyfin.Commands
@using ErsatzTV.Application.Jellyfin.Queries
@inject IJellyfinSecretStore _jellyfinSecretStore
@inject ChannelWriter<IJellyfinBackgroundServiceRequest> _channel
<RemoteMediaSources
TViewModel="ErsatzTV.Application.Jellyfin.JellyfinMediaSourceViewModel"
TSecrets="ErsatzTV.Core.Jellyfin.JellyfinSecrets"
TMediaSource="JellyfinMediaSource"
Name="Jellyfin"
GetAllMediaSourcesCommand="@(new GetAllJellyfinMediaSources())"
DisconnectCommand="@(new DisconnectJellyfin())"
RefreshLibrariesCommand="@(mediaSourceId => RefreshLibraries(mediaSourceId))"
SecretStore="@_jellyfinSecretStore"/>
@code {
private async Task RefreshLibraries(int mediaSourceId) =>
await _channel.WriteAsync(new SynchronizeJellyfinLibraries(mediaSourceId));
}