From d9a252a97be776a61ade5fd47c8ce1b0eed4e1d2 Mon Sep 17 00:00:00 2001 From: hbeham Date: Thu, 16 Nov 2017 11:26:50 +0100 Subject: [PATCH] - fixed favorites for Samsung J and later series --- source/ChanSort.Api/Model/DataRoot.cs | 1 + source/ChanSort.Loader.SamsungJ/DbChannel.cs | 3 --- source/ChanSort.Loader.SamsungJ/DbSerializer.cs | 8 +++----- source/ChanSort/Properties/licenses.licx | 6 ++++++ source/changelog.md | 4 ++++ 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/source/ChanSort.Api/Model/DataRoot.cs b/source/ChanSort.Api/Model/DataRoot.cs index 65e902e..025035a 100644 --- a/source/ChanSort.Api/Model/DataRoot.cs +++ b/source/ChanSort.Api/Model/DataRoot.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Text; +using System.Linq; namespace ChanSort.Api { diff --git a/source/ChanSort.Loader.SamsungJ/DbChannel.cs b/source/ChanSort.Loader.SamsungJ/DbChannel.cs index fcdb318..a0b9473 100644 --- a/source/ChanSort.Loader.SamsungJ/DbChannel.cs +++ b/source/ChanSort.Loader.SamsungJ/DbChannel.cs @@ -6,9 +6,6 @@ namespace ChanSort.Loader.SamsungJ { internal class DbChannel : ChannelInfo { - internal List OriginalFavIndex = new List { -1, -1, -1, -1 , -1 }; - internal Favorites OriginalFavs; - #region ctor() internal DbChannel(SQLiteDataReader r, IDictionary field, DataRoot dataRoot, Dictionary providers, Satellite sat, Transponder tp) { diff --git a/source/ChanSort.Loader.SamsungJ/DbSerializer.cs b/source/ChanSort.Loader.SamsungJ/DbSerializer.cs index f862256..210eea2 100644 --- a/source/ChanSort.Loader.SamsungJ/DbSerializer.cs +++ b/source/ChanSort.Loader.SamsungJ/DbSerializer.cs @@ -373,8 +373,7 @@ namespace ChanSort.Loader.SamsungJ if (pos >= 0) { channel.Favorites |= (Favorites) (1 << fav); - channel.OriginalFavs = channel.Favorites; - channel.FavIndex[fav] = channel.OriginalFavIndex[fav] = pos + 1; + channel.FavIndex[fav] = channel.OldFavIndex[fav] = pos + 1; } } } @@ -540,7 +539,7 @@ namespace ChanSort.Loader.SamsungJ // update favorites for (int i=0, mask=1; i<5; i++, mask <<= 1) { - int oldPos = channel.OriginalFavIndex[i]; + int oldPos = channel.OldFavIndex[i]; int newPos = ((int)channel.Favorites & mask) != 0 ? channel.FavIndex[i] : -1; if (newPos >= 0) @@ -558,9 +557,8 @@ namespace ChanSort.Loader.SamsungJ cmdDeleteFav.ExecuteNonQuery(); } - channel.OriginalFavIndex[i] = channel.FavIndex[i] = newPos; + channel.OldFavIndex[i] = channel.FavIndex[i] = newPos; } - channel.OriginalFavs = channel.Favorites; } } #endregion diff --git a/source/ChanSort/Properties/licenses.licx b/source/ChanSort/Properties/licenses.licx index e69de29..d3c5dcd 100644 --- a/source/ChanSort/Properties/licenses.licx +++ b/source/ChanSort/Properties/licenses.licx @@ -0,0 +1,6 @@ +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v17.1, Version=17.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/source/changelog.md b/source/changelog.md index b18810c..5848221 100644 --- a/source/changelog.md +++ b/source/changelog.md @@ -1,6 +1,10 @@ ChanSort Change Log =================== +2017-11-13 +- Samsung .zip: fixed loading/saving of favorites A-E + + 2017-10-29 - Show popup with download link for MS Visual C++ 2010 x86 Redist (this package is needed to open lists with a SQLite file format)