music

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoInfoFound is the error returned when the metadata format cannot be identified.
	ErrNoInfoFound = tag.ErrNoTagsFound
)

Functions

func CheckSystems

func CheckSystems(log *zerolog.Logger) error

CheckSystems checks that ffmpeg is installed

func ConvertMusicFile

func ConvertMusicFile(log *zerolog.Event, src, out string, bitrate int64) error

ConvertMusicFile converts src to out file with bitrate

func ConvertPicture added in v0.0.2

func ConvertPicture(log *zerolog.Logger, tmpPic, dstPic string) error

func ConvertPictureAlbum

func ConvertPictureAlbum(log *zerolog.Logger, info *Music, tmpPic, dstPic string) error

func GetBitrate

func GetBitrate(log *zerolog.Logger, src string) (int64, error)

GetBitrate returns bitrate of the file

func GetDuration added in v0.0.2

func GetDuration(log *zerolog.Logger, src string) (int64, error)

GetDuration returns duration in seconds of the file

Types

type Music

type Music struct {
	FileType   string       // "", MP3, M4A, M4B, M4P, ALAC, FLAC, OGG
	Format     string       // "", ID3v1, ID3v2.2, ID3v2.3, ID3v2.4, MP4, VORBIS
	Title      string       // Title of the track
	Album      string       // Album name of the track
	Artist     string       // Artist name of the track
	Year       int          // Year of the track
	Genre      string       // Genre of the track
	Track      int          // Track number
	TotalTrack int          // Total tracks
	Disc       int          // Disc number
	Lyrics     string       // Lyrics
	Picture    *tag.Picture // Attached picture
}

Music is information from music file tags

func GetFileInfo

func GetFileInfo(f io.ReadSeeker) (*Music, error)

GetFileInfo returns information about music file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL