fix: limit filename length to avoid system errors
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user