@@ -245,28 +233,6 @@ class ArtistEditorFooter extends Component {
);
}
- if (name === 'albumFolder') {
- return (
-
- );
- }
-
if (name === 'path') {
return (
{
- // Mock handler to satisfy `onChange` being required for `CheckInput`.
- //
- }
-
//
// Render
@@ -33,7 +23,6 @@ class ArtistEditorRow extends Component {
monitored,
metadataProfile,
qualityProfile,
- albumFolder,
path,
statistics,
tags,
@@ -80,7 +69,6 @@ class ArtistEditorRow extends Component {
return (
-
-
- );
- }
-
if (name === 'path') {
return (
@@ -165,7 +137,6 @@ ArtistEditorRow.propTypes = {
monitored: PropTypes.bool.isRequired,
metadataProfile: PropTypes.object.isRequired,
qualityProfile: PropTypes.object.isRequired,
- albumFolder: PropTypes.bool.isRequired,
path: PropTypes.string.isRequired,
statistics: PropTypes.object.isRequired,
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
diff --git a/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js b/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js
index dde5cfd25..699a47244 100644
--- a/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js
+++ b/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js
@@ -87,7 +87,6 @@ class AddNewAlbumModalContentConnector extends Component {
monitor,
qualityProfileId,
metadataProfileId,
- albumFolder,
tags
} = this.props;
@@ -97,7 +96,6 @@ class AddNewAlbumModalContentConnector extends Component {
monitor: monitor.value,
qualityProfileId: qualityProfileId.value,
metadataProfileId: metadataProfileId.value,
- albumFolder: albumFolder.value,
tags: tags.value,
searchForNewAlbum
});
@@ -125,7 +123,6 @@ AddNewAlbumModalContentConnector.propTypes = {
qualityProfileId: PropTypes.object,
metadataProfileId: PropTypes.object,
noneMetadataProfileId: PropTypes.number.isRequired,
- albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onModalClose: PropTypes.func.isRequired,
setAddDefault: PropTypes.func.isRequired,
diff --git a/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js b/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js
index 7b6083bcb..bd188f8e9 100644
--- a/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js
+++ b/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js
@@ -59,7 +59,6 @@ class AddNewArtistModalContentConnector extends Component {
monitor,
qualityProfileId,
metadataProfileId,
- albumFolder,
tags
} = this.props;
@@ -69,7 +68,6 @@ class AddNewArtistModalContentConnector extends Component {
monitor: monitor.value,
qualityProfileId: qualityProfileId.value,
metadataProfileId: metadataProfileId.value,
- albumFolder: albumFolder.value,
tags: tags.value,
searchForMissingAlbums
});
@@ -95,7 +93,6 @@ AddNewArtistModalContentConnector.propTypes = {
monitor: PropTypes.object.isRequired,
qualityProfileId: PropTypes.object,
metadataProfileId: PropTypes.object,
- albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onModalClose: PropTypes.func.isRequired,
setAddDefault: PropTypes.func.isRequired,
diff --git a/frontend/src/Search/Common/AddArtistOptionsForm.js b/frontend/src/Search/Common/AddArtistOptionsForm.js
index 82bcdce84..304e35fca 100644
--- a/frontend/src/Search/Common/AddArtistOptionsForm.js
+++ b/frontend/src/Search/Common/AddArtistOptionsForm.js
@@ -35,7 +35,6 @@ class AddArtistOptionsForm extends Component {
metadataProfileId,
includeNoneMetadataProfile,
showMetadataProfile,
- albumFolder,
tags,
onInputChange,
...otherProps
@@ -119,17 +118,6 @@ class AddArtistOptionsForm extends Component {
/>
-
- Album Folder
-
-
-
-
Tags
@@ -152,7 +140,6 @@ AddArtistOptionsForm.propTypes = {
metadataProfileId: PropTypes.object,
showMetadataProfile: PropTypes.bool.isRequired,
includeNoneMetadataProfile: PropTypes.bool.isRequired,
- albumFolder: PropTypes.object.isRequired,
tags: PropTypes.object.isRequired,
onInputChange: PropTypes.func.isRequired
};
diff --git a/frontend/src/Settings/MediaManagement/Naming/Naming.js b/frontend/src/Settings/MediaManagement/Naming/Naming.js
index 71850aa2d..b66451e7d 100644
--- a/frontend/src/Settings/MediaManagement/Naming/Naming.js
+++ b/frontend/src/Settings/MediaManagement/Naming/Naming.js
@@ -61,16 +61,6 @@ class Naming extends Component {
});
}
- onAlbumFolderNamingModalOpenClick = () => {
- this.setState({
- isNamingModalOpen: true,
- namingModalOptions: {
- name: 'albumFolderFormat',
- album: true
- }
- });
- }
-
onNamingModalClose = () => {
this.setState({ isNamingModalOpen: false });
}
@@ -103,8 +93,6 @@ class Naming extends Component {
const multiDiscTrackFormatErrors = [];
const artistFolderFormatHelpTexts = [];
const artistFolderFormatErrors = [];
- const albumFolderFormatHelpTexts = [];
- const albumFolderFormatErrors = [];
if (examplesPopulated) {
if (examples.singleTrackExample) {
@@ -124,12 +112,6 @@ class Naming extends Component {
} else {
artistFolderFormatErrors.push({ message: 'Invalid Format' });
}
-
- if (examples.albumFolderExample) {
- albumFolderFormatHelpTexts.push(`Example: ${examples.albumFolderExample}`);
- } else {
- albumFolderFormatErrors.push({ message: 'Invalid Format' });
- }
}
return (
@@ -225,21 +207,6 @@ class Naming extends Component {
/>
-
- Album Folder Format
-
- ?}
- onChange={onInputChange}
- {...settings.albumFolderFormat}
- helpTexts={albumFolderFormatHelpTexts}
- errors={[...albumFolderFormatErrors, ...settings.albumFolderFormat.errors]}
- />
-
-
{
namingModalOptions &&
c.StandardTrackFormat).ValidTrackFormat();
SharedValidator.RuleFor(c => c.MultiDiscTrackFormat).ValidTrackFormat();
SharedValidator.RuleFor(c => c.ArtistFolderFormat).ValidArtistFolderFormat();
- SharedValidator.RuleFor(c => c.AlbumFolderFormat).ValidAlbumFolderFormat();
}
private void UpdateNamingConfig(NamingConfigResource resource)
@@ -96,10 +95,6 @@ namespace Lidarr.Api.V1.Config
? null
: _filenameSampleService.GetArtistFolderSample(nameSpec);
- sampleResource.AlbumFolderExample = nameSpec.AlbumFolderFormat.IsNullOrWhiteSpace()
- ? null
- : _filenameSampleService.GetAlbumFolderSample(nameSpec);
-
return sampleResource;
}
diff --git a/src/Lidarr.Api.V1/Config/NamingConfigResource.cs b/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
index ee39b9040..ed00d6b78 100644
--- a/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
+++ b/src/Lidarr.Api.V1/Config/NamingConfigResource.cs
@@ -9,7 +9,6 @@ namespace Lidarr.Api.V1.Config
public string StandardTrackFormat { get; set; }
public string MultiDiscTrackFormat { get; set; }
public string ArtistFolderFormat { get; set; }
- public string AlbumFolderFormat { get; set; }
public bool IncludeArtistName { get; set; }
public bool IncludeAlbumTitle { get; set; }
public bool IncludeQuality { get; set; }
diff --git a/src/Lidarr.Api.V1/Config/NamingExampleResource.cs b/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
index 7a12db6ea..ad587b431 100644
--- a/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
+++ b/src/Lidarr.Api.V1/Config/NamingExampleResource.cs
@@ -22,8 +22,7 @@ namespace Lidarr.Api.V1.Config
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
StandardTrackFormat = model.StandardTrackFormat,
MultiDiscTrackFormat = model.MultiDiscTrackFormat,
- ArtistFolderFormat = model.ArtistFolderFormat,
- AlbumFolderFormat = model.AlbumFolderFormat
+ ArtistFolderFormat = model.ArtistFolderFormat
};
}
@@ -48,8 +47,7 @@ namespace Lidarr.Api.V1.Config
StandardTrackFormat = resource.StandardTrackFormat,
MultiDiscTrackFormat = resource.MultiDiscTrackFormat,
- ArtistFolderFormat = resource.ArtistFolderFormat,
- AlbumFolderFormat = resource.AlbumFolderFormat
+ ArtistFolderFormat = resource.ArtistFolderFormat
};
}
}
diff --git a/src/NzbDrone.Core.Test/MediaFiles/TrackFileMovingServiceTests/MoveTrackFileFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/TrackFileMovingServiceTests/MoveTrackFileFixture.cs
index 4136c498f..e2b18e5cc 100644
--- a/src/NzbDrone.Core.Test/MediaFiles/TrackFileMovingServiceTests/MoveTrackFileFixture.cs
+++ b/src/NzbDrone.Core.Test/MediaFiles/TrackFileMovingServiceTests/MoveTrackFileFixture.cs
@@ -44,16 +44,12 @@ namespace NzbDrone.Core.Test.MediaFiles.TrackFileMovingServiceTests
Mocker.GetMock()
.Setup(s => s.BuildTrackFileName(It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), null, null))
- .Returns("File Name");
+ .Returns("Album\\File Name");
Mocker.GetMock()
- .Setup(s => s.BuildTrackFilePath(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny()))
+ .Setup(s => s.BuildTrackFilePath(It.IsAny(), It.IsAny(), It.IsAny()))
.Returns(@"C:\Test\Music\Artist\Album\File Name.mp3".AsOsAgnostic());
- Mocker.GetMock()
- .Setup(s => s.BuildAlbumPath(It.IsAny(), It.IsAny()))
- .Returns(@"C:\Test\Music\Artist\Album".AsOsAgnostic());
-
var rootFolder = @"C:\Test\Music\".AsOsAgnostic();
Mocker.GetMock()
.Setup(s => s.FolderExists(rootFolder))
diff --git a/src/NzbDrone.Core.Test/OrganizerTests/BuildFilePathFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/BuildFilePathFixture.cs
index f76c1c262..2d3abed95 100644
--- a/src/NzbDrone.Core.Test/OrganizerTests/BuildFilePathFixture.cs
+++ b/src/NzbDrone.Core.Test/OrganizerTests/BuildFilePathFixture.cs
@@ -24,24 +24,17 @@ namespace NzbDrone.Core.Test.OrganizerTests
}
[Test]
- public void should_clean_album_folder_when_it_contains_illegal_characters_in_album_or_artist_title()
+ public void should_clean_artist_folder_when_it_contains_illegal_characters_in_album_or_artist_title()
{
var filename = @"02 - Track Title";
- var expectedPath = @"C:\Test\Fake- The Artist\Fake- The Artist Fake- Album\02 - Track Title.flac";
+ var expectedPath = @"C:\Test\Fake- The Artist\02 - Track Title.flac";
var fakeArtist = Builder.CreateNew()
.With(s => s.Name = "Fake: The Artist")
.With(s => s.Path = @"C:\Test\Fake- The Artist".AsOsAgnostic())
- .With(s => s.AlbumFolder = true)
.Build();
- var fakeAlbum = Builder.CreateNew()
- .With(s => s.Title = "Fake: Album")
- .Build();
-
- _namingConfig.AlbumFolderFormat = "{Artist Name} {Album Title}";
-
- Subject.BuildTrackFilePath(fakeArtist, fakeAlbum, filename, ".flac").Should().Be(expectedPath.AsOsAgnostic());
+ Subject.BuildTrackFilePath(fakeArtist, filename, ".flac").Should().Be(expectedPath.AsOsAgnostic());
}
}
}
diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/NestedFileNameBuilderFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/NestedFileNameBuilderFixture.cs
new file mode 100644
index 000000000..da077e41f
--- /dev/null
+++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/NestedFileNameBuilderFixture.cs
@@ -0,0 +1,134 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using FizzWare.NBuilder;
+using FluentAssertions;
+using NUnit.Framework;
+using NzbDrone.Core.MediaFiles;
+using NzbDrone.Core.Music;
+using NzbDrone.Core.Organizer;
+using NzbDrone.Core.Qualities;
+using NzbDrone.Core.Test.Framework;
+using NzbDrone.Test.Common;
+
+namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
+{
+ public class NestedFileNameBuilderFixture : CoreTest
+ {
+ private Artist _artist;
+ private Album _album;
+ private Medium _medium;
+ private Medium _medium2;
+ private AlbumRelease _release;
+ private Track _track1;
+ private TrackFile _trackFile;
+ private NamingConfig _namingConfig;
+
+ [SetUp]
+ public void Setup()
+ {
+ _artist = Builder
+ .CreateNew()
+ .With(s => s.Name = "Linkin Park")
+ .With(s => s.Metadata = new ArtistMetadata
+ {
+ Disambiguation = "US Rock Band",
+ Name = "Linkin Park"
+ })
+ .Build();
+
+ _medium = Builder
+ .CreateNew()
+ .With(m => m.Number = 3)
+ .Build();
+
+ _medium2 = Builder
+ .CreateNew()
+ .With(m => m.Number = 4)
+ .Build();
+
+ _release = Builder
+ .CreateNew()
+ .With(s => s.Media = new List { _medium })
+ .With(s => s.Monitored = true)
+ .Build();
+
+ _album = Builder
+ .CreateNew()
+ .With(s => s.Title = "Hybrid Theory")
+ .With(s => s.ReleaseDate = new DateTime(2020, 1, 15))
+ .With(s => s.AlbumType = "Album")
+ .With(s => s.Disambiguation = "The Best Album")
+ .Build();
+
+ _namingConfig = NamingConfig.Default;
+ _namingConfig.RenameTracks = true;
+
+ Mocker.GetMock()
+ .Setup(c => c.GetConfig()).Returns(_namingConfig);
+
+ _track1 = Builder