An idea to help organize your music with extra metadata using a SQL Server Database. This repository searches through a folder and gathers metadata already in mp3 files to add to a database
2
stars
1
forks
source link
Add Constraints to Enforce Uniqueness of Data (And Prevent Unexpected Behavior) #12
Add constraints on tables that have data that should theoretically be unique. If this data is not unique, the user either supplied duplicate data or the data supplied was very similar.
The unique constraints (added to "primary" tables) should be designed so as to not be restrictive on the kinds of data able to be input, but the size limit of keys in SQL server is restrictive in its own way.
Additionally, foreign keys should be added to "secondary" tables that map between "primary" tables so that the values in these tables can reliably be used to map to "primary" tables.
[x] Don't forget to update the readme!
[x] Notify User of .wav files because they don't have a lot of data
Works in test folder, but not in main Music folder... Bad path variable
[x] If the title is NULL, try to construct it from the filename
[x] Notify User when this is happening and because of which files (log this to a file in a future PR)
The file name that we expect "proper" .wav files to have is in the following format: .../[ArtistName] - [AlbumName] - [TrackOrder] [TrackTitle].wav
Added Album Art table, mapping to AlbumID and containing the path and primary color of the album art
The "primary color" is the color of the most common pixel in the image
This processing can take a while, will add an option to skip primary color generation in the future
Added additional column LastModifiedDate to Main table, since the AddDate is actually the file's last modified date. During CRUD changes we will attempt to preserve the AddDate
Add constraints on tables that have data that should theoretically be unique. If this data is not unique, the user either supplied duplicate data or the data supplied was very similar.
The unique constraints (added to "primary" tables) should be designed so as to not be restrictive on the kinds of data able to be input, but the size limit of keys in SQL server is restrictive in its own way.
Additionally, foreign keys should be added to "secondary" tables that map between "primary" tables so that the values in these tables can reliably be used to map to "primary" tables.
.wav
files to have is in the following format:.../[ArtistName] - [AlbumName] - [TrackOrder] [TrackTitle].wav
LastModifiedDate
toMain
table, since theAddDate
is actually the file's last modified date. During CRUD changes we will attempt to preserve theAddDate