INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: CMJFileAutomation.Filename question  (Read 1665 times)

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
CMJFileAutomation.Filename question
« 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?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42384
  • Shoes gone again!
RE:CMJFileAutomation.Filename question
« Reply #1 on: June 24, 2002, 07:09:35 am »

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
Logged
Matt Ashland, JRiver Media Center

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:CMJFileAutomation.Filename question
« Reply #2 on: June 24, 2002, 07:28:27 am »

Absolutely Matt ... since I am now using the filename as the key within my DB I *need* real usable values Next Page

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?
Logged

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:CMJFileAutomation.Filename question
« Reply #3 on: June 25, 2002, 06:25:06 am »

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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42384
  • Shoes gone again!
RE:CMJFileAutomation.Filename question
« Reply #4 on: June 25, 2002, 09:41:20 am »

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
Logged
Matt Ashland, JRiver Media Center

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:CMJFileAutomation.Filename question
« Reply #5 on: June 25, 2002, 09:44:48 am »

That's what I like to hear ... I don't have to change anything Next Page
Logged
Pages: [1]   Go Up