Documentation
¶
Index ¶
- Variables
- func DBAvailable() bool
- func GetTagGraph() map[string][]string
- func Init(path, url string) error
- func ParseTagStr(str string) (*string, string)
- func Read(p string) error
- type AlbumDetails
- type AlbumIdentifier
- type AlbumInfo
- type Artists
- type DiscDetails
- type DiscIdentifier
- type DiscInfo
- type ExportedAlbumInfo
- type ExportedDiscInfo
- type ExportedPlaylist
- type ExportedPlaylistInfo
- type ExportedToken
- type ExportedTrackList
- type Tag
- type TagSet
- type TrackDetail
- type TrackIdentifier
- type TrackInfo
- type TrackInfoWithAlbum
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DBAvailable ¶
func DBAvailable() bool
func GetTagGraph ¶
func ParseTagStr ¶
Types ¶
type AlbumDetails ¶
type AlbumDetails struct { AlbumInfo Artists *Artists `json:"artists,omitempty" toml:"artists"` Tags []string `json:"tags" toml:"tags"` Discs []*DiscDetails `json:"discs" toml:"discs"` }
func GetAlbumDetails ¶
func GetAlbumDetails(id string) (AlbumDetails, bool)
func GetAlbums ¶
func GetAlbums() []AlbumDetails
func GetAlbumsByTag ¶
func GetAlbumsByTag(tag string, recursive bool) ([]AlbumDetails, bool)
func SearchAlbums ¶
func SearchAlbums(keyword string) []AlbumDetails
type AlbumIdentifier ¶
type AlbumIdentifier string
type AlbumInfo ¶
type AlbumInfo struct { AlbumID AlbumIdentifier `json:"album_id" toml:"album_id"` Title string `json:"title" toml:"title"` Edition *string `json:"edition,omitempty" toml:"edition"` Catalog string `json:"catalog" toml:"catalog"` Artist string `json:"artist" toml:"artist"` Date string `json:"date" toml:"date"` Type string `json:"type" toml:"type"` }
type DiscDetails ¶
type DiscDetails struct { DiscInfo Artists *Artists `json:"artists,omitempty" toml:"artists"` Tags []string `json:"tags,omitempty" toml:"tags"` Tracks []*TrackDetail `json:"tracks" toml:"tracks"` }
type DiscIdentifier ¶
type DiscIdentifier struct { AlbumID AlbumIdentifier `json:"album_id" mapstructure:"album_id"` DiscID uint `json:"disc_id" mapstructure:"disc_id"` }
type ExportedAlbumInfo ¶
type ExportedAlbumInfo struct { AlbumInfo Discs []ExportedDiscInfo `json:"discs"` }
func ExportAlbumInfo ¶
func ExportAlbumInfo(album AlbumDetails) ExportedAlbumInfo
type ExportedDiscInfo ¶
type ExportedPlaylist ¶
type ExportedPlaylist struct { ExportedPlaylistInfo Tokens []ExportedToken `json:"tokens"` Metadata map[AlbumIdentifier]ExportedAlbumInfo `json:"metadata"` }
type ExportedPlaylistInfo ¶
type ExportedPlaylistInfo struct { Name string `json:"name"` Description string `json:"description"` Cover *DiscIdentifier `json:"cover"` Songs []ExportedTrackList `json:"songs"` }
type ExportedToken ¶
type ExportedTrackList ¶
type ExportedTrackList struct { DiscIdentifier Tracks []uint `json:"tracks"` }
type Tag ¶
type Tag struct { Name string `json:"name" toml:"name"` Type string `json:"type" toml:"type"` Names map[string]string `json:"names" toml:"names"` // contains filtered or unexported fields }
func TagFromStr ¶
func (*Tag) AddAlbum ¶
func (tag *Tag) AddAlbum(album *AlbumDetails)
func (*Tag) GetAlbums ¶
func (tag *Tag) GetAlbums(recursive bool) []AlbumDetails
type TagSet ¶
type TagSet struct {
// contains filtered or unexported fields
}
func (*TagSet) ExpandTagsDef ¶
func (set *TagSet) ExpandTagsDef(album *AlbumDetails) error
type TrackDetail ¶
type TrackIdentifier ¶
type TrackIdentifier struct { DiscIdentifier `mapstructure:",squash"` TrackID uint `json:"track_id" mapstructure:"track_id"` }
func (*TrackIdentifier) Scan ¶
func (trackId *TrackIdentifier) Scan(src interface{}) error
type TrackInfoWithAlbum ¶
type TrackInfoWithAlbum struct { TrackIdentifier TrackInfo AlbumTitle string `json:"album_title"` }
func GetTrackInfo ¶
func GetTrackInfo(id TrackIdentifier) TrackInfoWithAlbum
func SearchTracks ¶
func SearchTracks(keyword string) []TrackInfoWithAlbum
Click to show internal directories.
Click to hide internal directories.