An open API service indexing awesome lists of open source software.

https://github.com/sdslabs/muzi-scanner


https://github.com/sdslabs/muzi-scanner

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# Muzi Scanner

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.

## Prerequisites

Install following prerequisites:

- `apt-get install libmysqlclient-dev python-dev python-setuptools`

## Libraries used:
Specified in [requirements.txt]

```sh
$ pip install -r requirements.txt
```

Create a data.json file in the project root. It should look something like below:

```json
{
"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":{
}
}
```
## Usage

###Note:
The below command is for development purpose only

```sh
$ python createdb.py
```

Scanner Usage Examples
```sh
$ python scan.py PATH/to/songs/root/ ~/artist_cover_image_directory/ ~/artist_thumbnail_directory/ ~/albums_thumb_image_directory/
```
To fix missing thumbnails/coverpics:
```sh
$ python fixmissing.py ~/artist_cover_image_directory/ ~/artist_thumbnail_directory/ ~/albums_thumb_image_directory/
```

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does it's job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)

[requirements.txt]: