|
|
@ -64,7 +64,7 @@ bool plSrtFileReader::ReadFile() |
|
|
|
|
|
|
|
|
|
|
|
// if file exists and was opened successfully
|
|
|
|
// if file exists and was opened successfully
|
|
|
|
if (srtFileStream.Open(path, L"r")) { |
|
|
|
if (srtFileStream.Open(path, L"r")) { |
|
|
|
plStatusLog::AddLineS("audio.log", "Successfully opened subtitle file {}", path); |
|
|
|
plStatusLog::AddLineS("audio.log", "Successfully opened subtitle file %S", path); |
|
|
|
|
|
|
|
|
|
|
|
uint32_t subtitleNumber = 0; |
|
|
|
uint32_t subtitleNumber = 0; |
|
|
|
uint32_t subtitleStartTimeMs = 0; |
|
|
|
uint32_t subtitleStartTimeMs = 0; |
|
|
@ -81,7 +81,7 @@ bool plSrtFileReader::ReadFile() |
|
|
|
if (std::regex_match(line, matches, timingsRegex)) { |
|
|
|
if (std::regex_match(line, matches, timingsRegex)) { |
|
|
|
if (matches.size() < 9) { |
|
|
|
if (matches.size() < 9) { |
|
|
|
// add error message and ensure this subtitle line won't be added to the entries
|
|
|
|
// add error message and ensure this subtitle line won't be added to the entries
|
|
|
|
plStatusLog::AddLineS("audio.log", plStatusLog::kRed, " Subtitle timings '{}' are formatted incorrectly.", line); |
|
|
|
plStatusLog::AddLineS("audio.log", plStatusLog::kRed, " Subtitle timings '%s' are formatted incorrectly.", line); |
|
|
|
subtitleNumber = 0; |
|
|
|
subtitleNumber = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|