public VideoIndexerUploaderController(ILogger <VideoIndexerUploaderController> logger, AzureBingSearchService azureBingSearchService, AzureVideoIndexerService azureVideoIndexerService) { this.Logger = logger; this.AzureBingSearchService = azureBingSearchService; this.AzureVideoIndexerService = azureVideoIndexerService; }
public async Task <IQueryable <VideoInfo> > SearchVideosByPersonNameAsync(string personName, CancellationToken cancellationtoken) { var searchVideoResults = await AzureVideoIndexerService.SearchVideosAsync(personName, new SearchScope[] { SearchScope.NamedPeople }, cancellationToken : cancellationtoken); var videoIds = searchVideoResults.results.Select(searchVideo => searchVideo.id); return(this.FairplaytubeDatabaseContext .VideoInfo .Join(videoIds, video => video.VideoId, search => search, (video, _) => video)); }
public VideoService(AzureVideoIndexerService azureVideoIndexerService, AzureBlobStorageService azureBlobStorageService, DataStorageConfiguration dataStorageConfiguration, ICurrentUserProvider currentUserProvider, FairplaytubeDatabaseContext fairplaytubeDatabaseContext, AzureVideoIndexerConfiguration azureVideoIndexerConfiguration, CustomHttpClient customHttpClient, IHubContext <NotificationHub, INotificationHub> hubContext, EmailService emailService, IConfiguration configuration) { this.AzureVideoIndexerService = azureVideoIndexerService; this.AzureBlobStorageService = azureBlobStorageService; this.DataStorageConfiguration = dataStorageConfiguration; this.CurrentUserProvider = currentUserProvider; this.FairplaytubeDatabaseContext = fairplaytubeDatabaseContext; this.AzureVideoIndexerConfiguration = azureVideoIndexerConfiguration; this.CustomHttpClient = customHttpClient; this.HubContext = hubContext; this.EmailService = emailService; this.Configuration = configuration; }