m3uplus

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package m3uplus provides a M3U Plus parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Playlist

type Playlist struct {
	Tracks []Track
}

Playlist is a type that represents an m3u playlist containing 0 or more tracks

func Decode

func Decode(r io.Reader) (*Playlist, error)

Decode parses an m3u playlist in the given io.Reader and returns a Playlist

type Track

type Track struct {
	Name       string
	Length     float64
	URI        string
	Tags       map[string]string
	Raw        string
	LineNumber int
}

Track represents an m3u track

func (*Track) UnmarshalTags

func (t *Track) UnmarshalTags(v interface{}) error

UnmarshalTags will decode the Tags map into a struct containing fields with `m3u` tags matching map keys.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL