Fixed Episode CleanTitle token helper and keep # in title

pull/6/head
Mark McDowall 10 years ago
parent 71c735546e
commit 9fd90e6f99

@ -893,7 +893,7 @@ namespace NzbDrone.Core.Test.OrganizerTests
_namingConfig.StandardEpisodeFormat = "{Episode.CleanTitle}"; _namingConfig.StandardEpisodeFormat = "{Episode.CleanTitle}";
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile) Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
.Should().Be("Rule.23.Never.Lie.to.the.Kids"); .Should().Be("Rule.#23.Never.Lie.to.the.Kids");
} }
[Test] [Test]

@ -56,7 +56,7 @@ namespace NzbDrone.Core.Organizer
private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled); private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled);
private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]$", RegexOptions.Compiled); private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]$", RegexOptions.Compiled);
private static readonly Regex ScenifyRemoveChars = new Regex(@"[^a-z0-9+\/ ]", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex ScenifyRemoveChars = new Regex(@"[^a-z0-9+#\/ ]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ScenifyReplaceChars = new Regex(@"[+\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex ScenifyReplaceChars = new Regex(@"[+\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly char[] EpisodeTitleTrimCharacters = new[] { ' ', '.', '?' }; private static readonly char[] EpisodeTitleTrimCharacters = new[] { ' ', '.', '?' };

@ -60,6 +60,8 @@
.download-report-cell { .download-report-cell {
.clickable(); .clickable();
width : 32px;
i { i {
.clickable(); .clickable();
} }

@ -4,8 +4,8 @@
<li><a href="#" data-token="Episode Title">Episode Title</a></li> <li><a href="#" data-token="Episode Title">Episode Title</a></li>
<li><a href="#" data-token="Episode.Title">Episode.Title</a></li> <li><a href="#" data-token="Episode.Title">Episode.Title</a></li>
<li><a href="#" data-token="Episode_Title">Episode_Title</a></li> <li><a href="#" data-token="Episode_Title">Episode_Title</a></li>
<li><a href="#" data-token="Episode Title">Episode CleanTitle</a></li> <li><a href="#" data-token="Episode CleanTitle">Episode CleanTitle</a></li>
<li><a href="#" data-token="Episode.Title">Episode.CleanTitle</a></li> <li><a href="#" data-token="Episode.CleanTitle">Episode.CleanTitle</a></li>
<li><a href="#" data-token="Episode_Title">Episode_CleanTitle</a></li> <li><a href="#" data-token="Episode_CleanTitle">Episode_CleanTitle</a></li>
</ul> </ul>
</li> </li>

Loading…
Cancel
Save