mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-08-31 04:18:10 +02:00
- LG GlobalClone: added support for additional favorites (A-H) and individual fav sorting when supported by the TV
- LG GlobalClone: data/option channels were not listed before and are now shown in the TV channel list - added function to copy list to clipboard (which can then be pasted into Excel or other programs)
This commit is contained in:
@@ -211,6 +211,8 @@ namespace ChanSort.Loader.GlobalClone
|
||||
this.ParseChannelInfoNodes(itemNode, ch);
|
||||
|
||||
var list = this.DataRoot.GetChannelList(ch.SignalSource);
|
||||
if (list == null && (ch.SignalSource & SignalSource.MaskTvRadio) == 0) // Data/Option channels are put in the TV list
|
||||
list = this.DataRoot.GetChannelList(ch.SignalSource | SignalSource.Tv);
|
||||
this.DataRoot.AddChannel(list, ch);
|
||||
}
|
||||
}
|
||||
@@ -315,6 +317,17 @@ namespace ChanSort.Loader.GlobalClone
|
||||
ch.ShortName = shortName;
|
||||
hasHexName = true;
|
||||
break;
|
||||
default:
|
||||
if (info.LocalName.StartsWith("favoriteIdx"))
|
||||
{
|
||||
int n = info.LocalName[11] - 'A';
|
||||
var mask = 1 << n;
|
||||
this.DataRoot.SupportedFavorites |= (Favorites)mask;
|
||||
this.DataRoot.SortedFavorites = true;
|
||||
if (((int)ch.Favorites & mask) != 0) // xml element holds bad index data (250) when fav is not set
|
||||
ch.SetPosition(n + 1, int.Parse(info.InnerText));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,6 +446,16 @@ namespace ChanSort.Loader.GlobalClone
|
||||
if (mapType == "1")
|
||||
node.InnerText = ((int) ch.Favorites).ToString();
|
||||
break;
|
||||
default:
|
||||
if (node.LocalName.StartsWith("favoriteIdx"))
|
||||
{
|
||||
int n = node.LocalName[11] - 'A';
|
||||
var idx = ch.GetPosition(n + 1);
|
||||
if (idx <= 0)
|
||||
idx = 250; // this weird value is used by the TV when the fav is not set
|
||||
node.InnerText = idx.ToString();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user