Skip to content

[Advanced] yt‐dlp plugins

Kieran edited this page Nov 27, 2024 · 5 revisions

Warning

Plugins can change the underlying behaviour of yt-dlp that Pinchflat relies on. There is no guarantee that Pinchflat will work with plugins installed, nor will any support be provided in troubleshooting or adding compatibility for plugins

For those who might want to install yt-dlp plugins, you have two ways you can do it:

Option 1: Docker volume mounts

  1. Map a new path from your host's Pinchflat config directory to /etc/yt-dlp/plugins in your container
    • I would mount it to a new directory in the extras directory. Something like -v /appdata/pinchflat/extras/yt-dlp-plugins:/etc/yt-dlp/plugins
  2. Download your plugin of choice, unzip it, and place it in the directory on your host that you referenced in step 1
  3. That's it! You can open a console into the Pinchflat container and run yt-dlp --verbose to confirm - look for the Extractor Plugins line
  4. If it's not working, ensure you've read yt-dlp's documentation on installing plugins

Option 2: Scripting on app boot

  1. Familiarize yourself with the custom lifecycle scripts documentation
  2. Create a script to download and unzip your plugin of choice into the container's /etc/yt-dlp/plugins directory on the app_init event
    • This is left as an exercise to the reader, but if anyone gets this set up then please leave a comment on #465 and I'll put it as an example here
    • The containers have curl and zip/unzip available but not git due to its impact on final bundle size
  3. Restart the Pinchflat container. That's it! You can open a console into the Pinchflat container and run yt-dlp --verbose to confirm - look for the Extractor Plugins line. Keep in mind that a failure in your script likely won't prevent the app from booting so keep an eye on your logs for error messages.
  4. If it's not working, ensure you've read yt-dlp's documentation on installing plugins