Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
 public EmbyController(IEmbyService embyService, ILogger <EmbyController> logger)
 {
     _logger      = logger;
     _embyService = embyService;
 }