From a39d8f7d180b72d9c94687770df508e8fffe8642 Mon Sep 17 00:00:00 2001 From: Horst Beham Date: Tue, 29 Nov 2022 14:58:00 +0100 Subject: [PATCH] - added function to mark a channel for swapping + swap with current channel - replaced misuse of "FileLoadException" with a custom LoaderException to handle file loading issues with better continue/fail logic - removed "Save As" and replaced it with "Convert list" menu item that shows information on how to use a reference list instead of direct conversion --- source/ChanSort.Api/Controller/SerializerBase.cs | 1 - source/ChanSort.Loader.Android/AldenSerializer.cs | 1 - source/ChanSort.Loader.Enigma2/Serializer.cs | 1 - source/ChanSort.Loader.Grundig/Serializer.cs | 1 - source/ChanSort.Loader.LG/GlobalClone/GcJsonSerializer.cs | 1 - source/ChanSort.Loader.LG/GlobalClone/GcXmlSerializer.cs | 1 - source/ChanSort.Loader.Panasonic/IdtvChannelSerializer.cs | 1 - source/ChanSort.Loader.Panasonic/XmlSerializer.cs | 1 - source/ChanSort.Loader.Philips/BinarySerializer.cs | 1 - source/ChanSort.Loader.Philips/XmlSerializer.cs | 1 - 10 files changed, 10 deletions(-) diff --git a/source/ChanSort.Api/Controller/SerializerBase.cs b/source/ChanSort.Api/Controller/SerializerBase.cs index 3148baa..332abf0 100644 --- a/source/ChanSort.Api/Controller/SerializerBase.cs +++ b/source/ChanSort.Api/Controller/SerializerBase.cs @@ -36,7 +36,6 @@ namespace ChanSort.Api public bool CanHaveGaps { get; set; } = true; public bool EncryptedFlagEdit { get; set; } public DeleteMode DeleteMode { get; set; } = DeleteMode.NotSupported; - public bool CanSaveAs { get; set; } = true; public FavoritesMode FavoritesMode diff --git a/source/ChanSort.Loader.Android/AldenSerializer.cs b/source/ChanSort.Loader.Android/AldenSerializer.cs index a586852..2c3dc2f 100644 --- a/source/ChanSort.Loader.Android/AldenSerializer.cs +++ b/source/ChanSort.Loader.Android/AldenSerializer.cs @@ -44,7 +44,6 @@ namespace ChanSort.Loader.Android this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; this.Features.DeleteMode = DeleteMode.Physically; - this.Features.CanSaveAs = true; this.Features.CanHaveGaps = true; // at least the DVB-S Data list had gaps this.Features.FavoritesMode = FavoritesMode.OrderedPerSource; this.Features.MaxFavoriteLists = 1; diff --git a/source/ChanSort.Loader.Enigma2/Serializer.cs b/source/ChanSort.Loader.Enigma2/Serializer.cs index 4de9ec3..df22d96 100644 --- a/source/ChanSort.Loader.Enigma2/Serializer.cs +++ b/source/ChanSort.Loader.Enigma2/Serializer.cs @@ -40,7 +40,6 @@ namespace ChanSort.Loader.Enigma2 this.Features.CanHideChannels = false; this.Features.FavoritesMode = FavoritesMode.MixedSource; this.Features.MaxFavoriteLists = 0; // dynamically added - this.Features.CanSaveAs = false; this.channels.IsMixedSourceFavoritesList = true; this.DataRoot.AddChannelList(this.channels); diff --git a/source/ChanSort.Loader.Grundig/Serializer.cs b/source/ChanSort.Loader.Grundig/Serializer.cs index d35d863..e6c3576 100644 --- a/source/ChanSort.Loader.Grundig/Serializer.cs +++ b/source/ChanSort.Loader.Grundig/Serializer.cs @@ -31,7 +31,6 @@ namespace ChanSort.Loader.Grundig this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; this.Features.DeleteMode = DeleteMode.Physically; - this.Features.CanSaveAs = false; this.Features.AllowGapsInFavNumbers = false; this.Features.CanEditFavListNames = false; this.Features.FavoritesMode = FavoritesMode.OrderedPerSource; diff --git a/source/ChanSort.Loader.LG/GlobalClone/GcJsonSerializer.cs b/source/ChanSort.Loader.LG/GlobalClone/GcJsonSerializer.cs index d84fc6c..e8cb784 100644 --- a/source/ChanSort.Loader.LG/GlobalClone/GcJsonSerializer.cs +++ b/source/ChanSort.Loader.LG/GlobalClone/GcJsonSerializer.cs @@ -28,7 +28,6 @@ namespace ChanSort.Loader.GlobalClone this.Features.DeleteMode = DeleteMode.NotSupported; //.FlagWithoutPrNr; this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.FavoritesMode = FavoritesMode.None; - this.Features.CanSaveAs = true; this.Features.CanHaveGaps = true; this.Features.CanHideChannels = true; this.Features.CanSkipChannels = true; diff --git a/source/ChanSort.Loader.LG/GlobalClone/GcXmlSerializer.cs b/source/ChanSort.Loader.LG/GlobalClone/GcXmlSerializer.cs index 07072fc..83c58b7 100644 --- a/source/ChanSort.Loader.LG/GlobalClone/GcXmlSerializer.cs +++ b/source/ChanSort.Loader.LG/GlobalClone/GcXmlSerializer.cs @@ -27,7 +27,6 @@ namespace ChanSort.Loader.GlobalClone this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.FlagWithoutPrNr; this.Features.CanHaveGaps = true; - this.Features.CanSaveAs = true; this.Features.CanSkipChannels = true; this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; diff --git a/source/ChanSort.Loader.Panasonic/IdtvChannelSerializer.cs b/source/ChanSort.Loader.Panasonic/IdtvChannelSerializer.cs index f244ea0..c66f912 100644 --- a/source/ChanSort.Loader.Panasonic/IdtvChannelSerializer.cs +++ b/source/ChanSort.Loader.Panasonic/IdtvChannelSerializer.cs @@ -154,7 +154,6 @@ internal class IdtvChannelSerializer : SerializerBase dbFile = Path.Combine(dir, "tv.db"); binFile = Path.Combine(dir, "channel", "idtvChannel.bin"); - this.Features.CanSaveAs = false; this.Features.FavoritesMode = FavoritesMode.Flags; this.Features.DeleteMode = DeleteMode.FlagWithPrNr; diff --git a/source/ChanSort.Loader.Panasonic/XmlSerializer.cs b/source/ChanSort.Loader.Panasonic/XmlSerializer.cs index e83fcbf..1ba754c 100644 --- a/source/ChanSort.Loader.Panasonic/XmlSerializer.cs +++ b/source/ChanSort.Loader.Panasonic/XmlSerializer.cs @@ -41,7 +41,6 @@ namespace ChanSort.Loader.Panasonic this.Features.CanLockChannels = false; this.Features.CanHideChannels = false; this.Features.DeleteMode = DeleteMode.NotSupported; - this.Features.CanSaveAs = true; this.Features.AllowGapsInFavNumbers = true; this.Features.CanEditFavListNames = false; diff --git a/source/ChanSort.Loader.Philips/BinarySerializer.cs b/source/ChanSort.Loader.Philips/BinarySerializer.cs index 1ed0a92..5330f7c 100644 --- a/source/ChanSort.Loader.Philips/BinarySerializer.cs +++ b/source/ChanSort.Loader.Philips/BinarySerializer.cs @@ -76,7 +76,6 @@ namespace ChanSort.Loader.Philips this.Features.CanLockChannels = true; this.Features.CanHideChannels = false; this.Features.DeleteMode = DeleteMode.NotSupported; - this.Features.CanSaveAs = false; this.Features.CanHaveGaps = false; this.Features.FavoritesMode = FavoritesMode.Flags; // satellite favorites are stored in a separate file that may support independent sorting, but DVB C/T only have a flag this.Features.MaxFavoriteLists = 1; // Map45 format will change this diff --git a/source/ChanSort.Loader.Philips/XmlSerializer.cs b/source/ChanSort.Loader.Philips/XmlSerializer.cs index 0629ce7..03786ff 100644 --- a/source/ChanSort.Loader.Philips/XmlSerializer.cs +++ b/source/ChanSort.Loader.Philips/XmlSerializer.cs @@ -106,7 +106,6 @@ namespace ChanSort.Loader.Philips this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; this.Features.DeleteMode = DeleteMode.NotSupported; - this.Features.CanSaveAs = false; this.Features.AllowGapsInFavNumbers = false; this.Features.CanEditFavListNames = true;