FreeMusicNinja/api.freemusic.ninja — pull request #36 by macro1 (2014-12-20 19:33:33+00:00)
Title: Query Free Music Archive for track data

This adds a new app, `fma`, to store queried data from the FMA API. I did not work on migrating `FMAArtist` from `artists`, I opted to make a duplicate `Artist` model in `fma` for now. I did add the FMAArtist admin page though, and added a list action for kicking off the track query from that perspective. It will only query for artists that have not been modified in a week.

If we're fine with this new layout for storing the data, we can work on migrating the existing FMA data into the new app, and decide on how we're going to update and back-fill the album and track data. I think there may be some additional fields we could take advantage of in the query as well.

I'm not capturing all of the data. I'm thinking of adding them as part of this PR. Here is an example of a single track's data:

```json
{
"track_id":"11773",
"track_title":"05 Too Complex Instrumental {6th Sense & The Kid Daytona}.mp3",
"track_url":"http:\/\/freemusicarchive.org\/music\/6th_Sense\/Its_A_6th_Sense_Beat_Yo\/05_Too_Complex_Instrumental_____6th_Sense_amp_The_Kid_Daytonamp3",
"track_image_file":"http:\/\/freemusicarchive.org\/file\/images\/tracks\/6th_Sense_-_05_-_05_Too_Complex_Instrumental_____6th_Sense__The_Kid_Daytonamp3_-_20120713140037047.jpg",
"artist_id":"3089",
"artist_name":"6th Sense",
"artist_url":"http:\/\/freemusicarchive.org\/music\/6th_Sense\/",
"artist_website":"http:\/\/notherground.blogspot.com",
"album_id":"2898",
"album_title":"It's A 6th Sense Beat Yo!!",
"album_url":"http:\/\/freemusicarchive.org\/music\/6th_Sense\/Its_A_6th_Sense_Beat_Yo\/",
"license_title":"Attribution-NonCommercial 3.0 International",
"license_url":"http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/",
"track_language_code":"en",
"track_duration":"01:51",
"track_number":"5",
"track_disc_number":"1",
"track_explicit":null,
"track_explicit_notes":null,
"track_copyright_c":null,
"track_copyright_p":null,
"track_composer":null,
"track_lyricist":null,
"track_publisher":null,
"track_instrumental":"1",
"track_information":null,
"track_date_recorded":null,
"track_comments":"0",
"track_favorites":"31",
"track_listens":"27513",
"track_interest":"35034",
"track_bit_rate":"192000",
"track_date_created":"4\/30\/2009 10:10:21 AM",
"track_file":"music\/Notherground_Music\/6th_Sense\/Its_A_6th_Sense_Beat_Yo\/6th_Sense_-_05_-_05_Too_Complex_Instrumental_____6th_Sense__The_Kid_Daytona.mp3",
"license_image_file":"http:\/\/i.creativecommons.org\/l\/by-nc\/3.0\/88x31.png",
"license_image_file_large":"http:\/\/fma-files.s3.amazonaws.com\/resources\/img\/licenses\/by-nc.png",
"license_parent_id":null,
"tags":[ ],
"track_genres":[
{
"genre_id":"21",
"genre_title":"Hip-Hop",
"genre_url":"http:\/\/freemusicarchive.org\/genre\/Hip-Hop\/"
}
]
}
```