private static async Task <ILibraryIdentifier> GetLibraryIdentifierAsync(IEmbyService embyService, ISpinWheelService spinWheelService, string libraryName) { var cts = new CancellationTokenSource(); try { await spinWheelService.StartSpinWheelAsync(cts.Token); return(await embyService.GetLibraryIdentifierAsync(libraryName)); } finally { spinWheelService.StopSpinWheel(cts); cts.Dispose(); } }
private static async Task <IReadOnlyCollection <IMovieIdentifier> > GetMovieIdentifiersAsync(IEmbyService embyService, ISpinWheelService spinWheelService, ILibraryIdentifier libraryIdentifier) { var cts = new CancellationTokenSource(); try { await spinWheelService.StartSpinWheelAsync(cts.Token); return(await embyService.GetMovieIdentifiersAsync(libraryIdentifier)); } finally { spinWheelService.StopSpinWheel(cts); cts.Dispose(); } }
public EmbyController(IEmbyService embyService, ILogger <EmbyController> logger) { _logger = logger; _embyService = embyService; }