next_video
Skip to the next video in the current playlist to continue watching content without interruption.
Instructions
Skip to the next video in the current playlist.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:110-127 (handler)The handler implementation for the 'next_video' tool, which triggers a playlist-next command in mpv and returns the updated video status.
server.tool( 'next_video', 'Skip to the next video in the current playlist.', {}, async () => { try { await mpv.command(['playlist-next']); await new Promise((r) => setTimeout(r, 1000)); const [title, pos, count] = await Promise.all([ mpv.getProperty('media-title'), mpv.getProperty('playlist-pos'), mpv.getProperty('playlist-count'), ]); return textResult({ status: 'skipped_next', title, position: `${Number(pos) + 1}/${count}` }); } catch (err) { return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`); } }