Skip to content

Make the channel-name prefix in embedded MP4 title optional #829

Description

@Sissing

Summary

The embedded MP4 title tag is always written as "<channel> - <title>", with no way to turn the channel prefix off. In a Plex TV Shows library this makes every episode title redundant, because the channel is already the show name:

TED                                <- show
  Season 2026
    TED - How to build a better city    <- episode
    TED - The future of clean energy    <- episode
    TED - Why we sleep                  <- episode

The desired episode title is just How to build a better city.

Notably, the .nfo files already contain the clean title: only the embedded tag carries the prefix:

Source Value
.nfo <title> How to build a better city
Embedded MP4 tag TED - How to build a better city

Cause

server/modules/videoDownloadPostProcessFiles.js:489-492 hardcodes the prefix:

// Title (channel name + video title)
const channelName = jsonData.uploader || jsonData.channel || jsonData.uploader_id || '';
if (channelName && jsonData.title) {
  apArgs.push('--title', `${channelName} - ${jsonData.title}`);
}

Because this runs as an AtomicParsley post-process after yt-dlp exits, it also overwrites anything set via Custom yt-dlp Arguments. I first tried --parse-metadata "%(title)s:%(meta_title)s", which has no effect, because yt-dlp writes the clean title and this step then replaces it. Worth noting for anyone who finds this issue and tries the same workaround.

The channel name is separately available to Plex via --TVNetwork, --copyright, --artist and --album on the following lines, so dropping it from --title loses no information.

Steps to reproduce

  1. Set Settings → Core → Video Filename Template to the Plex TV Series preset
  2. Subscribe to any channel and download a video
  3. ffprobe -show_entries format_tags=title <file>.mp4

Expected: How to build a better city
Actual: TED - How to build a better city

Suggested fix

A settings toggle, consistent with how the neighbouring metadata options already work. The same file has helpers for exactly this pattern (videoDownloadPostProcessFiles.js:53-69):

function shouldWriteChannelPosters() {
  const config = configModule.getConfig() || {};
  return config.writeChannelPosters !== false;
}

So something like config.prefixChannelNameInTitle !== false would match the existing convention, default to current behaviour, and keep it backwards compatible:

const includeChannelPrefix = shouldPrefixChannelNameInTitle();
if (channelName && jsonData.title) {
  apArgs.push('--title', includeChannelPrefix
    ? `${channelName} - ${jsonData.title}`
    : jsonData.title);
}

This matters most for the TV Shows library layout added in #704, where the channel is already the show name. For "Other Videos" libraries the prefix is genuinely useful, since there is no parent grouping, hence a toggle rather than removing it outright.

Environment

  • Youtarr 1.82.1 (Docker, dialmaster/youtarr:v1.82.1)
  • yt-dlp 2026.08.19
  • Plex Media Server 1.43.4, library type TV Shows, agent Personal Media Shows
  • Host: macOS (Docker Desktop), MariaDB 11.4 sidecar

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions