Resolved

YouTube playlist names generated incorrectly from AI titles instead of user topic

Python
YouTube API
Automation
Metadata
Content Management
Bug Fix
Data Pipeline
AI Integration

Auto-generated YouTube playlists used unpredictable AI title parsing instead of the user-provided --topic argument | Resulted in inconsistent playlist names breaking content organization

A Python-based video automation pipeline using the FastMCP orchestrator was generating YouTube playlists with inconsistent names derived from AI-generated video titles rather than the user-provided --topic argument. This disrupted content organization and discoverability.

Issue

YouTube playlists were created with unpredictable names based on AI-generated titles instead of the explicit --topic argument provided by users. For example, users expecting a playlist named “FastMCP 2.0 Tutorials” would instead receive “FastMCP Tool Registration Tutorials”, breaking content consistency and discoverability. This issue occurred during every automated upload with playlists enabled.

Culprit

The playlist naming logic in the system incorrectly relied on parsing AI-generated video titles rather than using the preserved --topic argument. The flawed algorithm:

  • Extracted a full AI title (e.g., “FastMCP Tool Registration and Resource Guide Tutorial”).
  • Split the title using hardcoded separators like “Tutorial”.
  • Used the first 3 words of the remaining string to form the playlist name.

This approach failed because:

  • AI-generated titles were creative and unpredictable, making reliable parsing impossible.
  • The user-provided --topic argument was never passed through the metadata pipeline.
  • The parsing logic could not reliably extract the original topic from AI titles.

Solution

Metadata Preservation

  • Enhanced the metadata pipeline to preserve the original --topic argument for use in playlist naming.
  • Added the topic field to metadata objects in both regular and short-form video uploads.

Playlist Naming Logic

  • Updated the playlist naming logic to prioritize the preserved --topic argument.
  • Maintained backward compatibility by falling back to title parsing if no topic was provided.

Key Changes:

  • Playlist names now consistently match the user-provided --topic argument.
  • Backward compatibility ensured for existing content.
  • No reliance on unreliable AI-generated title parsing.

Result: Playlist names now reflect the user’s intended topic (e.g., “FastMCP 2.0 Tutorials”) while maintaining consistency across all automated uploads.