diff --git a/frontend/src/Settings/MediaManagement/Naming/Naming.js b/frontend/src/Settings/MediaManagement/Naming/Naming.js
index 8879a8b47..11d48366b 100644
--- a/frontend/src/Settings/MediaManagement/Naming/Naming.js
+++ b/frontend/src/Settings/MediaManagement/Naming/Naming.js
@@ -87,6 +87,15 @@ class Naming extends Component {
} = this.state;
const renameTracks = hasSettings && settings.renameTracks.value;
+ const replaceIllegalCharacters = hasSettings && settings.replaceIllegalCharacters.value;
+
+ const colonReplacementOptions = [
+ { key: 0, value: translate('Delete') },
+ { key: 1, value: translate('ReplaceWithDash') },
+ { key: 2, value: translate('ReplaceWithSpaceDash') },
+ { key: 3, value: translate('ReplaceWithSpaceDashSpace') },
+ { key: 4, value: translate('SmartReplace'), hint: translate('DashOrSpaceDashDependingOnName') }
+ ];
const standardTrackFormatHelpTexts = [];
const standardTrackFormatErrors = [];
@@ -160,6 +169,24 @@ class Naming extends Component {
/>
+ {
+ replaceIllegalCharacters ?
+
+
+ {translate('ColonReplacement')}
+
+
+
+ :
+ null
+ }
+
{
renameTracks &&
diff --git a/src/Lidarr.Api.V1/Config/NamingConfigResource.cs b/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
index ed00d6b78..1c1f7ba2f 100644
--- a/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
+++ b/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
@@ -6,6 +6,7 @@ namespace Lidarr.Api.V1.Config
{
public bool RenameTracks { get; set; }
public bool ReplaceIllegalCharacters { get; set; }
+ public int ColonReplacementFormat { get; set; }
public string StandardTrackFormat { get; set; }
public string MultiDiscTrackFormat { get; set; }
public string ArtistFolderFormat { get; set; }
diff --git a/src/Lidarr.Api.V1/Config/NamingExampleResource.cs b/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
index ad587b431..19319d5e2 100644
--- a/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
+++ b/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
@@ -20,6 +20,7 @@ namespace Lidarr.Api.V1.Config
RenameTracks = model.RenameTracks,
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
+ ColonReplacementFormat = (int)model.ColonReplacementFormat,
StandardTrackFormat = model.StandardTrackFormat,
MultiDiscTrackFormat = model.MultiDiscTrackFormat,
ArtistFolderFormat = model.ArtistFolderFormat
@@ -44,6 +45,7 @@ namespace Lidarr.Api.V1.Config
RenameTracks = resource.RenameTracks,
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
+ ColonReplacementFormat = (ColonReplacementFormat)resource.ColonReplacementFormat,
StandardTrackFormat = resource.StandardTrackFormat,
MultiDiscTrackFormat = resource.MultiDiscTrackFormat,
diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ColonReplacementFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ColonReplacementFixture.cs
new file mode 100644
index 000000000..b214b395d
--- /dev/null
+++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ColonReplacementFixture.cs
@@ -0,0 +1,105 @@
+using System.Collections.Generic;
+using System.Linq;
+using FizzWare.NBuilder;
+using FluentAssertions;
+using NUnit.Framework;
+using NzbDrone.Core.CustomFormats;
+using NzbDrone.Core.MediaFiles;
+using NzbDrone.Core.Music;
+using NzbDrone.Core.Organizer;
+using NzbDrone.Core.Qualities;
+using NzbDrone.Core.Test.Framework;
+
+namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
+{
+ [TestFixture]
+ public class ColonReplacementFixture : CoreTest
+ {
+ private Artist _artist;
+ private Album _album;
+ private AlbumRelease _release;
+ private Track _track;
+ private TrackFile _trackFile;
+ private NamingConfig _namingConfig;
+
+ [SetUp]
+ public void Setup()
+ {
+ _artist = Builder
+ .CreateNew()
+ .With(s => s.Name = "Nu:Tone")
+ .Build();
+
+ _album = Builder
+ .CreateNew()
+ .With(s => s.Title = "Medical History")
+ .Build();
+
+ _release = Builder
+ .CreateNew()
+ .With(s => s.Media = new List { new () { Number = 14 } })
+ .Build();
+
+ _track = Builder