diff --git a/TV Player WPF/PlaylistWorker/M3UParser.cs b/TV Player WPF/PlaylistWorker/M3UParser.cs index 0cb1371..030d9b0 100644 --- a/TV Player WPF/PlaylistWorker/M3UParser.cs +++ b/TV Player WPF/PlaylistWorker/M3UParser.cs @@ -247,7 +247,7 @@ namespace TV_Player private static bool TryParseM3ULine(string m3uLine, out M3UInfo? info) { info = null; - string pattern = @"#EXTINF:(-?\d+)\s+?(?:timeshift=""(?.*?)""\s+)?(?:catchup-days=""(?.*?)""\s+)?(?:catchup-type=""(?.*?)""\s+)?(?:CUID=""(?.*?)""\s+)?(?:number=""(?.*?)""\s+)?(?:tvg-id=""(?.*?)""\s+)?(?:tvg-name=""(?.*?)""\s+)?(?:group-title=""(?.*?)""\s+)?(?:tvg-logo=""(?.*?)""\s*)?(?:group-title=""(?.*?)"")?(?:,(?.*?)\s*\r?\n(?.*))"; + string pattern = @"#EXTINF:(-?\d+)\s*?(?:timeshift=""(?.*?)""\s+)?(?:catchup-days=""(?.*?)""\s+)?(?:catchup-type=""(?.*?)""\s+)?(?:CUID=""(?.*?)""\s+)?(?:number=""(?.*?)""\s+)?(?:tvg-id=""(?.*?)""\s+)?(?:tvg-name=""(?.*?)""\s+)?(?:group-title=""(?.*?)""\s+)?(?:tvg-logo=""(?.*?)""\s*)?(?:group-title=""(?.*?)"")?(?:,(?.*?)\s*\r?\n(?.*))"; //string pattern = @"#EXTINF:(-?\d+)\s+?(?:timeshift=""(?.*?)""\s+)?(?:catchup-days=""(?.*?)""\s+)?(?:catchup-type=""(?.*?)""\s+)?(?:CUID=""(?.*?)""\s+)?(?:number=""(?.*?)""\s+)?(?:tvg-id=""(?.*?)""\s+)?(?:tvg-name=""(?.*?)""\s+)?(?:group-title=""(?.*?)""\s+)?(?:tvg-logo=""(?.*?)"")?,(?.*?)\s*\r?\n(?.*)"; Regex regex = new Regex(pattern, RegexOptions.IgnoreCase); @@ -260,7 +260,7 @@ namespace TV_Player Number = match.Groups["Number"].Value, TvgID = match.Groups["TvgID"].Value, TvgName = match.Groups["TvgName"].Value, - GroupTitle = match.Groups["GroupTitle"].Value, + GroupTitle = string.IsNullOrEmpty(match.Groups["GroupTitle"].Value)? "undefined":match.Groups["GroupTitle"].Value, Logo = match.Groups["Logo"].Value, Name = match.Groups["Name"].Value, Url = match.Groups["URL"].Value diff --git a/TV Player WPF/PlaylistsGroup.xaml b/TV Player WPF/PlaylistsGroup.xaml index 6e2e17f..db5d20f 100644 --- a/TV Player WPF/PlaylistsGroup.xaml +++ b/TV Player WPF/PlaylistsGroup.xaml @@ -15,7 +15,7 @@ SelectionChanged="ListBox_SelectionChanged"> - + diff --git a/TV Player WPF/ProgramsGroupGrid.xaml b/TV Player WPF/ProgramsGroupGrid.xaml index 236833a..5d45147 100644 --- a/TV Player WPF/ProgramsGroupGrid.xaml +++ b/TV Player WPF/ProgramsGroupGrid.xaml @@ -15,7 +15,7 @@ SelectionChanged="ListBox_SelectionChanged"> - + diff --git a/TV Player WPF/ProgramsList.xaml b/TV Player WPF/ProgramsList.xaml index 3dc3355..b3773a7 100644 --- a/TV Player WPF/ProgramsList.xaml +++ b/TV Player WPF/ProgramsList.xaml @@ -9,13 +9,14 @@ - +