|
1 |
| -using ClassTranscribeDatabase; |
2 |
| -using ClassTranscribeDatabase.Models; |
3 |
| -using ClassTranscribeDatabase.Services;using Microsoft.Extensions.Logging; |
4 |
| -using Newtonsoft.Json.Linq; |
5 |
| -using System.Collections.Generic; |
| 1 | +using System.Collections.Generic; |
6 | 2 | using System.Diagnostics.CodeAnalysis;
|
7 | 3 | using System;
|
8 | 4 | using System.Linq;
|
9 | 5 | using System.Threading.Tasks;
|
| 6 | +using Microsoft.Extensions.Logging; |
| 7 | +using Microsoft.EntityFrameworkCore; |
| 8 | +using Newtonsoft.Json.Linq; |
| 9 | +using ClassTranscribeDatabase; |
| 10 | +using ClassTranscribeDatabase.Models; |
| 11 | +using ClassTranscribeDatabase.Services; |
10 | 12 | using static ClassTranscribeDatabase.CommonUtils;
|
11 | 13 |
|
12 | 14 |
|
@@ -35,13 +37,14 @@ protected async override Task OnConsume(string videoId, TaskParameters taskParam
|
35 | 37 |
|
36 | 38 | using var _context = CTDbContext.CreateDbContext();
|
37 | 39 | Video video = await _context.Videos.FindAsync(videoId);
|
38 |
| - |
| 40 | + |
39 | 41 | if (!video.HasSceneObjectData())
|
40 | 42 | {
|
41 | 43 | GetLogger().LogInformation($"Describe Video {videoId}: Early return - no scene data to process");
|
42 | 44 | return;
|
43 | 45 | }
|
44 | 46 | TextData td = await _context.TextData.FindAsync(video.SceneObjectDataId);
|
| 47 | + await _context.Transcriptions.Where(t => t.VideoId == videoId).LoadAsync(); |
45 | 48 |
|
46 | 49 | JObject sceneData = td.GetAsJSON() as JObject;
|
47 | 50 | JArray scenes = sceneData["Scenes"] as JArray;
|
|
0 commit comments