GLORY TO UUIDS !
The time has come.
The last bastions are crumbling under our assaults.
We are going to do the unthinkable.
RENAME ALL KARA FILES TO UUIDS.
Say goodbye to naming issues. Say goodbye to git problems.
Ahem.
So more seriously, this is a long overdue issue and hot debate among the community. Some people didn't want to go through this because of old habits and things like that. But Karaoke Mugen now allows a lot of actions directly in its system panel like encode, upload, or edit lyrics on a karaoke.
Renaming all files to UUIDs should be done carefully and we still need to see if there's going to be any issues with it.
Alas, there will be no turning back once we're done with this.
Possible issues
At this point, I identified one particular problem, and it has to do with #1477.
Multi-track drifting requires that some lyrics share the same UUID. We'll need to see how we'll achieve this. Probably by appending the filename with something, like a short identifier for the song version.
Work to do
-
Convert all filenames to UUIDs in code -
Provide a hard link manager for operators if they want their files neatly ordered -
Make sure it works across filesystems or Windows drives -
Do we do this only for medias or also for ASS files ?
-
-
Add KID to karadetail in operator panel -
Add readable media/karaoke name to download list - For that to work we need to add a human readable karaoke name in the karafile. Shouldn't be a big issue
-
Generate a CSV for the base with a name => KID to open up in Calc or Excel? (allows easier exploitation if someoen wants to make a renaming tool or something like that.) -
NOT NEEDED if we add a
karaname
field in the karafile like hitned at above, I think. - I feel like this is spoonfeeding people a bit too much and overengineering. We should wait for the need to arise before doing that.
-
NOT NEEDED if we add a
-
Write a migration for this to make it painless for users. - We have several options that I'll detail below.
Migrating users to the new naming scheme
We had something like this when we went from the Epitanime naming scheme to the KM naming scheme several years ago.
Subfiles come with the base via git or zip or patch so they won't need to be renamed manually.
The problem is that in order to do automatic renaming we need to know when and how to do it.
- KM will attempt to rename a media if the
mediafile
has a UUID format and will usedefineFilename()
to attempt to guess what the original filename was. - If the original file can't be found, it'll eventually be redownloaded automatically.
- After the renaming process, any extra files will be removed (files which couldn't be renamed) to keep the folder clean.
Anything else I forgot about in the process?