Skip to content

Add title resolution for YouTube videos#755

Open
edieguez wants to merge 2 commits into
Samillion:mainfrom
edieguez:resolve-url-titles
Open

Add title resolution for YouTube videos#755
edieguez wants to merge 2 commits into
Samillion:mainfrom
edieguez:resolve-url-titles

Conversation

@edieguez
Copy link
Copy Markdown

  • Resolve URLs titles using yt-dlp
  • This behaviour can be disabled by changing resolve_url_titles to no

@Samillion
Copy link
Copy Markdown
Owner

Thanks for the contribution, but this falls outside the scope of what ModernZ should handle.

mpv already resolves playlist titles natively. From the manual:
https://github.com/mpv-player/mpv/blob/master/DOCS/man/input.rst

  • media-title uses the file's title tag, falling back to the filename
  • playlist/N/title is populated automatically once an entry has been played, or if the playlist format includes it

Your implementation actually reads playlist/N/title first, which confirms that mpv's own mechanism works.

The yt-dlp fallback is only filling the gap for entries not yet played. Pre-fetching titles for unplayed playlist entries is not something an OSC should be responsible for, especially when it means spawning one yt-dlp subprocess per untitled entry on every playlist-count change.

If this is something you'd like to pursue, it would be better suited as a standalone script that handles playlist pre-fetching independently of the OSC.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants