mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-03-06 12:10:42 +01:00
- support for individually sorted favorite lists (Panasonic, Samsung E+F)
- FIX: "insert after" when dropping a channel from right list
This commit is contained in:
@@ -71,12 +71,16 @@ namespace ChanSort.Loader.Samsung
|
||||
// series D,E,F
|
||||
byte fav = 0;
|
||||
byte mask = 0x01;
|
||||
int favIndex = 0;
|
||||
foreach (int off in offsets)
|
||||
{
|
||||
int favValue = BitConverter.ToInt32(this.rawData, baseOffset + off);
|
||||
if (sortedFavorites && favValue != -1 || !sortedFavorites && favValue != 0)
|
||||
fav |= mask;
|
||||
if (sortedFavorites)
|
||||
this.FavIndex[favIndex] = favValue;
|
||||
mask <<= 1;
|
||||
++favIndex;
|
||||
}
|
||||
return (Favorites) fav;
|
||||
}
|
||||
@@ -135,15 +139,17 @@ namespace ChanSort.Loader.Samsung
|
||||
// series D,E,F
|
||||
byte fav = (byte)this.Favorites;
|
||||
byte mask = 0x01;
|
||||
int favIndex = 0;
|
||||
foreach (int off in offsets)
|
||||
{
|
||||
int favValue;
|
||||
if (this.sortedFavorites)
|
||||
favValue = (fav & mask) != 0 ? this.NewProgramNr : -1;
|
||||
favValue = (fav & mask) != 0 ? this.FavIndex[favIndex] : -1;
|
||||
else
|
||||
favValue = (fav & mask) != 0 ? 1 : 0;
|
||||
Array.Copy(BitConverter.GetBytes(favValue), 0, this.rawData, baseOffset + off, 4);
|
||||
mask <<= 1;
|
||||
++favIndex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -92,6 +92,7 @@ namespace ChanSort.Loader.Samsung
|
||||
{
|
||||
DetectModelConstants(zip);
|
||||
DataRoot.SupportedFavorites = c.supportedFavorites;
|
||||
DataRoot.SortedFavorites = c.SortedFavorites;
|
||||
|
||||
ReadAnalogFineTuning(zip);
|
||||
ReadAnalogChannels(zip, "map-AirA", this.avbtChannels, out this.avbtFileContent, this.avbtFrequency);
|
||||
|
||||
Reference in New Issue
Block a user