mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 21:07:13 +02:00
- 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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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('-');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user