Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next
active database and images / location
Author Message
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
I was wondering, where and how DVD Profiler remembers what database was opened the last time, and (more than the name, which I saw is in the registry) in what folder it will read that database from ? Is that oddly coded somewhere other than the registry ?

Any hints would be appreciated.
DVD Profiler Desktop and Mobile RegistrantStar Contributorajm
dvd-aholic
Registered: March 13, 2007
United Kingdom Posts: 525
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
well depending on xp/vista etc, it's probably in a file called 'databases.dod'.

Mine (xp) is under C:\Documents and Settings\<user>\Application Data\DVD Profiler

Of course as its a database file, you've not got much chance of seeing whats in it.

Home of the phpDVDProfiler forums
 Last edited: by ajm
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Cheers, that helped.

Hmm, indeed I see the three db's I have set up to test with, but this binary file leaves a few things to guess. Which one is the current DB ? I see the characters jump when changing from one DB to the next, but it is far from obvious to determine which one is active / was active upon last run ...
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Can I ask what you need this for? Depending on what your trying to accomplish, there may be some other ways of doing it.

-Agrare
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Need to be able to parse active DB path for external program, to perform batch operations on the images of that DB. So while DVD P is not running, I would like to be able to know which image (DB) path to use.
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
No one with the definite solution here ?
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
If DVDProfiler is not running, you can pick the name of the last used DB from the registry and get the corresponding path from databases.dod. The file structure is fairly simple. If DVDProfiler is running, you cannot rely on the registry value, but there still is a solution. I outlined it a while ago in the Plugin Development forum.
Matthias
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Yeah, thought of that as well but do not fancy a two step approach which includes a registry check, and subsequentially a text string compare on a binary. I am trying to find out which database is active from just looking in the binary, then parsing out the folder information. When changing DB's you can see the binary content change, surely this change can be derived into an "active DB flag" ...
 Last edited: by smrman
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting smrman:
Quote:
Need to be able to parse active DB path for external program, to perform batch operations on the images of that DB. So while DVD P is not running, I would like to be able to know which image (DB) path to use.

But when DVDP isn't running then you can rely on the Registrry.
Karsten
DVD Collectors Online

smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Eh ... yes, for the db name, not the path. See my previous remark, would like to extract both from the binary file containing the db names and paths ..
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Quoting smrman:
Quote:
Yeah, thought of that as well but do not fancy a two step approach which includes a registry check, and subsequentially a text string compare on a binary. I am trying to find out which database is active from just looking in the binary, then parsing out the folder information. When changing DB's you can see the binary content change, surely this change can be derived into an "active DB flag" ...

There is no "active DB flag" in databases.dod. However, you can enumerate all the DBs listed there and compare their "Last Opened" timestamps to find the one last used. But this timestamp also is not valid while DVDProfiler is running. So I can't imagine why you wouldn't want to use the registry value.
Matthias
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Not trying to be a smart ass here, but why does the .dod contents change only after a selected database  change ? I think the dod can be used to get the active DB info, just a matter oc comparing what is happening ..
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
As I said, the "Last Opened" time stamp gets updated. Backing up a DB or uploading it will also change the databases.dod. If there is interest, I can post the file structure in the Plugin Development forum. I will not post it here, though.
Matthias
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting goodguy:
Quote:
As I said, the "Last Opened" time stamp gets updated.

I just played with the open db process and came to the same conclusion without knowing the structure of the file. (have now several copies of the .dod file that only differ in 2*4 bytes).

Isn't it possible that the "currently open database" is just a variable in the memory of the program and not persisted at all - until the program is closed of course.

I've just tried it. I switched the database and then killed the process via Task Manager. The registry value remained the same and after re-opening the program it had forgotten that I switched the DB before the "crash".

That means the program relies soley on that regedit value and no information within the .dod file.
Karsten
DVD Collectors Online

 Last edited: by DJ Doena
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Quoting DJ Doena:
Quote:
That means the program relies soley on that regedit value and no information within the .dod file.

Except for the DB path, of course. But you are correct in regards to determining the "active" database. For example, my script for safely using shortcuts to open different DBs relies on that fact.
Matthias
smrman
Registered: March 27, 2007
Netherlands Posts: 8
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
[Quote]That means the program relies soley on that regedit value and no information within the .dod file.[/Quote]

Err. that is if crashing the app would be the preferred and common way to close down
I see what you are mean, but why would the dod file display any chagen if the only thing done in DVDP is switch DB ? Surely to register inside the file itself which DB has been opened / was last set active ?

[Quote]If there is interest, I can post the file structure in the Plugin Development forum[/Quote]

I think my persistence demonstrates the interest
Just let me know where to look...

PS why does regular forum quoting not work here ?
    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next