to read and write the audio tags (mp3, flac, ...)
apt install python3-dev libtag1-dev
pip3 install pytaglib
to identify musics.
pip3 install pyacoustid
used by pyacoustid
apt install ffmpeg
pip3 install mysql-connector-python
to get the type of the files, and check if is a music file.
pip3 install filetype
./radio-adder.py [Directory]
[Directory]
: the music directory
create a settings.py
file with this variables :
display = "short" # all - short - error - none
acoustIDToken = ""
webServiceURL = "https://127.0.0.1/"
webServiceRacinePath = "/var/www/html/"
bddHost = "127.0.0.1"
bdduser = "user"
bddPassword = "password"
bddName = "name"
retagFile = True
sortFile = True
removeUselessFileAndFolder = True
removeNotFoundFileInDB = True
updateDirection = "DBtoFile"
forceAcoustID = False
Is the detail level on the displaying information.
- none : no display
- error : just error
- short : just short info for each music file (tag state, db state) + error
- all : all details.
the token of the acoustid API, you can create our own on Acoustid web site, just folow "Register your application" link.
the address of your MySQL service.
the user of your MySQL service.
the password of your MySQL service.
the name of your MySQL database.
Activate writing the music tags.
Active the auto sorting tool.
move the file in Artist/Album/Disc.TrackNumber - Title.mp3
Active the "remove useless" option Remove empty folders and non-music files.
Remove database rows where music file not existing.
Chose if the file update direction.
- DBtoFile : the file tags are update using the DB.
- FiletoDB : the DB are update using file tags.
For file not in the DB, the direction is always in File to DB direction.
Force to recognize music using AcoustID on every files.