miner

package
v0.0.0-...-ea888db Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

miner goes recursively through a directory, det the id3v2 tags from the mp3 files, sends them to the controller and adds them to the database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Miner

type Miner struct {
	// contains filtered or unexported fields
}

Miner gets data from files

func NewMiner

func NewMiner(dbPath string) *Miner

NewMiner

func (*Miner) ClearPicDir

func (m *Miner) ClearPicDir() error

ClearPicDir deletes the pictures

func (*Miner) GetRawTags

func (m *Miner) GetRawTags(path string) *id3v2.Tag

GetRawTags gets the tags directly from a file

func (*Miner) MineFilePaths

func (m *Miner) MineFilePaths(root string) (int, error)

MineFilePaths gets the mp3 paths

func (*Miner) SendAndInsertSongs

func (m *Miner) SendAndInsertSongs(mined chan *SongReg)

SendAndInsertSongs sends ths songs to the controller and inserts them in the database

func (*Miner) SetStoredSongs

func (m *Miner) SetStoredSongs(stored map[string]string)

SetStoredSongs sets song no to be mined again

type SongReg

type SongReg struct {
	Song    *dbManager.Song
	NumSong int
}

SongReg has a song and a number indicating the place where it was mined

func NewSongReg

func NewSongReg(newSong *dbManager.Song, num int) *SongReg

NewSongReg

Jump to

Keyboard shortcuts

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