Sharing my VDH Settings

346 views
Skip to first unread message

Wild Willy

unread,
Dec 11, 2021, 2:44:14 PM12/11/21
to Video DownloadHelper Q&A
I'm considering sharing my VDH Settings here.  But first, I want to learn a couple of things.

In order to share my settings, first I saved them into a file.  Anybody wanting to take my settings would have to do the same thing.

#01.png
#02.png
#03.png
#04.png

Once you have the file saved, you can edit it.  It is a plain text file.  But when you edit it in Notepad, it looks like a dog's breakfast.  I'm using Notepad++ & it seems to know how to display the file in a readable format.  Wordpad also displays the file in a readable format & I think it would work OK in this case.  When I open the file in Notepad++, the first bit of the file looks like this:

{
    "blacklist": {},
    "license": {
        "key": "Hidden for Security Reasons",
        "remoteStatus": "accepted",
        "last": "Hidden for Security Reasons",
        "name": "Hidden for Security Reasons",
        "email": "Hidden for Security Reasons",
        "status": "accepted",
        "sign": "Hidden for Security Reasons"
    },

As you can see, I have replaced what's really in the json file to avoid posting sensitive information, like my license number & my E-mail address.  My E-mail address isn't all that sensitive but my license number is.  In any case, if you do this, this portion of the file will contain your sensitive information.

You can also open the file in Firefox using standard operating system & Firefox techniques:

#05.png
#06.png

You can't change the file in Firefox & that's where I'm headed with this.

Now, before I proceed & actually attach my .json file for the world to take, I need to know some things.

First, is there anything below this top section that contains sensitive information, like my license number or user IDs & passwords?

Next, there are a lot of weird character strings in there.  If somebody took my .json file & simply saved it as a file on their system, then used the VDH Import function, would that give them the same settings I have?  I am thinking that all they would have to do is copy the top part of their .json file & paste it over that part of my .json file, then import the thing into their VDH.  Here's what I'm thinking:

#07.png

Would this work?

In my .json file, in the part I have not shown in the above images I have these sections:

1. About 1,000 lines of what looks like the file conversion rules
2. About 100 lines of what looks like the really interesting part, my VDH Settings

Do I need to post my entire .json file?  Would that last part of about 100 lines be enough?  Could anybody just paste the end part of my file over the corresponding part of their file & then they would have my VDH Settings?  There's been so many times a user has posted that VDH won't download a certain thing but it works fine for me.  I have always wondered if maybe I've accidentally stumbled upon some magic formula that makes it work.  That magic formula would be in my VDH Settings.  So maybe I could just share my settings & see if others suddenly see their problems cured.

I'm hesitant about posting the middle 1,000 line block because there's a lot in there that I don't understand.  Is any of it sensitive?  Maybe the weird strings are object IDs that just wouldn't work on somebody else's system.  I need to know the answers before I post my .json file.

Looking closely at that last 100 lines, I do see some things that might not be what another user would want.

"dlconvLastOutput": shows a strange string of characters whose meaning I don't understand.  Would other users have trouble if they just took the value I've got in my file?

"donateNotAgainExpire": shows a number whose meaning I don't understand.  Could it pose a problem if other users just copied it to their systems?

"lastDownloadDirectory": obviously shows a directory on my system.  This isn't so much sensitive information as information that just wouldn't be correct on somebody else's system.  I believe somebody taking my file would have to change this value to something that actually exists on their system.

"lastHlsDownload": is another number I don't understand.  Repeat my question from above.

"linuxLicense": false,  I assume on a Linux system, this is set to true & a Linux user would not want to take my setting.  I'm also assuming that if anybody set it to true on a Windows or Mac system, it wouldn't magically make VDH think that user has a license when that's not true.  I'm not going to experiment with this because I do have a license but I'm wondering what would happen if somebody else tried it.  I sure hope that wouldn't work.

So I need some answers before I proceed.  I suspect this will require Michel's help.

jcv...@gmail.com

unread,
Dec 12, 2021, 3:12:17 AM12/12/21
to Video DownloadHelper Q&A
I suspect the same :)
jerome

mig

unread,
Dec 12, 2021, 5:42:03 AM12/12/21
to Video DownloadHelper Q&A
The numbers you don't understand for "donateNotAgainExpire" and "lastHlsDownload" are timestamps, the number of milliseconds since Jan 1st 1970. It's a machine-convenient way to store a date.
"linuxLicense" should always be set to false, unless you are me and want to test license-related stuff while on Linux (where a VDH license is not needed).

The text format of the settings is JSON . It's a convenient way to store structured data, but as a human, you may prefer a pretty-formatted version with additional spaces and newlines to make the text more readable. You can use a beautifier like https://codebeautify.org/jsonviewer to transform the machine-generated JSON (no extra space or newline) to something you can work on. After modifications, you can import directly the pretty version.

When playing at expert level with the VDH configuration, remember there is the WEH Inspector tool, https://addons.mozilla.org/en-US/firefox/addon/weh-inspector/ (for Firefox) or https://chrome.google.com/webstore/detail/weh-inspector/fmgamnjfcnkcpfbbgifncejeplbpoebg (for Chrome).

Wild Willy

unread,
Dec 12, 2021, 11:43:25 AM12/12/21
to Video DownloadHelper Q&A
OK.  So here's what I propose.  Instead of posting the full exported .json file of my VDH Settings, I will post only the bottom ~100 lines that start with:

    "weh-prefs": {

I will warn people to change

        "lastDownloadDirectory":

I believe if they take my value, which is unlikely to be valid on anybody else's system, it will get them in an endless loop of errors in the file selection dialog.

I will advise people to use Wordpad or a Notepad replacement like I use, like Notepad++.  They should export their .json.  They should make a safe copy which they won't touch.  This will be just in case.  They should edit their .json, remove the part beginning with "weh-prefs": {, paste in the partial .json I will post here, change the "lastDownloadDirectory": from my value to a directory on their system, save the .json with the modifications, then import the modified .json into their VDH.  Then they will have my settings.  If it doesn't work, they will simply import the safe copy of their own .json & they will be back where they started.

I don't believe anybody needs a .json prettifier to do what I'm talking about here.  Wordpad prettifies the .json just fine, as does Notepad++.  I also don't think the WEH Inspector is needed for what I'm talking about either.  I'm talking about exporting the settings into a .json, replacing part of it with a section of my .json (with one change), then importing the changed .json.  I'm not talking about "expert level" manipulations of the .json, just a simple sharing of my VDH Settings.

Do I have your approval that this approach will give my VDH Settings to anybody who wants them?

mig

unread,
Dec 13, 2021, 4:34:16 AM12/13/21
to Video DownloadHelper Q&A
This is some sort of white-hacking and i don't want to forbid you from doing so as it is for a good cause, helping people ;)

Just be aware that in some time from now, the VDH low-level mechanism for storing preferences may have changed and might not be available anymore.

mig

unread,
Dec 13, 2021, 4:52:03 AM12/13/21
to Video DownloadHelper Q&A
And it looks to me that if it is only about changing one setting, using the WEH Inspector to do so  might a simpler solution than using export/import while using a text editor.
Also keep in mind that a single error in the text edition (it's easy because JSON might be tricky) will make the whole configuration to fail. If this happen you can do a reset from the same menu as Export and Import. After the export it might be a good idea to backup the file before modifying it.

Wild Willy

unread,
Dec 13, 2021, 4:51:59 PM12/13/21
to Video DownloadHelper Q&A
Now that I have that assurance, here's what you have to do to install my VDH Settings on your system.  Maybe at some point this will help you with a problem.  Maybe it won't.  In case it doesn't, or in case of any sort of problem, you want to be able to remove my settings & reinstate yours.  Here's how.

BEFORE you copy my settings to your system, export your current VDH Settings following the instructions I give upthread here.  Now make a safe copy of your VDH Settings.  This is something you can do with keyboard shortcuts like Ctrl+Insert then Shift+Insert, or Ctrl+c then Ctrl+v.  But I can't post screenshots of keyboard key sequences.  So I'm showing the slow, cumbersome way of doing it.  It works & you can do this.  You probably won't but you can.  So first, do a copy on your exported VDH Settings.  This is the file as you've exported it but with NO changes to it.  Do this IMMEDIATELY after exporting it.

#01.png

This copies the file to the system clipboard.  Now paste it back somewhere.  You can paste it anywhere on your system.  For simplicity, I'm pasting it back into the same directory.  You can do whatever you feel comfortable with.  Navigate to any directory on your system & paste the file there.

#02.png
#03.png

If you discover at some later stage of this that you want to reinstate your original VDH Settings, follow these steps:

#04.png
#05.png

That's it.  You will have your original settings in effect once again.

Now here's a copy of my VDH Settings.  It is not my entire .json file.  As I discuss upthread, the full .json file starts with a short section that contains sensitive information, most importantly your VDH license, but also your E-mail address.  I'm not posting that.  You should never do so either.

Following the sensitive information there follows a section of about 1,000 lines that looks a lot like the conversion rules for converting one type of file to another.  We don't want to touch this section of the .json file.  We don't want to alter it in any way.  So there's no point in my posting it or even showing it in any of my images in this thread.

At the bottom of the .json file there is a section of about 100 lines that contains all the relevant settings that affect how VDH works.  This is the only part we will be concerned with.  So, here's that section of my .json file.

It begins with a line that reads:

    "weh-prefs": {

I am posting everything that is in my exported .json file starting with this string & going to the bottom of the file.  Find that section in your exported .json file (NOT THE SAFE COPY!!!!).  You will be doing a wholesale replacement of that section WITH ONE CHANGE, which I will detail below.
My Vdh Settings.json

Wild Willy

unread,
Dec 13, 2021, 5:40:24 PM12/13/21
to Video DownloadHelper Q&A
You want to download this file to your system.  If you click the icon in the larger portion of it, Firefox will simply open the file in a new browser window.

#06.png
#07.png
#08.png
#09.png
#10.png
#11.png
#12.png

Now we are ready to get my settings into your VDH.

Wild Willy

unread,
Dec 13, 2021, 9:26:42 PM12/13/21
to Video DownloadHelper Q&A
Edit your saved VDH Settings .json file.

NOT THE SAFE COPY!!!!!

This is your working copy of your VDH Settings.  A .json file is just a plain text file.  If you open it in Notepad, it looks something like this:

#13.png

Dog's breakfast.  Completely impossible to deal with.  So instead, open the file in Wordpad.  Much nicer.

Do a string search on "weh-prefs" to position the file at the beginning of the bottom section of the file.

#14.png

After dismissing the search dialog box, be sure to hit the Home key to make sure the cursor is positioned at the beginning of the line.  The search string is not at the beginning of the line.  You want to position the cursor against the left margin.

#15.png

Highlight everything from this position to the bottom of the file.  To do this,
press & hold down the Ctrl key & the Shift key,
then type the End key,
then take your hands off the keyboard.

#16.png

Now type the Delete key.  Don't be afraid.  You've got the safe copy of this file so you can undo any mistakes you make & start over if you have to.  Do it.  After you delete that section, position the file at the bottom.  To do this,
type Ctrl+Home,
then Ctrl+End.

#17.png

In another Wordpad window, open the file you downloaded of my VDH Settings.  Highlight the entire contents of the file.

#18.png

Then copy it.

#19.png

Switch back to the Wordpad window of your working copy of your VDH Settings.  Now paste my VDH Settings at the bottom of your .json file.

#20.png

There is one line in my VDH Settings that you do not want.  Do a string search for "lastDownloadDirectory" to position your settings file on this setting.

#21.png

In yet another Wordpad window, it should be the third open Wordpad window at this point, open the safe copy of your VDH Settings.  Be careful not to modify this file.  I created a separate file with some sample data in it so I am not opening my safe copy.  But you should open your safe copy.
Position this file on the "lastDownloadDirectory" line with a search, as above,
dismiss the search dialog box,
type the Home key to position the cursor against the left margin,
press & hold the Ctrl key & the Shift key,
type the DownArrow key once,
lift your hands off the keyboard.
This selects the entire line.

#22.png

It is just one line, despite appearances.  It is displayed like this on 2 lines because it's too long to fit in the window.  So Wordpad wraps the line.  But it is just one line.

Copy this line.  This puts your original value of this setting into the system clipboard.

#23.png

Switch back to the Wordpad window of your working copy of your VDH Settings.  Find the "lastDownloadDirectory" line & select it like you did in the other file.

#24.png

Paste your original value for this setting over top of my value for this setting.

#25.png

Now you want to save your working copy of your VDH Settings.  Close the file by typing Alt+F4.  This prompts you to overwrite the existing file.  Click the Save button.

#26.png

This gives you a second warning box.  Click Yes.

#27.png

Import your updated VDH Settings into your VDH configuration.

#28.png
#29.png

You'll still have 2 files open in Wordpad: my VDH Settings file that you downloaded off this web page, your safe copy of your original VDH Settings.  It's time to close them both.  If you are clumsy like I am, you will have somehow managed to fat finger something in your safe copy.  No worries.  Just reject the offer of saving the file.  No harm, no foul.

#30.png

At this point you will have my VDH Settings in your VDH configuration.  At least, it seemed to work on my system exactly as I've described it here.  Wordpad reformatted the .json file into a prettified format of the file.  This didn't seem to bother the VDH Import function.  A subsequent re-export created another file that Notepad displayed as a dog's breakfast.  If there's any concern about this, use something else instead of Wordpad.  I have Notepad++ & even after changing things in the .json, Notepad++ saves the file in the dog's breakfast format, even though it displays the file in the prettified format.  Any replacement for Notepad will probably suit the purpose.  But I tested all of this using Wordpad & it worked fine for me.

As a test after doing all of the above, I picked a random (and short) video off the YouTube home page & downloaded it with VDH.  There were no problems doing this.  The file played fine with both video & audio in VLC.

But then, I'm importing & exporting my own settings, so maybe I'm not challenging my system enough.  Like I said earlier, if this screws things up for you, just re-import your safe copy of your VDH Settings.  But do post here about it & let's discuss what might have gone wrong.

Aslanex

unread,
Jan 11, 2022, 8:27:15 AM1/11/22
to Video DownloadHelper Q&A
I have tried to import your setting exactly how you described - by replacing the "weh-prefs" part of the json file, and it succeeded without any problem. Plus I have NOT changed the lastDownloadDirectory (so it pointed to a non-existing address) but it automatically defaulted to my default Downlads folder.

I am on VDH Version 7.6.3a1, Linux x86-64, Mozilla Firefox 95.0.1




Dne úterý 14. prosince 2021 v 3:26:42 UTC+1 uživatel Wild Willy napsal:

Wild Willy

unread,
Jan 11, 2022, 11:14:43 AM1/11/22
to Video Download Helper Google Group
Thank you for that news! I was worried about the directory since it would not exist on
anybody else's system. I thought there might be a possibility that you could get into an
endless loop trying to correct the bad entry. It's good to know you were able to do
this. Now if we can just get a few other reports . . .
Reply all
Reply to author
Forward
0 new messages