- Philips ChannelMap_45: TV did not remember last selected favorite list when first fav list was created by ChanSort.

- Philips ChannelMap_100 and later: "Channel" XML elements inside the DVB*.xml files are now reordered by program nr.
- Philips ChannelMap_105 and 110: fixed saving favorite lists (keeping FavoriteNumber="0" in DVB*.xml and only
  setting the numbers in Favorites.xml)
- m3u: keep original end-of-line characters (CRLF or LF)
- m3u: detect whether channel names are prefixed with a program number or not, and save the file in the same way.
This commit is contained in:
Horst Beham
2021-02-24 11:05:47 +01:00
parent fb37239685
commit bc4b650f20
6 changed files with 182 additions and 81 deletions

View File

@@ -90,6 +90,20 @@ namespace ChanSort.Api
}
#endregion
#region GetBool()
public bool GetBool(string key, bool defaultValue = false)
{
var val = GetString(key)?.ToLowerInvariant();
if (val == null)
return defaultValue;
if (val == "false" || val == "off" || val == "no" || val == "0")
return false;
if (val == "true" || val == "on" || val == "yes" || val == "1")
return true;
return defaultValue;
}
#endregion
#region ParseNumber()
private int ParseNumber(string value)
{