mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-26 09:09:03 +01:00
- 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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user