Skip to content

Commit 7a61643

Browse files
committed
remove extraneous logging
1 parent 7405ccb commit 7a61643

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

ClassTranscribeServer/Controllers/EPubsController.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public class EPubSceneData
4646
public List<EPubSceneData> GetSceneData(JArray scenes, List<Caption> captions, List<Caption> descriptions)
4747
{
4848
var sorted_descriptions = descriptions.OrderBy(c => c.Begin);
49-
// _logger.LogInformation($"GetSceneData(), {string.Join(", ", sorted_descriptions.Select(d => d.Text))}");
5049
var chapters = new List<EPubSceneData>();
5150
var nextStart = new TimeSpan(0);
5251

@@ -105,18 +104,14 @@ TimeSpan GetSceneTimestamp(JToken scene)
105104
[Authorize]
106105
public async Task<ActionResult<List<EPubSceneData>>> GetEpubData(string mediaId, string language)
107106
{
108-
_logger.LogInformation($"GetEpubData({mediaId},{language}) starting");
109107
var media = _context.Medias.Find(mediaId);
110108
Video video = await _context.Videos.FindAsync(media.VideoId);
111-
// _logger.LogInformation($"GetEpubData({mediaId},{language}) video found. SceneData:{video.SceneObjectDataId}.");
112109

113110
if (!video.HasSceneObjectData())
114111
{
115-
_logger.LogInformation($"GetEpubData({mediaId}) - Early return - no SceneObjectData");
116112
return NotFound();
117113
}
118114
TextData data = await _context.TextData.FindAsync(video.SceneObjectDataId);
119-
// _logger.LogInformation($"GetEpubData({mediaId},{language}) getting scenedata as JArray");
120115
JArray sceneArray = data.GetAsJSON()["Scenes"] as JArray;
121116

122117
EPub epub = new EPub
@@ -132,13 +127,11 @@ public async Task<ActionResult<List<EPubSceneData>>> GetEpubData(string mediaId,
132127
{
133128
const string LEGACYSOURCEINTERNALREF = "ClassTranscribe/Azure"; // We should only ask for captions from this
134129
// source if the other has no entries
135-
captions = await _captionQueries.GetCaptionsAsync(media.VideoId, SOURCEINTERNALREF, epub.Language);
130+
captions = await _captionQueries.GetCaptionsAsync(media.VideoId, LEGACYSOURCEINTERNALREF, epub.Language);
136131
}
137132
var descriptions = await _captionQueries.GetDescriptionsAsync(media.VideoId, epub.Language);
138-
// _logger.LogInformation($"GetEpubData({mediaId}) - returning combined SceneData");
139133

140134
var sd = GetSceneData(sceneArray, captions, descriptions);
141-
// _logger.LogInformation($"GetEpubData returned scenes: ({string.Join("|", sd.Select(s => s.Text))})");
142135
return sd;
143136

144137
}
@@ -181,7 +174,6 @@ public async Task<ActionResult<EPub>> GetEPub(string id)
181174
{
182175
return NotFound();
183176
}
184-
_logger.LogInformation($"!GetEpub, epub string {string.Join("||", ePub.Chapters)}");
185177

186178
return ePub;
187179
}
@@ -263,7 +255,6 @@ public async Task<IActionResult> PutEPub(string id, EPub ePub)
263255
{
264256
return BadRequest("The following fields may not be empty: title, filename, language, author, publisher, sourceId");
265257
}
266-
_logger.LogInformation($"!PutEpub, epub string {string.Join("||", ePub.Chapters)}");
267258

268259
_context.Entry(ePub).State = EntityState.Modified;
269260

@@ -307,8 +298,6 @@ public async Task<ActionResult<EPub>> PostEPub(EPub ePub)
307298
return BadRequest("The following fields may not be empty: title, filename, language, author, publisher, sourceId");
308299
}
309300

310-
_logger.LogInformation($"!PostEpub, epub string {string.Join("||", ePub.Chapters)}");
311-
312301
_context.EPubs.Add(ePub);
313302
await _context.SaveChangesAsync();
314303

0 commit comments

Comments
 (0)