public static bool IsSupported(StreamReader reader) { var line = reader.ReadLine(); if (line == null) { return(false); } line = line.Trim(); if (line == "#EXTM3U") { return(true); } if (line.StartsWith("http")) { return(true); } if (LocalTrack.IsSupported(new FileInfo(line))) { return(true); } return(false); }
// simple check using file extension bool IsFileSupported(string filePath) { return(LocalTrack.IsSupported(new FileInfo(filePath)) || Playlists.IsSupported(filePath)); }
public static bool IsSupported(StreamReader reader) { var line = reader.ReadLine(); if (line == null) { return(false); } line = line.Trim(); return(line.StartsWith("REM") || line.StartsWith("PERFORMER") || line.StartsWith("TITLE") || line.StartsWith("FILE") || line.StartsWith("CATALOG") || LocalTrack.IsSupported(new FileInfo(line))); }