Author |
Message |
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Posts: 525 |
| Posted: | | | | 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 |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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 ... |
|
Registered: May 22, 2007 | Reputation: | Posts: 1,033 |
| Posted: | | | | 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 |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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. |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | No one with the definite solution here ? |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | 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
|
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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 .. |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | 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 .. |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: March 27, 2007 | Posts: 8 |
| Posted: | | | | [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 ? |
|