- opening MtkChannelList.xml in a Philips directory structure now loads the whole Philips list instead of just MtkChannelList.xml

- Philips list versions 120 and 125 are now read-only because the TV ignores changes to the main channel numbers. Only favorite lists are imported correctly
This commit is contained in:
Horst Beham
2024-10-15 10:37:57 +02:00
parent 1904e97d64
commit 4eb78e1ca8
4 changed files with 29 additions and 7 deletions

View File

@@ -227,6 +227,16 @@ namespace ChanSort.Loader.Philips
throw LoaderException.TryNext("No XML files found in folder structure");
LoadAndValidateMtkChannelList(dir);
// version 120 and 125 ignore the modified main channel numbers and only take changes from the favorites.xml
if ((chanLstBin?.VersionMajor ?? 0) >= 120)
{
foreach (var list in this.DataRoot.ChannelLists)
{
if (!list.IsMixedSourceFavoritesList)
list.ReadOnly = true;
}
}
}
else
{
@@ -718,8 +728,12 @@ namespace ChanSort.Loader.Philips
if (others.Count == 0)
throw LoaderException.Fail("MtkChannelList.xml doesn't contain a matching channel for " + ch1);
if (others.Count > 1)
throw LoaderException.Fail("MtkChannelList.xml contains multiple matching channel for " + ch1);
{
others = others.Where(c => c.OldProgramNr == ch1.OldProgramNr).ToList();
if (others.Count != 1)
throw LoaderException.Fail("MtkChannelList.xml contains multiple matching channel for " + ch1);
}
var ch2 = others[0];
if (ch1.OldProgramNr != ch2.OldProgramNr)
throw LoaderException.Fail("MtkChannelList.xml contains a different channel number for " + ch1);