Skip to content

Instantly share code, notes, and snippets.

@swizzlevixen
Created February 7, 2025 22:59
Show Gist options
  • Save swizzlevixen/62fa0541b719da0fe8130ac129f60997 to your computer and use it in GitHub Desktop.
Save swizzlevixen/62fa0541b719da0fe8130ac129f60997 to your computer and use it in GitHub Desktop.
MakeMKV macOS update keydb.cfg from FindVUK Online Database
#!/bin/zsh
# This script downloads the latest copy of the FindVUK Online Database,
# unzips, and moves it to the logged in user's MakeMKV data directory
# NOTE: This script is designed for use on macOS, with the default
# location for the MakeMKV data directory. If you have changed the
# location in Preferences > General, you will need to edit the line
# that moves the file, near the end of the script.
# Config variables
downloadUrl="http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
zipName="keydb_eng.zip"
filename="keydb.cfg"
# Download
echo "Downloading latest FindVUK Online Database..."
curl -Lo "/tmp/$zipName" "$downloadUrl"
# Check for the file name (case insensitive) inside the zip
if unzip -l /tmp/$zipName | grep -qiF "$filename"; then
# unzip file to /tmp, without any surrounding folder structure
echo "Unzipping..."
unzip -j /tmp/$zipName -d /tmp
else
echo "ERROR: $filename not found inside $zipName"
exit 1
fi
# Confirm the file exists
if [ -f "/tmp/$filename" ]; then
# move file to MakeMKV data directory
echo "Moving to MakeMKV data directory..."
loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
mv /tmp/$filename /Users/$loggedInUser/Library/MakeMKV/$filename
rm /tmp/$zipName
else
echo "ERROR: File not found; possible error unzipping."
exit 1
fi
echo "Done."
exit 0
@swizzlevixen
Copy link
Author

A shell script that you can run to quickly download and update your keydb.cfg file with MakeMKV on macOS. (I'm sure it can be modified easily for Windows and Linux, but I don't have those systems to test on.) It's got some basic error checking built in, but it's not as complex as the KeyDB Helper app on Windows.

Save it as something like makemkv-keydb-update.sh and run chmod u+x makemkv-keydb-update.sh in the Terminal to make it executable. After you do that once, it should be double-clickable to launch itself in the Terminal and run the update.

If this isn't working for you, check MakeMKV > Preferences > General > MakeMKV Data Directory Location and make sure it fits the default pattern /Users/<username>/Library/MakeMKV -- If not, you will need to change the mv command on line 34 to match your actual location.

Posted to the MakeMKV forums on 2025-02-07

@RoachLin
Copy link

For Windows user, download keydb.cfg from http://fvonline-db.bplaced.net/, and put it in %USERPROFILE%\.MakeMKV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment