Skip to content
Simple library for reading and writing playlist's files. Supported formats: m3u, pls, wpl, zpl.
C# Zimpl PLSQL
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
PlaylistsNET.Tests
PlaylistsNET update nuget Apr 25, 2020
.gitattributes
.gitignore Add .gitignore and .gitattributes. Apr 7, 2018
LICENSE
PlaylistsNET.sln Add project files. Apr 7, 2018
README.md Update README.md Apr 11, 2018

README.md

PlaylistsNET

Simple library for reading and writing playlist's files. Supported formats: m3u, pls, wpl, zpl.

Examples

Read

WplContent content = new WplContent();
WplPlaylist playlist = content.GetFromStream(stream);
// or
var parser = PlaylistParserFactory.GetPlaylistParser(".wpl");
IBasePlaylist playlist = parser.GetFromStream(stream);

List<string> paths = playlist.GetTracksPaths();

Save

M3uPlaylist playlist = new M3uPlaylist();
playlist.IsExtended = true;
playlist.PlaylistEntries.Add(new M3uPlaylistEntry()
{
    Album = "New album",
    AlbumArtist = "",
    Duration = TimeSpan.FromSeconds(175),
    Path = @"C:\Music\song.mp3",
    Title = "Track Title"
});

M3uContent content = new M3uContent();
string text = content.ToText(playlist);
// or
string text = PlaylistToTextHelper.ToText(playlist);

/*
#EXTM3U
#EXTALB:New album
#EXTINF:175,Track Title
C:\Music\song.mp3
*/
You can’t perform that action at this time.