This project aims to populate a database with attributes of various songs, given the path to songs root directory. The songs can be of either mp3 or mp4 or m4a format.
Songs are placed in a hierarchical directory structure inside the songs root directory as follows:
- Artist Name > AlbumName > SongName
So, a song "Problem" by Ariana Grande will be in the folder as "Arian Grande > My Everything > Problem.mp3" with rest of "My Everything" album's songs in it.
Install following prerequisites:
apt-get install libmysqlclient-dev python-dev python-setuptools
Specified in requirements.txt
$ pip install -r requirements.txt
Create a data.json file in the project root. It should look something like below:
{
"DEFAULT": {
"lastfm_api_key": "api_key",
"lastfm_api_secret": "api_secret",
"db_backend": "mysql",
"db_name": "test",
"db_user_name": "test",
"db_password": "password",
"db_host": "local"
},
"PRODUCTION":{
}
}
###Note: The below command is for development purpose only
$ python createdb.py
Scanner Usage Examples
$ python scan.py PATH/to/songs/root/ ~/artist_cover_image_directory/ ~/artist_thumbnail_directory/ ~/albums_thumb_image_directory/
To fix missing thumbnails/coverpics:
$ python fixmissing.py ~/artist_cover_image_directory/ ~/artist_thumbnail_directory/ ~/albums_thumb_image_directory/