mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-16 20:32:04 +01:00
- added experimental support for Panasonic - fixed Encrypted-flag detection for Samsung Analog and DVB-C/T channels - text editors now only open after holding the mouse button for 0.5sec - new menu item/button for deleting channels from the right list
26 lines
836 B
C#
26 lines
836 B
C#
using System;
|
|
using System.Text;
|
|
|
|
namespace ChanSort.Loader.Samsung
|
|
{
|
|
internal class SatelliteMapping
|
|
{
|
|
private static readonly Encoding utf16Encoding = new UnicodeEncoding(false, false);
|
|
|
|
private readonly byte[] data;
|
|
public int BaseOffset;
|
|
|
|
public SatelliteMapping(byte[] data, int offset)
|
|
{
|
|
this.data = data;
|
|
this.BaseOffset = offset;
|
|
}
|
|
|
|
public byte MagicMarker { get { return data[BaseOffset]; } }
|
|
public int SatelliteNr { get { return BitConverter.ToInt32(data, BaseOffset + 1); } }
|
|
public string Name { get { return utf16Encoding.GetString(data, BaseOffset + 9, 128).TrimEnd('\0'); } }
|
|
public bool IsEast { get { return BitConverter.ToInt32(data, BaseOffset + 137) != 0; } }
|
|
public int Longitude { get { return BitConverter.ToInt32(data, BaseOffset + 141); } }
|
|
}
|
|
}
|