mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-02-13 18:06:46 +01:00
- fixed loading .txt reference lists
- added support for HB\_DATABASE\_\*.DBM channel lists with file size 74303 (e.g. Renkforce 1510 C HD, Telestar digiHD TC 7) - added support for dtv_cmdb_2.bin files with file size 2731173 (e.g. Dijitsu Android TV with LD-M538 board) - improved experimental support for amdb\*.db Android STB channel lists (now grouped by TV and radio for each satellite) - combined HHD Hex Editor Neo structure definition files for HB_DATABASE.DBM file formats
This commit is contained in:
@@ -1,4 +1,52 @@
|
||||
[dbm:163772]
|
||||
|
||||
[dbm:74303]
|
||||
; overall file layout
|
||||
isDvbS=false
|
||||
separateTvRadioData=false
|
||||
offChecksum=0x0000
|
||||
offDataLength=0x0002
|
||||
offData=0x0006
|
||||
|
||||
offTransponderBitmap=0x0006
|
||||
lenTransponderBitmap=16
|
||||
offTransponderData=0x0016
|
||||
numTransponder=100
|
||||
lenTransponderData=36
|
||||
|
||||
offChannelBitmap=0x0E3C
|
||||
lenChannelBitmap=50
|
||||
offChannelData=0x0E6E
|
||||
numChannel=400
|
||||
lenChannelData=176
|
||||
|
||||
;transponder record
|
||||
offFreq=0
|
||||
offSymRate=8
|
||||
|
||||
;channel record
|
||||
offName=0
|
||||
lenName=64
|
||||
offProgNr=64
|
||||
offLcn=66
|
||||
offTransponderIndex=70
|
||||
offServiceType=76
|
||||
offHide=77
|
||||
maskHide=0x04
|
||||
offSkip=77
|
||||
maskSkip=0x08
|
||||
offLock=77
|
||||
maskLock=0x10
|
||||
offFavorites=79
|
||||
offTsid=96
|
||||
offOnid=98
|
||||
offSid=100
|
||||
offPcrPid=104
|
||||
offVideoPid=106
|
||||
|
||||
|
||||
;---------------------------------------
|
||||
|
||||
[dbm:163772]
|
||||
; overall file layout
|
||||
isDvbS=false
|
||||
offChecksum=0x0000
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace ChanSort.Loader.DBM
|
||||
private IniFile.Section sec;
|
||||
private DataMapping mapping;
|
||||
private bool isDvbS;
|
||||
private bool separateTvRadioData;
|
||||
|
||||
private readonly ChannelList allChannels = new(SignalSource.All, "All");
|
||||
private readonly StringBuilder logMessages = new();
|
||||
@@ -36,18 +37,6 @@ namespace ChanSort.Loader.DBM
|
||||
this.Features.AllowGapsInFavNumbers = false;
|
||||
this.Features.CanEditFavListNames = false;
|
||||
|
||||
this.DataRoot.AddChannelList(this.allChannels);
|
||||
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.AudioPid));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ChannelOrTransponder));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Provider));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Encrypted));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ServiceType));
|
||||
list.VisibleColumnFieldNames.Add(nameof(ChannelInfo.ServiceTypeName));
|
||||
}
|
||||
|
||||
string iniFile = Assembly.GetExecutingAssembly().Location.Replace(".dll", ".ini");
|
||||
this.ini = new IniFile(iniFile);
|
||||
}
|
||||
@@ -63,6 +52,18 @@ namespace ChanSort.Loader.DBM
|
||||
if (sec == null)
|
||||
throw LoaderException.Fail($"No configuration for .DBM files with size {info.Length} in .ini file");
|
||||
|
||||
this.separateTvRadioData = sec.GetBool("separateTvRadioData");
|
||||
if (separateTvRadioData)
|
||||
{
|
||||
this.DataRoot.AddChannelList(new ChannelList(SignalSource.Tv, "TV"));
|
||||
this.DataRoot.AddChannelList(new ChannelList(SignalSource.Radio, "Radio"));
|
||||
this.DataRoot.AddChannelList(new ChannelList(SignalSource.Data, "Data"));
|
||||
}
|
||||
else
|
||||
this.DataRoot.AddChannelList(this.allChannels);
|
||||
AdjustColumns();
|
||||
|
||||
|
||||
this.isDvbS = sec.GetBool("isDvbS");
|
||||
if (isDvbS)
|
||||
{
|
||||
@@ -89,6 +90,21 @@ namespace ChanSort.Loader.DBM
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region AdjustColumns()
|
||||
private void AdjustColumns()
|
||||
{
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.AudioPid));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ChannelOrTransponder));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Provider));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Encrypted));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ServiceType));
|
||||
list.VisibleColumnFieldNames.Add(nameof(ChannelInfo.ServiceTypeName));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ValidateChecksum()
|
||||
private void ValidateChecksum()
|
||||
{
|
||||
@@ -213,7 +229,9 @@ namespace ChanSort.Loader.DBM
|
||||
c.SatPosition = sat.OrbitalPosition;
|
||||
}
|
||||
|
||||
this.DataRoot.AddChannel(this.allChannels, c);
|
||||
var list = this.DataRoot.GetChannelList(c.SignalSource);
|
||||
if (list != null)
|
||||
this.DataRoot.AddChannel(list, c);
|
||||
}
|
||||
|
||||
mapping.BaseOffset += recordSize;
|
||||
|
||||
Reference in New Issue
Block a user