Documentation
¶
Index ¶
- func ExtractAllMetadata(inputs []string) (map[string]*Metadata, error)
- func LoadAllAudioFiles(dirPath string) (map[string]os.FileInfo, error)
- type ChangeDetector
- type FolderScanner
- type Metadata
- func (m *Metadata) Album() string
- func (m *Metadata) AlbumArtist() string
- func (m *Metadata) Artist() string
- func (m *Metadata) BitRate() int
- func (m *Metadata) Comment() string
- func (m *Metadata) Compilation() bool
- func (m *Metadata) Composer() string
- func (m *Metadata) DiscNumber() (int, int)
- func (m *Metadata) Duration() float32
- func (m *Metadata) FilePath() string
- func (m *Metadata) Genre() string
- func (m *Metadata) HasPicture() bool
- func (m *Metadata) ModificationTime() time.Time
- func (m *Metadata) Size() int
- func (m *Metadata) Suffix() string
- func (m *Metadata) Title() string
- func (m *Metadata) TrackNumber() (int, int)
- func (m *Metadata) Year() int
- type Scanner
- type Status
- type StatusInfo
- type TagScanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeDetector ¶
type ChangeDetector struct {
// contains filtered or unexported fields
}
func NewChangeDetector ¶
func NewChangeDetector(rootFolder string) *ChangeDetector
type FolderScanner ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func (*Metadata) AlbumArtist ¶
func (*Metadata) Compilation ¶
func (*Metadata) DiscNumber ¶
func (*Metadata) HasPicture ¶
func (*Metadata) ModificationTime ¶
func (*Metadata) TrackNumber ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) Status ¶
func (s *Scanner) Status() []StatusInfo
type StatusInfo ¶
type TagScanner ¶
type TagScanner struct {
// contains filtered or unexported fields
}
func NewTagScanner ¶
func NewTagScanner(rootFolder string, ds model.DataStore) *TagScanner
func (*TagScanner) Scan ¶
Scan algorithm overview: For each changed: Get all files from DB that starts with the folder, scan each file:
if file in folder is newer, update the one in DB
if file in folder does not exists in DB, add
for each file in the DB that is not found in the folder, delete from DB
For each deleted folder: delete all files from DB that starts with the folder path Create new albums/artists, update counters:
collect all albumIDs and artistIDs from previous steps refresh the collected albums and artists with the metadata from the mediafiles
Delete all empty albums, delete all empty Artists
Click to show internal directories.
Click to hide internal directories.