mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 20:46:43 +00:00
Compare commits
1 commit
1c66b3f21f
...
9eaaf6c1cc
Author | SHA1 | Date | |
---|---|---|---|
|
9eaaf6c1cc |
1 changed files with 1 additions and 4 deletions
|
@ -30,12 +30,9 @@ private MediaFormat ParseFormat(Format analysisFormat)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetValue(string tagName, Dictionary<string, string>? tags, string defaultValue) =>
|
|
||||||
tags == null ? defaultValue : tags.TryGetValue(tagName, out var value) ? value : defaultValue;
|
|
||||||
|
|
||||||
private ChapterData ParseChapter(Chapter analysisChapter)
|
private ChapterData ParseChapter(Chapter analysisChapter)
|
||||||
{
|
{
|
||||||
var title = GetValue("title", analysisChapter.Tags, "TitleValueNotSet");
|
var title = analysisChapter.Tags.FirstOrDefault(t => t.Key == "title").Value;
|
||||||
var start = MediaAnalysisUtils.ParseDuration(analysisChapter.StartTime);
|
var start = MediaAnalysisUtils.ParseDuration(analysisChapter.StartTime);
|
||||||
var end = MediaAnalysisUtils.ParseDuration(analysisChapter.EndTime);
|
var end = MediaAnalysisUtils.ParseDuration(analysisChapter.EndTime);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue