Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsMusic(directoryPath string) bool
- func GetAllFLACs(directoryPath string) []string
- func GetAllPlaylists(directoryPath string) []string
- func GetFirstFLACFound(directoryPath string) string
- type Release
- func (r *Release) Analyze() error
- func (r *Release) Check() error
- func (r *Release) CheckEncoding() error
- func (r *Release) CheckTags() error
- func (r *Release) CleanTags(removeAllArt bool) error
- func (r *Release) GenerateCombinedSpectrogram() (string, error)
- func (r *Release) GenerateSpectrograms(title string) ([]string, error)
- func (r Release) NumberOfDiscs() int
- func (r *Release) Recompress() error
- func (r *Release) TranscodeTo320(cbr320FolderName string) error
- func (r *Release) TranscodeToV0(v0FolderName string) error
- type Track
- type TrackTags
Constants ¶
const ( FlacExt = ".flac" Mp3Ext = ".mp3" M3uExt = ".m3u" OpusExt = ".opus" JpgExt = ".jpg" )
const (
AdditionalMetadataDir = "Metadata"
)
Variables ¶
var (
ErrorMaxLengthExceeded = errors.New("max length of path exceeds 180 characters")
)
Functions ¶
func ContainsMusic ¶
ContainsMusic returns true if it contains mp3 or flac files.
func GetAllFLACs ¶
GetAllFLACs returns all FLAC files found in a directory
func GetAllPlaylists ¶ added in v0.12.0
GetAllPlaylists returns all m3u files found in a directory
func GetFirstFLACFound ¶
GetFirstFLACFound returns the first FLAC file found in a directory
Types ¶
type Release ¶ added in v0.16.0
Release struct to manipulate a folder containing FLAC files and a cover.
func NewWithExternalMetadata ¶ added in v0.19.4
func (*Release) CheckEncoding ¶ added in v0.18.0
CheckEncoding will return an error if the flac encoding (bit depth/Hz) varies among the Release's FLACS.
func (*Release) GenerateCombinedSpectrogram ¶ added in v0.18.2
GenerateCombinedSpectrogram for all FLACs This generates slices of combinedSliceWindowS seconds centered around the middle of each song, then combines all slices in a single png. It should allow seeing at a glance of a single file is something looks like a lossy mastered flac.
func (*Release) GenerateSpectrograms ¶ added in v0.16.0
GenerateSpectrograms for all FLACs
func (Release) NumberOfDiscs ¶ added in v0.19.5
func (*Release) TranscodeTo320 ¶ added in v0.18.0
TranscodeTo320 a given Release's FLAC files
func (*Release) TranscodeToV0 ¶ added in v0.18.0
TranscodeToV0 a given Release's FLAC files
type Track ¶ added in v0.18.0
type Track struct { Path string `json:"-"` Filename string `json:"filename"` MD5 string `json:"md5"` BitDepth string `json:"bit_depth"` SampleRate string `json:"sample_rate"` TotalSamples string `json:"total_samples"` Duration string `json:"duration"` DurationSeconds float32 `json:"-"` Fingerprint string `json:"fingerprint,omitempty"` Tags *TrackTags `json:"tags"` HasCover bool `json:"has_cover"` CoverSize int `json:"cover_size"` }
func NewTrackWithoutMetadata ¶ added in v0.21.2
func (*Track) ApplyMetadata ¶ added in v0.21.2
func (*Track) HasMinimalTags ¶ added in v0.18.0
type TrackTags ¶ added in v0.18.0
type TrackTags struct { TrackNumber string TotalTracks string DiscNumber string TotalDiscs string Artist []string AlbumArtist []string Performer []string Conductor []string Author []string Composer []string Remixer []string Guest []string Title string Description string Date string Year string Genre string Album string Label string Version string ISRC string UPC string Media string Duration int OtherTags map[string]string }
func NewTrackMetadata ¶ added in v0.18.0
func (*TrackTags) PaddedNumber ¶ added in v0.19.6
PaddedNumber for track