- UHD channels using ServiceType 0x9F are now recognized as TV channels (fixes an issue with Panasonic lists where these channels did not show up and their numbers were assigned multiple times)

- ChannelList.SignalSource and DataRoot.GetChannelList(SignalSource) are now handled so that if all bits of a given Mask are left 0, the list will accept anything.
  i.e. if Tv/Radio/Data is left 0, the list can contain all of them as well as channels that have neither of the 3 bits set.
- added basic unit tests for each loader to ensure test files have the expected numbers of channels in the various sub lists
This commit is contained in:
hbeham
2019-08-29 16:57:20 +02:00
parent 8923ce4c83
commit 0cf97fe76c
86 changed files with 571965 additions and 78 deletions

View File

@@ -231,6 +231,15 @@ namespace ChanSort.Api
case '5':
channel.Favorites |= Favorites.E;
break;
case '6':
channel.Favorites |= Favorites.F;
break;
case '7':
channel.Favorites |= Favorites.G;
break;
case '8':
channel.Favorites |= Favorites.H;
break;
case 'L':
channel.Lock = true;
break;
@@ -281,6 +290,9 @@ namespace ChanSort.Api
if ((channel.Favorites & Favorites.C) != 0) sb.Append('3');
if ((channel.Favorites & Favorites.D) != 0) sb.Append('4');
if ((channel.Favorites & Favorites.E) != 0) sb.Append('5');
if ((channel.Favorites & Favorites.F) != 0) sb.Append('6');
if ((channel.Favorites & Favorites.G) != 0) sb.Append('7');
if ((channel.Favorites & Favorites.H) != 0) sb.Append('8');
if (channel.Lock) sb.Append('L');
if (channel.Skip) sb.Append('S');
if (channel.Hidden) sb.Append('H');

View File

@@ -8,7 +8,7 @@ namespace ChanSort.Api
{
private static readonly char[] Separators = { ';' };
private readonly ChannelList allChannels = new ChannelList(SignalSource.MaskAntennaCableSat | SignalSource.MaskAnalogDigital | SignalSource.MaskTvRadio, "All");
private readonly ChannelList allChannels = new ChannelList(0, "All");
#region ctor()

View File

@@ -9,6 +9,7 @@ SERVICETYPE;17;HD-TV
SERVICETYPE;22;SD-TV
SERVICETYPE;25;HD-TV
SERVICETYPE;31;UHD-TV
SERVICETYPE;159;UHD-TV
SERVICETYPE;211;Option
ONID;Start;End;Name;Operator
1 SERVICETYPE Number Description
9 SERVICETYPE 22 SD-TV
10 SERVICETYPE 25 HD-TV
11 SERVICETYPE 31 UHD-TV
12 SERVICETYPE 159 UHD-TV
13 SERVICETYPE 211 Option
14 ONID Start End
15 ONID 0x0000 0x0000

View File

@@ -13,7 +13,7 @@ namespace ChanSort.Api
private int duplicateUidCount;
private int duplicateProgNrCount;
public static List<string> DefaultVisibleColumns { get; set; } // initialized by MainForm
public static List<string> DefaultVisibleColumns { get; set; } = new List<string>(); // initialized by MainForm
public ChannelList(SignalSource source, string caption)
{

View File

@@ -95,7 +95,7 @@ namespace ChanSort.Api
continue;
if ((listMask & SignalSource.MaskAntennaCableSat) != 0 && (listMask & SignalSource.MaskAntennaCableSat & searchMask) == 0) // air/cable/sat/ip
continue;
if ((listMask & SignalSource.MaskTvRadio) != 0 && (listMask & SignalSource.MaskTvRadio & searchMask) == 0) // tv/radio
if ((listMask & SignalSource.MaskTvRadioData) != 0 && (listMask & SignalSource.MaskTvRadioData & searchMask) == 0) // tv/radio/data
continue;
if ((listMask & SignalSource.MaskProvider) != 0 && (listMask & SignalSource.MaskProvider) != (searchMask & SignalSource.MaskProvider)) // preset list
continue;

View File

@@ -11,6 +11,8 @@ namespace ChanSort.Api
[Flags]
public enum SignalSource
{
Any = 0,
// bit 0-1: analog/digital
MaskAnalogDigital = 0x0003,
Analog = 0x0001,
@@ -26,14 +28,15 @@ namespace ChanSort.Api
MaskAdInput = MaskAnalogDigital | MaskAntennaCableSat,
// bit 8-9: TV/Radio
MaskTvRadio = 0x0300,
// bit 8-10: TV/Radio/Data
MaskTvRadioData = 0x0700,
Tv = 0x0100,
Radio = 0x0200,
TvAndRadio = Tv | Radio,
Data = 0x0400,
TvAndData = Tv|Data,
// bit 12-15: Preset list selector (AstraHD+, Freesat, TivuSat, CanalDigitalSat, ... for Samsung)
MaskProvider = 0xFC00,
MaskProvider = 0xF000,
Provider0 = 0 << 12,
Provider1 = 1 << 12,
Provider2 = 2 << 12,
@@ -68,7 +71,7 @@ namespace ChanSort.Api
DigitalPlusD = Digital + Sat + DigitalPlus,
CyfraPlusD = Digital + Sat + CyfraPlus,
All = MaskAnalogDigital | MaskAntennaCableSat | MaskTvRadio
All = MaskAnalogDigital | MaskAntennaCableSat | MaskTvRadioData
}
#endregion

View File

@@ -186,13 +186,15 @@ namespace ChanSort.Api
case 0x11: // MPEG2-HD
case 0x16: // H264/AVC-SD
case 0x19: // H264/AVC-HD
case 0x1F: // UHD
case 0x1F: // UHD (future use)
case 0x9F: // UHD (user defined)
return SignalSource.Tv;
case 0x02:
case 0x0A:
return SignalSource.Radio;
}
return 0;
return SignalSource.Data;
}
#endregion