alldebrid plugin optimization and mpv playlist fix

This commit is contained in:
2026-04-26 13:48:18 -07:00
parent 67c272db4b
commit c724cb36b1
7 changed files with 147 additions and 31 deletions
+9 -2
View File
@@ -1454,6 +1454,13 @@ def _queue_items(
except Exception:
pass
# Batched queue operations should not block on one IPC reply per item.
# On Windows named pipes, waiting for every `loadfile`/`loadlist` ack can
# make multi-select `.mpv` calls stall for several seconds.
command_wait = bool(wait)
if len(items) > 1:
command_wait = False
# Just verify cookies are configured, don't try to set via IPC
_ensure_ytdl_cookies(config)
@@ -1683,8 +1690,8 @@ def _queue_items(
"request_id": 200
}
try:
debug(f"Sending MPV {command_name}: {target_to_send} mode={mode} wait={wait}")
resp = _send_ipc_command(cmd, silent=True, wait=wait)
debug(f"Sending MPV {command_name}: {target_to_send} mode={mode} wait={command_wait}")
resp = _send_ipc_command(cmd, silent=True, wait=command_wait)
debug(f"MPV {command_name} response: {resp}")
except Exception as e:
debug(f"Exception sending {command_name} to MPV: {e}", file=sys.stderr)