h
This commit is contained in:
@@ -1109,18 +1109,27 @@ def _queue_items(
|
||||
}
|
||||
_send_ipc_command(ytdl_cmd, silent=True)
|
||||
|
||||
# For memory:// M3U payloads (used to carry titles), use loadlist so mpv parses
|
||||
# the content as a playlist and does not expose #EXTINF lines as entries.
|
||||
command_name = "loadfile"
|
||||
try:
|
||||
if isinstance(target_to_send, str) and target_to_send.startswith("memory://") and "#EXTM3U" in target_to_send:
|
||||
command_name = "loadlist"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
cmd = {
|
||||
"command": ["loadfile",
|
||||
"command": [command_name,
|
||||
target_to_send,
|
||||
mode],
|
||||
"request_id": 200
|
||||
}
|
||||
try:
|
||||
debug(f"Sending MPV loadfile: {target_to_send} mode={mode}")
|
||||
debug(f"Sending MPV {command_name}: {target_to_send} mode={mode}")
|
||||
resp = _send_ipc_command(cmd, silent=True)
|
||||
debug(f"MPV loadfile response: {resp}")
|
||||
debug(f"MPV {command_name} response: {resp}")
|
||||
except Exception as e:
|
||||
debug(f"Exception sending loadfile to MPV: {e}", file=sys.stderr)
|
||||
debug(f"Exception sending {command_name} to MPV: {e}", file=sys.stderr)
|
||||
resp = None
|
||||
|
||||
if resp is None:
|
||||
|
||||
Reference in New Issue
Block a user