From 13a694aa6f88c1fa633a44976ca068b1a1ee6612 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 3 Nov 2013 09:20:35 +0000 Subject: [PATCH] * fine-tune PartX patterns --- .../sourceforge/filebot/similarity/SeasonEpisodeMatcher.java | 2 +- .../filebot/similarity/SeasonEpisodeMatcherTest.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java b/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java index 1563eea4..36f34d72 100644 --- a/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java +++ b/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java @@ -72,7 +72,7 @@ public class SeasonEpisodeMatcher { }; // match patterns like ep1, ep.1, ... - patterns[4] = new SeasonEpisodePattern(sanity, "(? process(MatchResult match) { diff --git a/test/net/sourceforge/filebot/similarity/SeasonEpisodeMatcherTest.java b/test/net/sourceforge/filebot/similarity/SeasonEpisodeMatcherTest.java index a14b127f..d84e8498 100644 --- a/test/net/sourceforge/filebot/similarity/SeasonEpisodeMatcherTest.java +++ b/test/net/sourceforge/filebot/similarity/SeasonEpisodeMatcherTest.java @@ -18,6 +18,10 @@ public class SeasonEpisodeMatcherTest { assertEquals(new SxE(1, 2), matcher.match("[s01]_[e02]").get(0)); assertEquals(new SxE(2013, 10), matcher.match("2013.P10").get(0)); + assertEquals(new SxE(2013, 10), matcher.match("2013.P10").get(0)); + + assertEquals(new SxE(null, 11), matcher.match("wsop.2013.me.p11.720p-yestv").get(0)); + assertEquals(new SxE(null, 18), matcher.match("World.Series.Of.Poker.2013.Main.Event.Part18.480p.HDTV.x264-mSD").get(0)); // multiple values assertEquals(new SxE(1, 2), matcher.match("Test.42.s01e01.s01e02.300").get(1));