INTERACT FORUM
Windows => Plug-in Development => Topic started by: RhinoBanga on June 23, 2002, 11:59:08 pm
-
Hi Guys,
Does MJ do any sort of validation when returning back the filename?
I have a large mediafiles.jmd database from someone who stored their tracks in Z:\ and X:\. These paths do not physically exist in my system and when I do a CMJAutomation.Search(), CMJFilesAutomation.GetFiles on the data and look at the filename parameter it's always a NULL string.
Using other .jmd databases that have tracks stored in C:\ and D:\ (which do physically exist on my system) work just fine.
Any ideas?
-
Hey Rhino,
In the database, files on removable drives get stored like (0x34FCE87A):\Folder\1.mp3
However, when you do a GetFilename(...), we return the "available" filename, which is translated to a filename that's currently available. (i.e. F:\Folder\1.mp3) Since the Z:\ and X:\ files aren't available, we return NULL.
Maybe there should be a GetDBFilename(...) function or something... what do you think?
Thanks.
-Matt
-
Absolutely Matt ... since I am now using the filename as the key within my DB I *need* real usable values
I think you should consider calling it something like CMJFileAutomation.Key (making it read only of course) as I think that makes more sense (as that is it's true nature) and have a CMJAutomation.GetFileViaKey function.
This will also give you scope for the future in case you want to change key formats, e.g. to a GUID.
If not will CMJAutomation.GetFile be enhanced to support these filename formats?
-
Matt,
Do you have any idea when you'll get around to doing this?
I released a test version of AV last night and people are reporting issues where track information is not being found ... it sounds as if there is something more sinister going on with the .Filename processing.
-
Doing it right now, so it'll be in the next build. Just added a GetAvailableFilename(...) function that does what the current GetFilename(...) function does. GetFilename(...) will now return how the file is stored in the DB, which is essentially the key.
The generic key idea is a good idea, but it'll have to wait.
Thanks Rhino.
-Matt
-
That's what I like to hear ... I don't have to change anything