Esempio n. 1
0
 public VideoIndexerUploaderController(ILogger <VideoIndexerUploaderController> logger,
                                       AzureBingSearchService azureBingSearchService, AzureVideoIndexerService azureVideoIndexerService)
 {
     this.Logger = logger;
     this.AzureBingSearchService   = azureBingSearchService;
     this.AzureVideoIndexerService = azureVideoIndexerService;
 }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 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;
 }