- added support for user-defined favorite list names within each channel list (antenna, cable, sat, ....)

- fixed bug saving wrong audioPid values in LG WebOS 4 XML/JSON files
This commit is contained in:
Horst Beham
2021-04-11 13:17:53 +02:00
parent a75d219026
commit 2e22005fe1
11 changed files with 80 additions and 58 deletions

View File

@@ -254,27 +254,5 @@ namespace ChanSort.Api
}
}
#endregion
#region Get/SetFavListCaption()
private readonly Dictionary<int,string> favListCaptions = new Dictionary<int, string>();
public void SetFavListCaption(int favIndex, string caption)
{
favListCaptions[favIndex] = caption;
}
public string GetFavListCaption(int favIndex, bool asTabCaption = false)
{
if (favIndex < 0)
return "";
var hasCaption = favListCaptions.TryGetValue(favIndex, out var caption);
if (!asTabCaption)
return caption;
var letter = favIndex < 26 ? ((char)('A' + favIndex)).ToString() : (favIndex + 1).ToString();
return hasCaption && !string.IsNullOrEmpty(caption) ? letter + ": " + caption : "Fav " + letter;
}
#endregion
}
}