From d7a3f53f03bf94b63a2616ef63a5f89f572157ac Mon Sep 17 00:00:00 2001 From: Moss Date: Sun, 25 Dec 2022 00:40:41 -0500 Subject: [PATCH] Episode: Removed Backslashs from Episode Names --- src/episode.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/episode.cpp b/src/episode.cpp index f665e08..edd162d 100644 --- a/src/episode.cpp +++ b/src/episode.cpp @@ -90,9 +90,22 @@ namespace dropout_dl { return out; } + std::string remove_escaped_characters(const std::string& str) { + std::string out; + + for (int i = 0; i < str.size(); i++) { + if (str[i] == '\\') { + i++; + } + out += str[i]; + } + + return out; + } + std::string format_name_string(const std::string& str) { - return replace_html_character_codes(remove_leading_and_following_whitespace(str)); + return remove_escaped_characters(replace_html_character_codes(remove_leading_and_following_whitespace(str))); } std::string format_filename(const std::string& str) {