mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-03-04 03:00:42 +01:00
- 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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user