Python script, using the Jellyfin API to merge/split mutiple versions for movies/tv episodes accross the whole library
Only tested on Debian Docker version Jellyfin 10.9.x
sudo apt update
sudo apt install sqlite3
sudo apt install python3
sudo python3 -m pip install requests
sudo chmod +x /path/to/mergesplit.py
api_key = "xxxxxxxxxxxxxx" #Generate this API key from your Jellyfin backend
url = "http://127.0.0.1:8096" #Your Jellyfin address
db = "/etc/jellyfin/config/data/library.db" #Your Jellyfin data path
mergemov - Merge movies(with tmdb data)
mergetvimdb - Merge TV episodes with imdb data
mergetvtvdb - Merge TV episodes with tvdb data
splitmov - Split movies
splittv - Split TV episodes
0 10,23 * * * /root/mergesplit.py mergemov > /root/mergemov.log 2>&1