mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-03-22 19:51:32 +01:00
- Panasonic LS 500 / LX 700 series: support for new firmware which doesn't export a hotel.bin file.
- Loewe servicelist.xml (and maybe some other .xml files) larger than 2 000 000 bytes were not loaded. - Enigma/Linux lists can now also be opened by selecting a .tv or .radio file (not just lamedb)
This commit is contained in:
@@ -16,7 +16,7 @@ namespace ChanSort.Loader.Panasonic;
|
||||
* Serializer for the 2022/2023 Android based Panasonic LS 500, LX 700 series file format
|
||||
*
|
||||
* The format uses a directory tree with
|
||||
* /hotel.bin (irrelevant content)
|
||||
* /hotel.bin (irrelevant content, no longer exists after a firmware update in 2023)
|
||||
* /mnt/vendor/tvdata/database/tv.db Sqlite database
|
||||
* /mnt/vendor/tvdata/database/channel/idtvChannel.bin
|
||||
*
|
||||
@@ -148,9 +148,9 @@ internal class IdtvChannelSerializer : SerializerBase
|
||||
private readonly StringBuilder log = new();
|
||||
|
||||
#region ctor()
|
||||
public IdtvChannelSerializer(string hotelBin) : base(hotelBin)
|
||||
public IdtvChannelSerializer(string tvDb) : base(tvDb)
|
||||
{
|
||||
var dir = Path.Combine(Path.GetDirectoryName(hotelBin), "mnt/vendor/tvdata/database");
|
||||
var dir = Path.GetDirectoryName(tvDb);
|
||||
dbFile = Path.Combine(dir, "tv.db");
|
||||
binFile = Path.Combine(dir, "channel", "idtvChannel.bin");
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ namespace ChanSort.Loader.Panasonic
|
||||
// check for files in the 2022 /mnt/vendor/tvdata/database/channel/ directory structure file format with tv.db and idtvChannel.bin
|
||||
var name = Path.GetFileName(inputFile).ToLowerInvariant();
|
||||
var baseDir = Path.GetDirectoryName(inputFile);
|
||||
if (name == "idtvchannel.bin")
|
||||
baseDir = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(baseDir))))); // go down channel/database/tvdata/vendor/mnt
|
||||
else if (name == "tv.db")
|
||||
baseDir = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(baseDir)))); // go down database/tvdata/vendor/mnt
|
||||
if (name == "hotel.bin")
|
||||
baseDir = Path.Combine(baseDir, "mnt", "vendor", "tvdata", "database");
|
||||
else if (name == "idtvchannel.bin")
|
||||
baseDir = Path.GetDirectoryName(baseDir); // go down channel/database/tvdata/vendor/mnt
|
||||
|
||||
var hotelBin = Path.Combine(baseDir, "hotel.bin");
|
||||
if (File.Exists(hotelBin) && File.Exists(Path.Combine(baseDir, "mnt/vendor/tvdata/database", "tv.db")) && File.Exists(Path.Combine(baseDir, "mnt/vendor/tvdata/database/channel", "idtvChannel.bin")))
|
||||
return new IdtvChannelSerializer(hotelBin);
|
||||
var tvDb = Path.Combine(baseDir, "tv.db");
|
||||
if (File.Exists(tvDb) && File.Exists(Path.Combine(baseDir, "channel", "idtvChannel.bin")))
|
||||
return new IdtvChannelSerializer(tvDb);
|
||||
|
||||
// Android based models use an .xml format. Unfortunately that format is utter garbage and not really useful
|
||||
var ext = Path.GetExtension(inputFile).ToLowerInvariant();
|
||||
|
||||
Reference in New Issue
Block a user