mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 12:16:31 +02:00
- fixed saving VDR lists after applying a reference list which contained no longer existing channels (cast exception for the proxy ChannelInfo record)
- no longer load samsung .zip lists with invalid internal folder structure (all files must be in the root folder of the .zip)
This commit is contained in:
@@ -107,8 +107,13 @@ namespace ChanSort.Loader.SamsungJ
|
||||
|
||||
using (ZipFile zip = new ZipFile(this.FileName))
|
||||
{
|
||||
foreach(ZipEntry entry in zip)
|
||||
this.Expand(zip, entry.Name);
|
||||
foreach (ZipEntry entry in zip)
|
||||
{
|
||||
// only expand files from the root folder to avoid pit-falls with incorrectly rezipped lists
|
||||
// that contain the data files in a subfolder
|
||||
if (Path.GetDirectoryName(entry.Name) == "")
|
||||
this.Expand(zip, entry.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -59,9 +59,11 @@ namespace ChanSort.Loader.VDR
|
||||
|
||||
using (StreamWriter file = new StreamWriter(tvOutputFile))
|
||||
{
|
||||
foreach (Channels channelInfo in this.allChannels.GetChannelsByNewOrder())
|
||||
foreach (ChannelInfo channel in this.allChannels.GetChannelsByNewOrder())
|
||||
{
|
||||
file.WriteLine(channelInfo.confLine);
|
||||
// when a reference list was applied, the list may contain proxy entries for deleted channels, which must be ignored
|
||||
if (channel is Channels vdrChannel)
|
||||
file.WriteLine(vdrChannel.confLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user