Skip to content

Commit

Permalink
Added more channel matching rules
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlendea committed Mar 1, 2020
1 parent 422c6ba commit 167f311
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Service/ChannelMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public sealed class ChannelMatcher : IChannelMatcher

{ " HEVC$", "" },
{ " HEVC ", "" },
{ " [FU]*[HMS][DQ]$", "" },
{ " [FU]*[HMS][DQ] ", "" },
{ " (Ultra|[FU])*_*[HMS][DQ]$", "" },
{ " (Ultra|[FU])*_*[HMS][DQ] ", "" },
{ "\\(Opt-[0-9]\\)", "" },
{ "\\[[0-9]*p\\]", "" },
{ " S[0-9]$", "" },
Expand Down
3 changes: 3 additions & 0 deletions UnitTests/Service/ChannelMatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ public void SetUp()
channelMatcher = new ChannelMatcher(cacheMock.Object);
}

[TestCase("Antena 3", null, "Antena 3 Ultra_HD")]
[TestCase("Ardeal TV", "RO: Ardeal TV", "|RO| Ardeal TV")]
[TestCase("Cartoon Network", "RO: Cartoon Network", "VIP|RO|: Cartoon Network")]
[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("Golf Channel", "FR: Golf Channel", "|FR| GOLF CHANNEL FHD")]
[TestCase("HBO 3", null, "HBO 3 F_HD")]
[TestCase("MTV Europe", null, "RO: MTV Europe")]
[TestCase("Pro TV", null, "PRO TV ULTRA_HD")]
[TestCase("Realitatea Plus", null, "Realitatea Plus")]
[TestCase("România TV", "România TV", "RO\" Romania TV")]
[TestCase("Somax", "RO: Somax TV", "Somax TV")]
Expand Down

0 comments on commit 167f311

Please sign in to comment.