- added support for 2016 Hisense channels.db SQLite file format

- DevExpress upgrade
This commit is contained in:
hbeham
2016-04-16 20:01:51 +02:00
parent 845c1c44c1
commit 2b938edd88
26 changed files with 1006 additions and 398 deletions

View File

@@ -409,15 +409,24 @@ namespace ChanSort.Api
/// </summary>
/// <param name="channelList"></param>
/// <param name="favCount">Number of favorite lists (i=0..favCount-1)</param>
public static void SequentializeFavPos(ChannelList channelList, int favCount)
{
/// <returns>true if there were any changes</returns>
public static bool SequentializeFavPos(ChannelList channelList, int favCount)
{
bool changed = false;
for (int fav = 0; fav < favCount; fav++)
{
var list = channelList.Channels.Where(c => c.FavIndex[fav] >= 0).OrderBy(c => c.FavIndex[fav]).ToList();
int i = 0;
int i = 1;
foreach (var channel in list)
channel.FavIndex[fav] = ++i;
{
if (channel.FavIndex[fav] != i)
{
channel.FavIndex[fav] = ++i;
changed = true;
}
}
}
return changed;
}
#endregion