- fixed application of .txt reference lists (which had no effect at all on philips lists)

- improved support for Vidaa 5.1 Hisense format
This commit is contained in:
Horst Beham
2021-07-08 22:13:08 +02:00
parent 70811cf829
commit 0890c0f2c7
13 changed files with 136 additions and 25 deletions

View File

@@ -257,7 +257,7 @@ namespace ChanSort.Api
if (!(chanFilter?.Invoke(refChannel, true) ?? true))
continue;
var tvChannel = FindChannel(tvList, newPos, refChannel, onidTsidSid);
var tvChannel = FindChannel(tvList, newPos, refChannel, onidTsidSid, overwrite);
if (tvChannel != null)
{
@@ -307,7 +307,7 @@ namespace ChanSort.Api
}
}
private ChannelInfo FindChannel(ChannelList tvList, int subListIndex, ChannelInfo refChannel, Dictionary<long, List<ChannelInfo>> onidTsidSid)
private ChannelInfo FindChannel(ChannelList tvList, int subListIndex, ChannelInfo refChannel, Dictionary<long, List<ChannelInfo>> onidTsidSid, bool overwrite)
{
List<ChannelInfo> candidates;
@@ -349,12 +349,12 @@ namespace ChanSort.Api
// if the reference list has information about a service type (tv/radio/data), then only consider channels matching it (or lacking service type information)
var serviceType = refChannel.SignalSource & SignalSource.MaskTvRadioData;
if (serviceType != 0)
if (serviceType != 0 && serviceType != SignalSource.MaskTvRadioData)
{
channels = channels.Where(ch =>
{
var m = ch.SignalSource & SignalSource.MaskTvRadioData;
return m == 0 || m == serviceType;
return m == 0 || (m & serviceType) != 0;
}).ToList();
}

View File

@@ -8,7 +8,7 @@ namespace ChanSort.Api
{
private static readonly char[] Separators = { ';' };
private readonly ChannelList allChannels = new ChannelList(0, "All");
private readonly ChannelList allChannels = new ChannelList(SignalSource.All, "All");
#region ctor()
@@ -65,7 +65,7 @@ namespace ChanSort.Api
if (!int.TryParse(parts[0], out progNr))
continue;
var channel = new ChannelInfo(allChannels.SignalSource, lineNr, progNr, parts[1]);
var channel = new ChannelInfo(SignalSource.All, lineNr, progNr, parts[1]);
if (parts.Length >= 3)
{
var subParts = parts[2].Split('-');

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;