Documentation
¶
Index ¶
- func BuildArchivePath(scheme, archivePath, inner string) string
- func EntryExt(value string) string
- func IsArchivePath(value string) bool
- func IsAudio(path string) bool
- func OpenArchiveRoot(path string) (string, bool)
- func SplitArchivePath(value string) (scheme, archivePath, inner string, err error)
- type ArchiveEntry
- type ArchiveHandler
- type ArchiveRegistry
- type Entry
- type Metadata
- type Picture
- type TrackInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArchivePath ¶ added in v0.9.3
BuildArchivePath builds an archive URI from scheme, archive path, and inner path.
func EntryExt ¶ added in v0.9.3
EntryExt returns the file extension for the entry portion of an archive URI.
func IsArchivePath ¶ added in v0.9.3
IsArchivePath reports whether the value is an archive URI.
func IsAudio ¶
IsAudio reports whether the path is a supported audio file (including archive entries).
func OpenArchiveRoot ¶
OpenArchiveRoot returns an archive URI for the root of the archive if the path is a supported archive file.
func SplitArchivePath ¶ added in v0.9.3
SplitArchivePath parses an archive URI into scheme, archive path, and inner path.
Types ¶
type ArchiveEntry ¶ added in v0.9.3
ArchiveEntry is a single file or directory within an archive.
type ArchiveHandler ¶ added in v0.9.3
type ArchiveHandler interface {
Scheme() string
IsArchivePath(path string) bool
List(path string, showHidden bool) ([]ArchiveEntry, error)
Open(path string) (io.ReadCloser, error)
}
ArchiveHandler manages a specific archive format (zip, tar, etc.).
func NewRarHandler ¶ added in v0.9.3
func NewRarHandler() ArchiveHandler
func NewSevenZipHandler ¶ added in v0.9.3
func NewSevenZipHandler() ArchiveHandler
func NewTarGzHandler ¶ added in v0.9.3
func NewTarGzHandler() ArchiveHandler
func NewTarHandler ¶ added in v0.9.3
func NewTarHandler() ArchiveHandler
func NewTarXzHandler ¶ added in v0.9.3
func NewTarXzHandler() ArchiveHandler
func NewZipHandler ¶ added in v0.9.3
func NewZipHandler() ArchiveHandler
type ArchiveRegistry ¶ added in v0.9.3
type ArchiveRegistry struct {
// contains filtered or unexported fields
}
ArchiveRegistry is a collection of archive handlers.
func DefaultArchiveRegistry ¶ added in v0.9.3
func DefaultArchiveRegistry() *ArchiveRegistry
DefaultArchiveRegistry returns the shared registry of built-in handlers.
func (*ArchiveRegistry) FindHandler ¶ added in v0.9.3
func (r *ArchiveRegistry) FindHandler(path string) ArchiveHandler
FindHandler returns a handler that recognizes the path.
func (*ArchiveRegistry) Register ¶ added in v0.9.3
func (r *ArchiveRegistry) Register(handler ArchiveHandler)
Register adds a handler. Later handlers are checked after earlier ones.
type Metadata ¶
type Metadata struct {
Artist string
Title string
Album string
AlbumArtist string
Composer string
Genre string
Year int
Comment string
Lyrics string
Duration time.Duration
Picture *Picture
}
Metadata captures audio tags for display.
func ReadMetadataBasic ¶
ReadMetadataBasic reads basic audio tags (artist/title/album).
func ReadMetadataExtended ¶
ReadMetadataExtended reads all supported audio tags (including artwork).