From 46e87b8691aca1bef0b0335c9cc08dc6c2c9c66f Mon Sep 17 00:00:00 2001 From: hbeham Date: Mon, 19 Aug 2013 13:49:30 +0200 Subject: [PATCH] - ignore GlobalClone*.tll - fixes for Samsung B-series - unhandled exception handling --- ChanSort.Loader.LG/TllFileSerializerPlugin.cs | 2 +- .../ChanSort.Loader.Samsung.ini | 4 ++-- ChanSort.Loader.Samsung/DigitalChannel.cs | 4 ++++ ChanSort/MainForm.cs | 4 +++- ChanSort/Program.cs | 22 +++++++++++++++++++ readme.txt | 17 +++++++++++--- 6 files changed, 46 insertions(+), 7 deletions(-) diff --git a/ChanSort.Loader.LG/TllFileSerializerPlugin.cs b/ChanSort.Loader.LG/TllFileSerializerPlugin.cs index 947f26f..21fab0c 100644 --- a/ChanSort.Loader.LG/TllFileSerializerPlugin.cs +++ b/ChanSort.Loader.LG/TllFileSerializerPlugin.cs @@ -5,7 +5,7 @@ namespace ChanSort.Loader.LG public class TllFileSerializerPlugin : ISerializerPlugin { public string PluginName { get { return "LG-Electronics *.tll"; } } - public string FileFilter { get { return "*.TLL"; } } + public string FileFilter { get { return "xx*.TLL"; } } #region CreateSerializer() public SerializerBase CreateSerializer(string inputFile) diff --git a/ChanSort.Loader.Samsung/ChanSort.Loader.Samsung.ini b/ChanSort.Loader.Samsung/ChanSort.Loader.Samsung.ini index 942e158..df96d24 100644 --- a/ChanSort.Loader.Samsung/ChanSort.Loader.Samsung.ini +++ b/ChanSort.Loader.Samsung/ChanSort.Loader.Samsung.ini @@ -127,8 +127,8 @@ offVideoPid = 2 offPcrPid = 4 offServiceId = 10 - offDeleted = 8 - maskDeleted = 0x01 + offDeleted = 7 + maskDeleted = 0x20 offQam = 7 offServiceType = 9 offEncrypted = 23 diff --git a/ChanSort.Loader.Samsung/DigitalChannel.cs b/ChanSort.Loader.Samsung/DigitalChannel.cs index 2ca9df7..de43433 100644 --- a/ChanSort.Loader.Samsung/DigitalChannel.cs +++ b/ChanSort.Loader.Samsung/DigitalChannel.cs @@ -14,6 +14,10 @@ namespace ChanSort.Loader.Samsung var signalSource = SignalSource.Digital; signalSource |= isCable ? SignalSource.Cable : SignalSource.Antenna; this.InitCommonData(slot, signalSource, data); + + if (this.OldProgramNr == 0) + return; + this.InitDvbData(data); int transp = data.GetByte(_ChannelOrTransponder); diff --git a/ChanSort/MainForm.cs b/ChanSort/MainForm.cs index 634848a..a001b45 100644 --- a/ChanSort/MainForm.cs +++ b/ChanSort/MainForm.cs @@ -25,7 +25,7 @@ namespace ChanSort.Ui { public partial class MainForm : XtraForm { - public const string AppVersion = "v2013-07-22"; + public const string AppVersion = "v2013-??-??"; private const int MaxMruEntries = 5; @@ -1302,6 +1302,8 @@ namespace ChanSort.Ui this.miTvSettings.Enabled = this.currentTvSerializer != null; this.miCleanupChannels.Visibility = this.currentTvSerializer != null && this.currentTvSerializer.Features.CleanUpChannelData ? BarItemVisibility.Always : BarItemVisibility.Never; + + this.txtSetSlot.Enabled = mayEdit; } #endregion diff --git a/ChanSort/Program.cs b/ChanSort/Program.cs index aabb30b..e6efc71 100644 --- a/ChanSort/Program.cs +++ b/ChanSort/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Threading; using System.Windows.Forms; namespace ChanSort.Ui @@ -12,11 +13,32 @@ namespace ChanSort.Ui { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + Application.ThreadException += Application_ThreadException; + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); do { ChangeLanguage = false; Application.Run(new MainForm()); } while (ChangeLanguage); } + + private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + { + HandleException(e.Exception); + } + + private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + HandleException(e.ExceptionObject as Exception); + } + + private static void HandleException(Exception ex) + { + MessageBox.Show( + "Bei der Programmausführung trat folgender Fehler auf:\n" + (ex == null ? "(null)" : ex.ToString()), + "Fehler bei Programmausführung", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } } diff --git a/readme.txt b/readme.txt index 12b0b6b..d3aa786 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,11 @@ -Version v2013-07-23 ====================================================== +Version v2013-08-19 ====================================================== Changes: -- Added support for LG LT-series (tested with xxLT380H) +- Fixed loading Samsung B-series channel lists +- Changed file filter for LG to "xx*.TLL" to exclude the GlobalClone*.TLL + files of LA and LN series. +- Fixed "New version available" info screen +- Improved error handling The complete change log can be found at the end of this document @@ -42,7 +46,7 @@ Samsung LG ------ - Series: CS, DM, LA, LD, LE, LH, LK, LM*, LN, LS, LV, LW, LX, PM, PT + Series: CS, DM, LA, LD, LE, LH, LK, LM*, LN, LS, LT, LV, LW, LX, PM, PT Lists: Analog TV, DTV (DVB-C, DVB-T), Radio (DVB-C/T), Sat-DTV (DVB-S2), Sat-Radio (DVB-S2) @@ -107,6 +111,13 @@ OTHER DEALINGS IN THE SOFTWARE. Change log ================================================================ +2013-08-19 +- Fixed loading Samsung B-series channel lists +- Changed file filter for LG to "xx*.TLL" to exclude the GlobalClone*.TLL + files of LA and LN series. +- Fixed "New version available" info screen +- Improved error handling + 2013-07-23 - Added support for LG LT-series (tested with xxLT380H)