if (resultLAVF.Success)
// check for LAVF response format, e.g.:
// S: Title [Lang] (Info) when only Language in stream -> answer is S: Lang -> start to detect if [lang] is present if not replace Lang by ""
{
string lang_or_title = resultLAVF.Groups[1].Value;
string lang = resultLAVF.Groups[2].Value;
string info = resultLAVF.Groups[3].Value;
if (!string.IsNullOrEmpty(info))
{
if (!string.IsNullOrEmpty(lang))
{
streamName = "" + lang_or_title + " [" + info + "]";
}
else
{
streamName = info;
}
}
else if (string.IsNullOrEmpty(info))
{
streamName = regex.Replace(streamName, "").Trim();
}
}