player_next
Skip to the next media item in the playlist when controlling the mpv player through AI conversation.
Instructions
Skip to the next item in the playlist.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:544-555 (handler)Handler logic for the player_next tool, which skips to the next item in the mpv playlist.
case "player_next": { await ensureMpv(); const plCount = await getProperty("playlist-count").catch(() => 0); const plPos = await getProperty("playlist-pos").catch(() => 0); if (plCount <= 1 || plPos >= plCount - 1) { return fail("已经是最后一首,没有下一曲"); } await mpv("playlist-next", ["weak"]); await setProperty("pause", false); const nextTitle = await getProperty("media-title").catch(() => null); return ok(`Playing next: ${nextTitle || "unknown"}`); } - index.js:353-356 (schema)Schema definition for the player_next tool.
name: "player_next", description: "Skip to the next item in the playlist.", inputSchema: { type: "object", properties: {} }, },