Menu

#1 Database Modifying Functions

open
nobody
5
2004-02-19
2004-02-19
No

OK, I know that these suggestions will require a lot of
extra coding (I don't know c, but I could come up with
the routines in pseudo-code), but here goes. ;-)

The user should be able to easily modify the location
of the songs. Either (or both) by individual song or
disc. When updating the database, ddj should also be
smart enough to move the affected songs to the new
location (if they haven't already been moved by the
user) and then verify that the songs actually exist in
the new location. Moving by song should allow changing
the full file name, and moving by album should only
allow changing the path. (This would have been useful
to me when I changed the format of saving from all
lower case to preserving case in grip. I had to use
mysql-navigator to fix the (thankfully) one album that
was affected.)

Continuing on, one should be able to easily change the
artist name and disc name on an entire disc. This would
make ripping a multi-disc album where the cddb artist
name and/or disc name format for each disc of the set
is different nicer because then the user would be able
to get the full album organized properly.

Further, one should be able to easily remove entries
(all of individual songs, full discs, entire artists,
playlists) from the database, and have ddj ask if the
files should be deleted if it exists. For multiple
deletes (removing a disc or and artist), the user
should be able to select 'Delete, Delete All, Cancel,
Cancel All'.

Then to help keep the databases optimized, have a
'clean-up database' function (either user selectable or
automatic/prompted after a delete) that searches for
all unused id numbers (song, artist, disc, playlist)
remove them, and back-fill the id numbers. For example,
say there are 25 discs in the database. Disc 2, 5, and
16 are removed from the database so nothing in the song
table has the discid value 2, 5, or 16. In the disc
table the values in id 23 are copied to id 2, the
values in id 24 are copied to id 5, and the values in
id 25 are copied to id 16. Then id's 23, 24, and 25
are removed. Then in the song table all fields with
discid value 23 are updated to discid value 2, similar
for the other 3 entries. When cleaning up the song
table, all the playlists should also be updated with
the new song id values.

Discussion


Log in to post a comment.