playlist-decoder 0.10.1

a simple playlist decoder which supports: m3u, pls, asx and xspf
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Extract urls from M3U playlist files

pub struct PlaylistItem {
    pub url: String,
}

pub fn decode(content: &str) -> Vec<PlaylistItem> {
    let lines = content.lines();
    let mut list = vec![];
    for line in lines {
        if line.starts_with("#") {
            continue;
        }

        list.push(PlaylistItem{url:String::from(line)});
    }
    list
}