fix: playlist truncation overflow and align logging across plugins
- Fix format_playlist truncation: +4 → +5 to account for ", ..." suffix - Add API error logging to all Sopel command handlers (matching Limnoria) - Add long-track truncation test case Made-with: Cursor
This commit is contained in:
@@ -94,7 +94,7 @@ def format_playlist(data: dict) -> str:
|
||||
for t in tracks:
|
||||
entry = f"{t.get('title', '')} by {t.get('artist', '')}"
|
||||
sep = ", " if parts else ""
|
||||
if length + len(sep) + len(entry) + 4 > _MAX_IRC_LINE: # +4 for " ..."
|
||||
if length + len(sep) + len(entry) + 5 > _MAX_IRC_LINE: # +5 for ", ..."
|
||||
parts.append("...")
|
||||
break
|
||||
parts.append(entry)
|
||||
|
||||
Reference in New Issue
Block a user