benten

package module
v0.0.0-...-7f3946a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlbumPictureBucket string = "album-pictures"
View Source
var GramSizeForAscii = 4
View Source
var GramSizeForNonAscii = 6
View Source
var PieceBucket string = "pieces"
View Source
var PieceIndexKind string = "piece-index"
View Source
var PieceKind string = "piece"

Functions

func Normalize

func Normalize(s string) string

Normalize normalizes given the string and returns it.

Types

type Metadata

type Metadata struct {
	// Format is the metadata Format used to encode the data.
	Format string
	// FileType is the file type of the audio file.
	FileType string
	// Title is the title of the track.
	Title string
	// Album is the album name of the track.
	Album string
	// Artist is the artist name of the track.
	Artist string
	// AlbumArtist is the album artist name of the track.
	AlbumArtist string
	// Composer is the name of the composer of the track.
	Composer string
	// Genre is the genre of the track.
	Genre string
	// Year is the year of the track.
	Year int

	// Track is the track number of this piece in the album, or zero values if unavailable.
	Track int
	// TotalTracks is the number of tracks in the album, or zero values if unavailable.
	TotalTracks int
	// Disc returns the disc number in the album, or zero values if unavailable.
	Disc int
	// TotalDiscs is the number discs in the album, or zero values if unavailable.
	TotalDisks int

	// Comment is the comment, or an empty string if unavailable.
	Comment string

	// The key of the item stored in the datastore which represents the picture of the file, or the empty string if unavailable.
	Picture string
	// The metadata-invariant checksum: see
	// https://github.com/dhowden/tag#audio-data-checksum-sha1.
	Hash string
	// The relative Path of the file stored in the client storage.
	Path string
}

Metadata epresents a metadata of an audio file. This is equivalent to tag.Metadata except for the following members:

  • Picture
  • Hash
  • Path

func NewMetadata

func NewMetadata(src tag.Metadata, picture string, hash string, path string) Metadata

NewMetadata creates a Metadata from a tag.Metadata and

type PieceIndex

type PieceIndex struct {
	Key []byte

	Value *datastore.Key
}

PieceIndex is an entry of index from text in a Metadata to the key of the Metadata.

Directories

Path Synopsis
cmd
gae

Jump to

Keyboard shortcuts

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