Support local file paths for M3U playlists; UI tweaks
Added support for loading M3U playlists from both web URLs and local file paths, with logic to resolve relative paths. Improved exception handling in M3UParser. Enabled toggling of window border style in fullscreen mode, with data binding for WindowStyle. Removed IsValidUrl check to allow local file sources in settings. Cleaned up usings and formatting. Removed .NET SDK version from global.json.
This commit is contained in:
@@ -221,6 +221,7 @@ namespace TV_Player
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
using var client = new HttpClient();
|
||||
using var request = new HttpRequestMessage();
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/text"));
|
||||
@@ -240,6 +241,11 @@ namespace TV_Player
|
||||
System.Diagnostics.Debug.WriteLine($"Invalid URL: {url} - {ex.Message}");
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"Error reading file from {url}: {ex.Message}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<(List<M3UInfo> programList, string programGuide)> DownloadM3UFromWebAsync(string url)
|
||||
|
||||
Reference in New Issue
Block a user