From 229327bf37841cd8732dd44effc541edce791976 Mon Sep 17 00:00:00 2001 From: Moss Date: Fri, 23 Dec 2022 00:38:09 -0500 Subject: [PATCH] Episode: Fixed Parsing Backslash in Name --- src/episode.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/episode.cpp b/src/episode.cpp index ab58677..5e8aa1b 100644 --- a/src/episode.cpp +++ b/src/episode.cpp @@ -102,7 +102,7 @@ namespace dropout_dl { char c = str[i]; // Skip these - if (c == '?' || c == ':') { + if (c == '?' || c == ':' || c == '\\') { continue; } // Replace these with dashes @@ -254,7 +254,12 @@ namespace dropout_dl { int j; - for (j = 0; meta_data[i + j] != '"' && i + j < meta_data.size(); j++); + for (j = 0; meta_data[i + j] != '"' && i + j < meta_data.size(); j++) { + // skip checking for quotes if prefaced by a forward slash + if (meta_data[i + j] == '\\') { + j++; + } + } return meta_data.substr(i, j); }