diff --git a/source/net/filebot/media/ReleaseInfo.properties b/source/net/filebot/media/ReleaseInfo.properties index e557c6df..b6f5a457 100644 --- a/source/net/filebot/media/ReleaseInfo.properties +++ b/source/net/filebot/media/ReleaseInfo.properties @@ -14,7 +14,7 @@ pattern.video.repack: REPACK|PROPER|RERIP pattern.subtitle.tags: forced|HI|SDH # additional release info patterns -pattern.video.format: DivX[345]?|Xvid|AVC|(x|h)[.]?(264|265)|HEVC|3ivx|PGS|MP[E]?G[45]?|(FLAC|AAC|AC3|MP3|MP4|DTS|DD|MA).?[12457][.]?[01]|[26]ch|(Multi.)?DTS(.HD)?(.MA)?|FLAC|AAC|AC3|MP3|MP4|TrueHD|Atmos|[M0]?(720|1080)[pi]|(?<=[-])(720|1080|2D|3D)|10.?bit|(24|30|60)FPS|Hi10[P]?|[a-z]{2,3}.(2[.]0|5[.]1)|(19|20)[0-9]+(.)S[0-9]+(?!(.)?E[0-9]+)|(?<=\\d+)v[0-4]|CD\\d+ +pattern.video.format: DivX[345]?|Xvid|AVC|(x|h)[.]?(264|265)|HEVC|3ivx|PGS|MP[E]?G[45]?|(Multi.)?(FLAC|AAC|AC3|MP3|MP4|DTS|DD|TrueHD)(.?(HD|P|[+]))?(.?(Atmos|HRA|HD|MA|ES|X))?(.?[1-9][.]?[01])?|[1-9]ch|FLAC|AAC|AC3|MP3|MP4|TrueHD|Atmos|[M0]?(720|1080)[pi]|(?<=[-])(720|1080|2D|3D)|10.?bit|(24|30|60)FPS|Hi10[P]?|[a-z]{2,3}.(2[.]0|5[.]1)|(19|20)[0-9]+(.)S[0-9]+(?!(.)?E[0-9]+)|(?<=\\d+)v[0-4]|CD\\d+ # clutter file exclude pattern pattern.clutter.excludes: (?<=[!\\-\\(\\[])(Sample|Trailer)|(Sample|Trailer)(?=[\\-\\)\\]])|(?<=[.\\-])(s|t|Sample|Trailer)$|(NCED|NCOP|(OP|ED)\\p{Digit}\\p{Alpha})|(Extras|Trailers|Featurettes|Interviews|Scenes|Shorts)$|Behind.the.Scenes|Deleted.and.Extended.Scenes|Deleted.Scenes diff --git a/test/net/filebot/media/MediaDetectionTest.java b/test/net/filebot/media/MediaDetectionTest.java index 55404163..cf400578 100644 --- a/test/net/filebot/media/MediaDetectionTest.java +++ b/test/net/filebot/media/MediaDetectionTest.java @@ -38,4 +38,68 @@ public class MediaDetectionTest { assertEquals("[78874]", MediaDetection.grepTheTvdbId("@see https://www.thetvdb.com/?tab=seasonall&id=78874&lid=14").toString()); } + @Test + public void stripReleaseInfo() throws Exception { + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.MA.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.MA.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.MA.6ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD.MA.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD.MA.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD.MA.6ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD.MA.8ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTSHDMA.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTSHDMA.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-X.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-X.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-X.6ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-X.8ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD-HRA.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-ES.6.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.6.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.1ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.2ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.6ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.7ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS.8ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTSMA")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.TrueHD.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.TrueHD.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.TrueHD.Atmos.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.TrueHD.Atmos.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DTS-HD.TrueHD.7.1.Atmos")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.4.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.1ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.2ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.4ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AC3.6ch")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.4.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP.2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP.4.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD+.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD+.2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD+.4.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD+.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP2.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP4.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DDP5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.5.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.DD.7.1")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.MP3.1.0")); + assertEquals("Avatar 2009", MediaDetection.stripReleaseInfo("Avatar.2009.AAC.5.1")); + } + }