Skip to content

Commit

Permalink
Improved channel matching
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlendea committed May 21, 2020
1 parent 012e90a commit 90369d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Service/ChannelMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public sealed class ChannelMatcher : IChannelMatcher
{ "^((?!RO).*) *Moldova$", "MD: $1" },
{ "(.*) *\\(Moldova\\)$", "MD: $1" },
{ "(.*) *\\(Romania\\)$", "RO: $1" },
{ "^RO *[\\|\\-:] *(.*) *\\(*Romania\\)*$", "RO: $1" },

{ "^[\\|\":-]* *Romania *[\\|\":-]", "RO:" },

Expand Down
2 changes: 2 additions & 0 deletions UnitTests/Service/ChannelMatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ public void SetUp()
channelMatcher = new ChannelMatcher(cacheMock.Object);
}

[TestCase("AMC", null, "RO: AMC Romania")]
[TestCase("Antena 3", null, "Antena 3 Ultra_HD")]
[TestCase("Ardeal TV", "RO: Ardeal TV", "|RO| Ardeal TV")]
[TestCase("Bollywood TV", "RO: BO TV", "BO TV")]
[TestCase("Cartoon Network", "RO: Cartoon Network", "VIP|RO|: Cartoon Network")]
[TestCase("CineMAX 1", "RO: CineMAX", "CineMAX RO")]
[TestCase("Digi Sport 2", "RO: Digi Sport 2", "RO: DIGI Sport 2")]
[TestCase("Digi World", "RO: Digi World FHD", "RUMANIA: DigiWorld FHD (Opt-1)")]
[TestCase("Duna", "RO: Duna TV", "RO | Duna Tv")]
[TestCase("Golf Channel", "FR: Golf Channel", "|FR| GOLF CHANNEL FHD")]
[TestCase("HBO 3", null, "HBO 3 F_HD")]
[TestCase("HD Net Van Damme", "HD NET Jean Claude Van Damme", "HD NET Jean Claude van Damme")]
Expand Down

0 comments on commit 90369d0

Please sign in to comment.