Skip to content

Commit

Permalink
🐛 remove quotes from tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rsking committed Nov 15, 2023
1 parent 7c74682 commit 8020651
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions EBook.Downloader.Common/CalibreLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ private static IEnumerable<string> SanitiseTags(IEnumerable<string> tags)
.Select(tag => tag.Trim())
.Select(CaseCorrectly)
.Select(ReplaceCommas)
.Select(RemoveQuotes)
.Distinct(StringComparer.Ordinal);

static IEnumerable<string> SplitByDashes(string value)
Expand All @@ -524,6 +525,11 @@ static string ReplaceCommas(string tag)
return tag.Replace(',', '‚');
}

static string RemoveQuotes(string tag)
{
return tag.Replace("\"", string.Empty);
}

static string CaseCorrectly(string value)
{
var (name, character) = Split(value);
Expand Down

0 comments on commit 8020651

Please sign in to comment.