Documentation ¶
Index ¶
- Constants
- Variables
- func SetCacheStore(store CacheStore)
- type Album
- type AlbumNameSource
- type BadgerCacheStore
- type CDDB1
- type CDDB1Source
- type CacheStore
- type CachingClient
- type CatalogNumber
- type CatalogSource
- type Disc
- type DiscID
- type DiscIDSource
- type LRCLyricTextEntry
- type LRCLyrics
- type License
- type LicenseCode
- type Link
- type LinkSlice
- type LyricGetter
- type Lyrics
- type LyricsFormat
- type Name
- type NameSlice
- func (s NameSlice) AnyMatch(name NameSlice) bool
- func (s NameSlice) Exists(name Name) int
- func (s NameSlice) GetKind(kind string) (result []string)
- func (s NameSlice) MarshalJSON() ([]byte, error)
- func (s NameSlice) Match(name string) int
- func (s NameSlice) Merge(o NameSlice) (r NameSlice)
- func (s NameSlice) Normalize()
- type Role
- type RoleSlice
- type SourceMetadata
- type TOC
- func (t TOC) CDDBString() string
- func (t TOC) CTDBString() string
- func (t TOC) Equals(o TOC) bool
- func (t TOC) GetAccurateRipData() (byte, uint32, uint32, CDDB1)
- func (t TOC) GetCDDB1() CDDB1
- func (t TOC) GetDiscID() DiscID
- func (t TOC) GetDuration() time.Duration
- func (t TOC) GetTocID() TocID
- func (t TOC) GetTrackDuration(index int) time.Duration
- func (t TOC) GetTrackNumber() int
- func (t TOC) MusicBrainzString() string
- func (t TOC) String() string
- type TOCSource
- type TextLyrics
- type TocID
- type TocIDSource
- type Track
Constants ¶
View Source
const BytesPerSector = 2352
View Source
const CDChannels = 2
View Source
const CDSampleRate = Int16SamplesPerSector * SectorsPerSecond
View Source
const DataTrackGap = 11400
View Source
const DiscIDSize = 28
View Source
const Int16SamplesPerSector = BytesPerSector / (2 * CDChannels)
View Source
const SectorsPerSecond = 75
View Source
const TocIDSize = 28
View Source
const TocPregap = 150
Variables ¶
View Source
var DefaultUserAgent = fmt.Sprintf("Mozilla/5.0 (compatible; METANOIA/%s; +https://git.gammaspectra.live/S.O.N.G/METANOIA) golang/%s (%s; %s; net/http; %s)", utilities.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH, runtime.Compiler)
DefaultUserAgent Follows most identification rules (Like for Musicbrainz, or Discogs)
Functions ¶
func SetCacheStore ¶
func SetCacheStore(store CacheStore)
Types ¶
type Album ¶
type AlbumNameSource ¶
type AlbumNameSource interface { SourceMetadata FindByAlbumNames(names []Name) []*Album }
type BadgerCacheStore ¶
type BadgerCacheStore struct {
// contains filtered or unexported fields
}
func NewBadgerCacheStore ¶
func NewBadgerCacheStore(path string) (*BadgerCacheStore, error)
type CDDB1 ¶
type CDDB1 uint32
func NewCDDB1FromString ¶
func (CDDB1) GetDuration ¶
func (CDDB1) GetStartTimeChecksum ¶
func (CDDB1) GetTrackNumber ¶
type CDDB1Source ¶
type CacheStore ¶
type CachingClient ¶
type CachingClient struct {
// contains filtered or unexported fields
}
func NewCachingClient ¶
func NewCachingClient(context string, rateLimit time.Duration) *CachingClient
type CatalogNumber ¶
type CatalogNumber string
type CatalogSource ¶
type CatalogSource interface { SourceMetadata FindByCatalogNumber(catalog CatalogNumber) []*Album }
type DiscIDSource ¶
type LRCLyricTextEntry ¶
type LRCLyrics ¶
type LRCLyrics struct { Language string Identifiers []Name Entries []LRCLyricTextEntry }
func NewLRCLyrics ¶
func (*LRCLyrics) GetContent ¶
func (*LRCLyrics) GetFormat ¶
func (l *LRCLyrics) GetFormat() LyricsFormat
func (*LRCLyrics) GetIdentifiers ¶
func (*LRCLyrics) GetLanguage ¶
type License ¶
type License struct { Attribution string Code LicenseCode URL string }
type LicenseCode ¶
type LicenseCode string
const ( Unknown LicenseCode = "Unknown" NC LicenseCode = "NonCommercial" CC0 LicenseCode = "CC0" CC_BY_NC_SA_30 LicenseCode = "CC BY-NC-SA 3.0" CC_BY_SA_40 LicenseCode = "CC BY-SA 4.0" )
type LyricGetter ¶
type LyricGetter func() []Lyrics
type Lyrics ¶
type Lyrics interface { GetFormat() LyricsFormat GetIdentifiers() []Name GetLanguage() string GetContent() string }
type LyricsFormat ¶
type LyricsFormat string
const ( ASS LyricsFormat = "ASS" LRC LyricsFormat = "LRC" WebVTT LyricsFormat = "WebVTT" SubRip LyricsFormat = "SubRip" Text LyricsFormat = "Text" )
type Name ¶
type SourceMetadata ¶
type TOC ¶
type TOC []int
TOC includes a list, index 0 being total sectors/end, then start times follow, with TocPregap added
func NewTOCFromCTDB2String ¶
func NewTOCFromCTDBString ¶
func NewTOCFromString ¶
func (TOC) CDDBString ¶
func (TOC) CTDBString ¶
func (TOC) GetDuration ¶
func (TOC) GetTrackNumber ¶
func (TOC) MusicBrainzString ¶
type TOCSource ¶
type TOCSource interface { SourceMetadata FindByTOC(toc TOC) []*Album }
type TextLyrics ¶
func (*TextLyrics) GetContent ¶
func (l *TextLyrics) GetContent() string
func (*TextLyrics) GetFormat ¶
func (l *TextLyrics) GetFormat() LyricsFormat
func (*TextLyrics) GetIdentifiers ¶
func (l *TextLyrics) GetIdentifiers() []Name
func (*TextLyrics) GetLanguage ¶
func (l *TextLyrics) GetLanguage() string
type TocIDSource ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.