NBPub / MusicDB-sql-practice

Collection of python scripts used to evaluate + fix music collection.
MIT License
4 stars 1 forks source link

Request no issue.. Could a playlist/s be added to the database? #1

Open SonnyWalkman opened 2 years ago

SonnyWalkman commented 2 years ago

Not an issue however a request.. Great work by the way. Been looking for something simple to walk a directory and pull in tracks. I'm going to use you code as a basis for storing a list of band songs in a similar way. Is there any thought to add a setlist (Play list) and keep these in the database. I don't need to deal with Albums so may modify the database and code to do what I require. Using Mutagen to pull in the id3 tags is not required however, I'll open a song.txt file which keeps the artist, BPM, Key etc which I'll open.

Could Lyrics be imported into the database as a blob possibly in compressed format gzipped? If Lyrics file not available locally get the Lyrics from external site eg.. LyricsGenius etc

Cheers

NBPub commented 2 years ago

Setlists vs. Albums You can use the Albums table, and directory scanner as a template. I'm assuming you wouldn't use the regex portion of the directory scanner, but you can add up tracks as done in my code. You wouldn't need the following columns:

And particularly, you don't want to reference "artist" as a foreign key. Or are your setlists only comprised of one unique artist? In that case, keep it as is.

Lyrics Maybe you can just add a TEXT column to the SQL table (in this case, the Songs/Tracks table), and list the path to your lyrics file. As you're scanning, you can search for lyrics online if songs don't have a lyrics file (that could also be referenced in your songs.txt).

Good luck! Feel free to link whatever you come up with.