Documentation
¶
Overview ¶
Package rockbox provides functionality to parse Rockbox database files
Index ¶
- Constants
- type DefaultLogger
- type Logger
- type NumericTagData
- type Parser
- func (p *Parser) EnsurePlaylistDir() error
- func (p *Parser) GetPath() string
- func (p *Parser) GetPlaylistPath() string
- func (p *Parser) GetStatus() *models.ParseStatus
- func (p *Parser) Parse(ctx context.Context) ([]*models.Song, error)
- func (p *Parser) SetPath(path string)
- func (p *Parser) ValidatePath() error
- type TagType
Constants ¶
View Source
const ( // TagCacheDir is the directory containing Rockbox database files TagCacheDir = ".rockbox" // DatabaseFile is the main database index file DatabaseFile = "database_idx.tcd" // TagCacheMagic is the magic number for TagCache files TagCacheMagic = 0x54434801 // "TCH\x01" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct{}
DefaultLogger provides a simple console logger
func (*DefaultLogger) Debug ¶
func (l *DefaultLogger) Debug(msg string, args ...interface{})
func (*DefaultLogger) Error ¶
func (l *DefaultLogger) Error(msg string, args ...interface{})
func (*DefaultLogger) Info ¶
func (l *DefaultLogger) Info(msg string, args ...interface{})
type Logger ¶
type Logger interface {
Info(msg string, args ...interface{})
Error(msg string, args ...interface{})
Debug(msg string, args ...interface{})
}
Logger interface for logging parse operations
type NumericTagData ¶
type NumericTagData struct {
Year int
DiscNumber int
TrackNumber int
Bitrate int
Length int
PlayCount int
Rating int
LastPlayed int64
}
NumericTagData holds numeric tag values for a song
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles parsing of Rockbox database files
func (*Parser) EnsurePlaylistDir ¶
EnsurePlaylistDir ensures the playlist directory exists
func (*Parser) GetPlaylistPath ¶
GetPlaylistPath returns the path for playlists in the Rockbox device
func (*Parser) GetStatus ¶
func (p *Parser) GetStatus() *models.ParseStatus
GetStatus returns the current parse status
func (*Parser) ValidatePath ¶
ValidatePath checks if the Rockbox path is valid
Click to show internal directories.
Click to hide internal directories.