Skip to content

Instantly share code, notes, and snippets.

@ner00
Created May 19, 2024 16:16
Show Gist options
  • Save ner00/7731ccc4f064de9dac18195c5fb51904 to your computer and use it in GitHub Desktop.
Save ner00/7731ccc4f064de9dac18195c5fb51904 to your computer and use it in GitHub Desktop.
Synology VideoStation TMDB plugin workaround

VideoStation TMDB workaround

This might help those using VideoStation on non-official as well as official Synology systems:

Start by connecting through SSH, then run the commands below:

1. Backup 'constant.py' script:

sudo cp /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py.bak
sudo chmod 644 /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py.bak
sudo chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py.bak

2. Backup 'loader.sh' script:

sudo cp /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh.bak
sudo chmod 644 /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh.bak
sudo chown VideoStation:VideoStation /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh.bak

3. Inject your TMDB API key into 'constant.py' script (replace xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your own key):

sudo sed -i "s/DEFAULT_APIKEY = ''/DEFAULT_APIKEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'/g" /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py

4. Force VideoStation to use 'sed' from '/usr/bin/' instead of '/usr/sbin/':

sudo sed -i "s/ sed \"/ \/usr\/bin\/sed \"/g" /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh

This should make TMDB plugin start working properly, regardless of the "Test Connection" failure in the Video Info Plugin settings page.

If at any point you need to go back, either uninstall/reinstall VideoStation or just restore from the backup files by doing:

sudo cp /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py.bak /var/packages/VideoStation/target/plugins/syno_themoviedb/constant.py
sudo cp /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh.bak /var/packages/VideoStation/target/plugins/syno_themoviedb/loader.sh

Note: When uninstalling VideoStation you have the possibility to check a box, that checkbox decides if you want to wipe the VideoStation metadata database or not. If you haven't fetched any metadata, you should check that box to start from a clean slate.

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