# Forking MeTube ~ You can just do stuff

**Published:** 2026-01-04

**Author:** Alessandro Pogliaghi
**URL:** https://apogliaghi.com/2026/01/forking-metube-~-you-can-just-do-stuff/


## The Itch

[MeTube](https://github.com/alexta69/metube) is a neat self-hosted YouTube downloader with a clean web UI. Paste a link, pick your format, hit download. Simple.

Except YouTube decided that simple things shouldn't stay simple.

At some point, downloads started failing with the lovely "Sign in to confirm you're not a bot" message. Classic. YouTube's bot detection had gotten stricter, the web is not fun anymore.

On top of that, I wanted my downloaded videos to actually show up properly in Jellyfin instead of appearing as mysterious "Unknown" entries with no metadata. Two itches, one fork.

{{< figure src="/img/_metube-pot/metube_homepage.png" position="center" caption="MeTube POT interface" >}}

## POT (Proof-of-Origin) Support

YouTube's anti-bot measures work by requiring a "Proof-of-Origin" token, basically proving that the request comes from a legitimate browser session rather than some script hammering their servers.

The fix? [bgutil-ytdlp-pot-provider](https://github.com/Brainicism/bgutil-ytdlp-pot-provider). It's a yt-dlp plugin that generates these POT tokens, making YouTube believe the requests are coming from an actual browser.

## Jellyfin Integration

{{< figure src="/img/_metube-pot/jellyfin_homepage.png" position="center" caption="Video properly displayed in Jellyfin with full metadata" >}}

Here's the thing about downloading YouTube videos: yt-dlp can grab a ton of metadata and save it as a `.info.json` file alongside the video. Title, description, upload date, channel name, tags, duration, everything.

Jellyfin, however, doesn't speak `.info.json`. It wants `.nfo` files, an XML format that media servers have used since the Kodi days.

So I wrote a post-processor hook that runs after each download completes. 

It reads the `.info.json`, extracts the relevant fields, and generates a Jellyfin-compatible `.nfo` file. The metadata mapping looks like this:

- **Title** and **Original Title** from the video title
- **Plot** from the description
- **Year** and **Premiered** from the upload date
- **Studio** and **Director** mapped to the uploader/channel
- **Tags** from the video tags (capped at 20 to keep things sane)
- **Runtime** converted from seconds to minutes
- **Unique ID** storing the YouTube video ID

After generating the `.nfo`, the hook cleans up by deleting the original `.info.json`. No leftover clutter.

## Keeping Up with Upstream

{{< figure src="/img/_metube-pot/aint_nobody.png" position="center" caption="Creating a meme without Nano Banana 🍌? Ain't nobody got time for that!" width="600px" >}}

Forking is easy. Maintaining a fork? Not so fun.

The upstream MeTube repo keeps getting updates: bug fixes, new features, dependency bumps. 

I automated this with a GitHub Action (lame, I know) that runs weekly. Here's what it does:

1. **Fetches the latest upstream release** from the original MeTube repo
2. **Checks if it's already been analyzed** (no point in creating duplicate reports)
3. **Generates a diff** between the fork and the new release
4. **Sends the diff to an LLM** for analysis because, I ain't got time for that
5. **Creates a GH issue** with the analysis report


The result? A nicely formatted issue telling me whether I should bother merging upstream changes or if I can safely ignore them. The boring parts of fork maintenance, automated.

## Use it yourself

The fork lives at [tatoalo/metube_pot](https://github.com/tatoalo/metube_pot). If you're running MeTube and hitting YouTube's bot detection, or you want your downloads to play nice with Jellyfin, give it a spin:

```bash
docker pull ghcr.io/tatoalo/metube_pot
```

Sometimes you just see something that's 90% of what you need, and the remaining 10% is an afternoon of hacking. Fork stuff, scratch your own itches, automate the tedious parts.

__Note__: I don't condone piracy. Use this tool responsibly and ethically. Also, respect YouTube's terms of service and copyright laws. 🤷‍♂️

__Note__: This has been done for fun and for research purposes. 🤷‍♂️🤷‍♂️

