diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js index 7b76170eb..0008ab534 100644 --- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js +++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js @@ -30,11 +30,11 @@ const caseOptions = [ const fileNameTokens = [ { token: '{Author Name} - {Book Title} - {Quality Full}', - example: 'Author Name - Book Title - MP3-320 Proper' + example: 'Author Name - Book Title - MP3 Proper' }, { token: '{Author.Name}.{Book.Title}.{Quality.Full}', - example: 'Author.Name.Book.Title.MP3-320' + example: 'Author.Name.Book.Title.MP3' } ]; @@ -62,26 +62,17 @@ const bookTokens = [ { token: '{Book Disambiguation}', example: 'Disambiguation' } ]; -const mediumTokens = [ - { token: '{medium:0}', example: '1' }, - { token: '{medium:00}', example: '01' } -]; - -const mediumFormatTokens = [ - { token: '{Medium Format}', example: 'CD' } -]; - const releaseDateTokens = [ { token: '{Release Year}', example: '2016' } ]; const qualityTokens = [ - { token: '{Quality Full}', example: 'FLAC Proper' }, - { token: '{Quality Title}', example: 'FLAC' } + { token: '{Quality Full}', example: 'AZW3 Proper' }, + { token: '{Quality Title}', example: 'AZW3' } ]; const mediaInfoTokens = [ - { token: '{MediaInfo AudioCodec}', example: 'FLAC' }, + { token: '{MediaInfo AudioCodec}', example: 'MP3' }, { token: '{MediaInfo AudioChannels}', example: '2.0' }, { token: '{MediaInfo AudioBitRate}', example: '320kbps' }, { token: '{MediaInfo AudioBitsPerSample}', example: '24bit' }, @@ -94,7 +85,7 @@ const otherTokens = [ ]; const originalTokens = [ - { token: '{Original Title}', example: 'Author.Name.Book.Name.2018.FLAC-EVOLVE' }, + { token: '{Original Title}', example: 'Author.Name.Book.Name.2018.AZW3-EVOLVE' }, { token: '{Original Filename}', example: '01 - book name' } ]; @@ -306,56 +297,6 @@ class NamingModal extends Component { } - { - book && -
-
-
- { - mediumTokens.map(({ token, example }) => { - return ( - - ); - } - ) - } -
-
- -
-
- { - mediumFormatTokens.map(({ token, example }) => { - return ( - - ); - } - ) - } -
-
- -
- } - { additional &&
diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index f22916558..cdbc6e684 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -35,17 +35,10 @@ namespace NzbDrone.Core.Organizer private static readonly Regex TitleRegex = new Regex(@"\{(?[- ._\[(]*)(?(?:[a-z0-9]+)(?:(?[- ._]+)(?:[a-z0-9]+))?)(?::(?[a-z0-9]+))?(?[- ._)\]]*)\}", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public static readonly Regex TrackRegex = new Regex(@"(?\{track(?:\:0+)?})", - RegexOptions.Compiled | RegexOptions.IgnoreCase); - - private static readonly Regex MediumRegex = new Regex(@"(?\{medium(?:\:0+)?})", - RegexOptions.Compiled | RegexOptions.IgnoreCase); public static readonly Regex SeasonEpisodePatternRegex = new Regex(@"(?(?<=})[- ._]+?)?(?s?{season(?:\:0+)?}(?[- ._]?[ex])(?{episode(?:\:0+)?}))(?[- ._]+?(?={))?", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public static readonly Regex ReleaseDateRegex = new Regex(@"\{Release(\s|\W|_)Year\}", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public static readonly Regex AuthorNameRegex = new Regex(@"(?\{(?:Author)(?[- ._])(Clean)?Name(The)?\})", RegexOptions.Compiled | RegexOptions.IgnoreCase); @@ -58,11 +51,6 @@ namespace NzbDrone.Core.Organizer private static readonly Regex ScenifyRemoveChars = new Regex(@"(?<=\s)(,|<|>|\/|\\|;|:|'|""|\||`|~|!|\?|@|$|%|^|\*|-|_|=){1}(?=\s)|('|:|\?|,)(?=(?:(?:s|m)\s)|\s|$)|(\(|\)|\[|\]|\{|\})", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex ScenifyReplaceChars = new Regex(@"[\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase); - //TODO: Support Written numbers (One, Two, etc) and Roman Numerals (I, II, III etc) - private static readonly Regex MultiPartCleanupRegex = new Regex(@"(?:\(\d+\)|(Part|Pt\.?)\s?\d+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase); - - private static readonly char[] TrackTitleTrimCharacters = new[] { ' ', '.', '?' }; - private static readonly Regex TitlePrefixRegex = new Regex(@"^(The|An|A) (.*?)((?: *\([^)]+\))*)$", RegexOptions.Compiled | RegexOptions.IgnoreCase); public FileNameBuilder(INamingConfigService namingConfigService, @@ -427,14 +415,4 @@ namespace NzbDrone.Core.Organizer } } } - - public enum MultiEpisodeStyle - { - Extend = 0, - Duplicate = 1, - Repeat = 2, - Scene = 3, - Range = 4, - PrefixedRange = 5 - } }