badger/README.md
2023-03-14 09:53:33 +01:00

5.7 KiB

badger

a management tool for your audio library written in go

requirements

currently only 64bit x86 linux systems are supported!

how to build

  1. git clone https://git.velvettear.de/velvettear/badger.git
  2. cd badger
  3. go build
  4. go clean --cache

note:
the resulting binary file is relatively large. this is because the binaries for ffprobe and fpcalc are bundled within the binary itself and get extracted on the first run.

if ffprobe and fpcalc is already installed on your system and you wish to use the system provided binaries instead it is recommended to build and use the minified version. to do so replace the line 3 with: go build cmd/badger-min/badger-min.go.

arguments

there are just a two arguments to pass to badger:

argument description
-h, --help print the help
-c, --config specify the path to the config file

configuration

configuration is done within a '.yaml' file.
to get a first impression just take a look at the provided config.

directories

name type default description
home string $TMP/badger directory where badger stores its data
library string $TMP/badger/library directory where your audio files reside
import string $TMP/badger/import directory from which to import audio files to your library
duplicates string $TMP/badger/duplicates directory into which duplicates are moved or linked

database

name type default description
file string $TMP/badger/badger.sqlite path to the sqlite database file
inMemory bool true use an in memory sqlite database
chunkSize int 1000 chunk size of database entries to copy into the in memory sqlite database
busyTimeout int 10000 busy timeout for the sqlite database
journalMode string off journal mode for the sqlite database

library

name type default description
formats array [string] flac, mp3 array of file formats to parse
changedetection.modified bool true check for file changes by the modified time stamp
changedetection.size bool true check for file changes by the file size
changedetection.checksum bool false check for file changes by checksum
(this will dramatically increase update duration)
duplicates.action string log action to perform on found duplicates:
ignore, log, link, move, delete
duplicates.formatMismatch bool true check only files with non matching file formats
duplicates.useFingerprint bool true check for duplicates by comparing audio fingerprints
if set to false a hash sum of the metadata will be used for comparison
(audio fingerprints are more precise, but a lot slower)
duplicates.fingerprintThreshold float64 0.95 threshold score for the fingerprint comparison

api

name type default description
listen string 0.0.0.0 listen address of the api server
port int 3333 port of the api server

other

name type default description
concurrency int number of cpu cores amount of concurrent ffprobe/fpcalc processes or goroutines for fingerprint comparison to spawn
debug bool true enable or disable debug mode

credits

thanks to all these amazing people and their projects!
without them this would not be possible.