mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 13:37:45 +02:00
- added inactive code to read Hisense channel lists (no write support)
- added feature to allow specific channel lists to define which data columns should be visible. This can be customized by individual file format loaders. - upgraded to DevExpress 15.1.6
This commit is contained in:
@@ -13,9 +13,7 @@ SERVICETYPE;211;Option
|
||||
|
||||
ONID;Start;End;Name;Operator
|
||||
ONID;0x0000;0x0000;(Reserved);(Reserved)
|
||||
ONID;0x0001;0x0001;Société Européenne des Satellites;Société Européenne des Satellites
|
||||
ONID;0x0002;0x0002;Société Européenne des Satellites;Société Européenne des Satellites
|
||||
ONID;0x0003;0x0019;Société Européenne des Satellites;Société Européenne des Satellites
|
||||
ONID;0x0001;0x0019;SES/Astra;SES/Astra
|
||||
ONID;0x001A;0x001A;Quiero Televisión ;Quiero Televisión
|
||||
ONID;0x001B;0x001B;RAI;RAI
|
||||
ONID;0x001C;0x001C;Hellas-Sat S.A.;Hellas-Sat S.A.
|
||||
|
||||
|
@@ -8,6 +8,8 @@ namespace ChanSort.Api
|
||||
private const int MAX_FAV_LISTS = 5;
|
||||
|
||||
private string uid;
|
||||
private string serviceTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// List of channels that have the same UID as this channel and were not added to the channel list directly
|
||||
/// </summary>
|
||||
@@ -151,7 +153,12 @@ namespace ChanSort.Api
|
||||
#endregion
|
||||
|
||||
#region ServiceTypeName
|
||||
public string ServiceTypeName { get { return LookupData.Instance.GetServiceTypeDescription(this.ServiceType); } }
|
||||
|
||||
public string ServiceTypeName
|
||||
{
|
||||
get { return this.serviceTypeName ?? (this.serviceTypeName = LookupData.Instance.GetServiceTypeDescription(this.ServiceType)); }
|
||||
set { this.serviceTypeName = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetFavString()
|
||||
@@ -212,6 +219,14 @@ namespace ChanSort.Api
|
||||
for (int i = 0; i < len; i++)
|
||||
this.AddDebug(data[offset + i]);
|
||||
}
|
||||
|
||||
public void AddDebug(string val)
|
||||
{
|
||||
if (this.Debug == null)
|
||||
this.Debug = val;
|
||||
else
|
||||
this.Debug += " " + val;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UpdateRawData()
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace ChanSort.Api
|
||||
{
|
||||
public class ChannelList
|
||||
{
|
||||
private readonly SignalSource source;
|
||||
private readonly IList<ChannelInfo> channels = new List<ChannelInfo>();
|
||||
private readonly Dictionary<string, IList<ChannelInfo>> channelByUid = new Dictionary<string, IList<ChannelInfo>>();
|
||||
private readonly Dictionary<int, ChannelInfo> channelByProgNr = new Dictionary<int, ChannelInfo>();
|
||||
private readonly Dictionary<string, IList<ChannelInfo>> channelByName = new Dictionary<string, IList<ChannelInfo>>();
|
||||
@@ -17,20 +15,21 @@ namespace ChanSort.Api
|
||||
|
||||
public ChannelList(SignalSource source, string caption)
|
||||
{
|
||||
this.source = source;
|
||||
this.SignalSource = source;
|
||||
this.ShortCaption = caption;
|
||||
this.FirstProgramNumber = (source & SignalSource.Digital) != 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
public string ShortCaption { get; private set; }
|
||||
public SignalSource SignalSource { get { return this.source; } }
|
||||
public IList<ChannelInfo> Channels { get { return this.channels; } }
|
||||
public int Count { get { return channels.Count; } }
|
||||
public int DuplicateUidCount { get { return duplicateUidCount; } }
|
||||
public int DuplicateProgNrCount { get { return duplicateProgNrCount; } }
|
||||
public string ShortCaption { get; }
|
||||
public SignalSource SignalSource { get; }
|
||||
public IList<ChannelInfo> Channels { get; } = new List<ChannelInfo>();
|
||||
public int Count => Channels.Count;
|
||||
public int DuplicateUidCount => duplicateUidCount;
|
||||
public int DuplicateProgNrCount => duplicateProgNrCount;
|
||||
public bool ReadOnly { get; set; }
|
||||
public int MaxChannelNameLength { get; set; }
|
||||
public int PresetProgramNrCount { get; private set; }
|
||||
public IList<string> VisibleColumnFieldNames;
|
||||
|
||||
#region Caption
|
||||
public string Caption
|
||||
@@ -97,7 +96,7 @@ namespace ChanSort.Api
|
||||
if (ci.ProgramNrPreset != 0)
|
||||
++this.PresetProgramNrCount;
|
||||
|
||||
this.channels.Add(ci);
|
||||
this.Channels.Add(ci);
|
||||
|
||||
return warning2;
|
||||
}
|
||||
@@ -130,21 +129,21 @@ namespace ChanSort.Api
|
||||
#region GetChannelByNewProgNr()
|
||||
public IList<ChannelInfo> GetChannelByNewProgNr(int newProgNr)
|
||||
{
|
||||
return this.channels.Where(c => c.NewProgramNr == newProgNr).ToList();
|
||||
return this.Channels.Where(c => c.NewProgramNr == newProgNr).ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetChannelsByNewOrder()
|
||||
public IList<ChannelInfo> GetChannelsByNewOrder()
|
||||
{
|
||||
return this.channels.OrderBy(c => c.NewProgramNr).ToList();
|
||||
return this.Channels.OrderBy(c => c.NewProgramNr).ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RemoveChannel()
|
||||
public void RemoveChannel(ChannelInfo channel)
|
||||
{
|
||||
this.channels.Remove(channel);
|
||||
this.Channels.Remove(channel);
|
||||
var list = this.channelByUid.TryGet(channel.Uid);
|
||||
if (list != null && list.Contains(channel))
|
||||
list.Remove(channel);
|
||||
|
||||
Reference in New Issue
Block a user