- Panasonic: fixed error reading lists with channels that refer to non-existing transponders

- Philips ChannelMap_45: incrementing fav list version number when saving and setting the last_watched_channel_id to
  the first channel in the fav list (ensuring that the channel is actually present in the list)
This commit is contained in:
Horst Beham
2021-02-17 09:41:06 +01:00
parent 241f8be0f7
commit f85ff02a92
3 changed files with 17 additions and 5 deletions

View File

@@ -40,8 +40,11 @@ namespace ChanSort.Loader.Panasonic
this.SignalSource |= SignalSource.SatIP;
byte[] buffer = new byte[1000];
var len = r.GetBytes(field["delivery"], 0, buffer, 0, 1000);
this.AddDebug(buffer, 0, (int) len);
if (!r.IsDBNull(field["delivery"]))
{
var len = r.GetBytes(field["delivery"], 0, buffer, 0, 1000);
this.AddDebug(buffer, 0, (int) len);
}
this.Skip = r.GetInt32(field["skip"]) != 0;
this.Encrypted = r.GetInt32(field["free_CA_mode"]) != 0;
@@ -87,7 +90,7 @@ namespace ChanSort.Loader.Panasonic
this.SignalSource |= LookupData.Instance.IsRadioTvOrData(stype);
this.ServiceType = stype;
int freq = r.GetInt32(field["freq"]);
int freq = r.IsDBNull(field["freq"]) ? 0 : r.GetInt32(field["freq"]);
if ((this.SignalSource & SignalSource.Sat) != 0)
{
// ReSharper disable PossibleLossOfFraction