fix: limit filename length to avoid system errors

This commit is contained in:
kevinwatt
2025-02-11 03:19:33 +08:00
parent d9ad402a3d
commit a44d758ca6
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kevinwatt/yt-dlp-mcp",
"version": "0.6.2",
"version": "0.6.3",
"description": "YouTube yt-dlp MCP Server - Download YouTube content via Model Context Protocol",
"keywords": [
"mcp",

View File

@@ -17,7 +17,7 @@ import { rimraf } from "rimraf";
const server = new Server(
{
name: "yt-dlp-mcp",
version: "0.6.2",
version: "0.6.3",
},
{
capabilities: {
@@ -117,7 +117,8 @@ async function downloadVideo(url: string): Promise<string> {
const outputTemplate = path.join(
userDownloadsDir,
`%(title)s [%(id)s] ${timestamp}.%(ext)s`
// Limit title length to 50 characters to avoid filename too long error
`%(title).50s [%(id)s] ${timestamp}.%(ext)s`
);
// Get expected filename