So, here’s the deal. I am attempting to write a quick python script that reads the basic id3 tags from an mp3 (artist, album, songname, genre, etc). The python script will use most likely the mutagen library (unless you know of a better one). I’m not sure how to recursively scan through a directory to get each mp3’s tags, and then fill a database. Also, as far as the database end, I want to make it as solid as possible, so I was wondering if anyone had any ideas on how I should design the database itself. Should I just use one big table, should I use certain relationships, etc. I am not very good at relational databases so I would appreciate any help. Oh, this is running on a linux box.
Share
To get started with extracting ID3 tags in Python, there’s a module for that.
More info on ID3 module.
If you want to recursively search a directory for mp3 files, the built-in
osmodule can do that:Reference.
In terms of creating the database, you don’t need to reinvent the wheel (storing music data is a common database problem) — a Google search will help you out. Here’s one example.