Skip to content

Commit

Permalink
Improved some channel matching rules
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlendea committed Feb 9, 2020
1 parent 5db4470 commit f165240
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -19,9 +19,9 @@ public sealed class ChannelMatcher : IChannelMatcher
static readonly IDictionary<string, string> TextReplacements = new Dictionary<string, string>
{
{ "RUMANIA", "Romania" },
{ "^[\\|\":]* *Romania *[\"\\|:]", "RO:" },
{ "^[\\|\":-]* *Romania *[\\|\":-]", "RO:" },

{ "^[\\|\":]* *([A-Z][A-Z]) *[\\|\":] *", "$1:" },
{ "^[\\|\":-]* *([A-Z][A-Z]) *[\\|\":-] *", "$1:" },
{ "^([A-Z][A-Z]): *(.*) \\1$", "$1: $2" },

{ " HEVC$", "" },
Expand Down
1 change: 1 addition & 0 deletions UnitTests/Service/ChannelMatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void DoesMatch_CompareWithDifferentValue_ReturnsFalse()
[TestCase("|ROM|: Cromtel", "CROMTEL")]
[TestCase("|UK| CHELSEA TV (Live On Matches) HD", "UKCHELSEATV")]
[TestCase("RO \" DIGI SPORT 1 HD RO", "DIGISPORT1")]
[TestCase("RO-Animal Planet HD", "ANIMALPLANET")]
[TestCase("RO: Animal World [768p]", "ANIMALWORLD")]
[TestCase("RO: Bit TV (ROM)", "BITTV")]
[TestCase("RO: HBO 3 RO", "HBO3")]
Expand Down

0 comments on commit f165240

Please sign in to comment.