fix: validate stream_url and clear stale session on error

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 10:59:10 -04:00
parent 16812447ef
commit 3e469a931f
2 changed files with 23 additions and 13 deletions

View File

@@ -60,6 +60,10 @@ pub fn resolve(url: &str, cookie_source: &CookieSource) -> Result<VideoMetadata,
.trim()
.to_string();
if stream_url.is_empty() {
return Err("yt-dlp returned an empty stream URL".to_string());
}
Ok(VideoMetadata {
url: url.to_string(),
title: meta.title,