Opened 17 years ago
Closed 17 years ago
#2958 closed enhancement (fixed)
Database cleanup in MythMusic
Reported by: | otto at kolsi dot fi | Owned by: | stuartm |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythmusic | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
MythMusic does not clean album, artist or genre tables and thus if songs are removed, there is a good change that the database starts to grow up because there are left-overs in album, artist and genre tables.
Attached patch adds database cleanup to MythMusic. Cleanup deletes rows from the music_genres, music_albums and music_artists that are now longer "linked" to any song in music_songs.
This cleanup is performed only when songs are removed from the DB and not everytime songs are re-scanned. This is because cleanup operation might take a while if you have large collection and/or slow machine.
This means that if you only add or modify songs, DB is never cleaned. It this needs to be addressed, maybe a manual action/task could be added to the MusicTools? menu.
Attachments (1)
Change History (5)
Changed 17 years ago by
Attachment: | mythmusic_cleanup.diff added |
---|
comment:1 Changed 17 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from Isaac Richards to stuartm |
comment:2 follow-up: 3 Changed 17 years ago by
Just for the record, Subqueries as used in the patch aren't supported in mysql 3.23 and can't be used until we drop support for 3.23 (probably after 0.21 is released).
comment:3 Changed 17 years ago by
Replying to stuartm:
Just for the record, Subqueries as used in the patch aren't supported in mysql 3.23 and can't be used until we drop support for 3.23 (probably after 0.21 is released).
Okay. Similar cleanup as used in the patch should now also be made to this new music_directories -table (regardless of the cleanup being implemented differently or postponed until mysql 3.23 support is dropped).
I'd missed this patch before now. I'd noted that we weren't cleaning up and it was on my list for #3041
I wouldn't worry about updating the patch, I'll merge in the changes manually.