Skip to content

fix(library): harden status parsing and metadata id handling - #6

Merged
dogbertdev merged 2 commits into
mainfrom
feature/library-tigerstyle-hardening
Mar 4, 2026
Merged

dogbertdev merged 2 commits into
mainfrom
feature/library-tigerstyle-hardening

Conversation

@dogbertdev

Copy link
Copy Markdown
Owner

Summary

  • preserve comma-separated metadata IDs while safely path-encoding each segment for library metadata operations
  • fail fast on invalid numeric attributes when parsing /activities and /status/sessions/background
  • keep library status machine-friendly for empty output paths
  • add focused helper tests for ID encoding and numeric parsing behavior

Changes

  • internal/plexclient/client.go
    • add strict parse-error handling for activity/background task numeric fields
    • add encode_metadata_ids helper behavior via encodeMetadataIDs
  • internal/cmd/library.go
    • keep status output deterministic for empty/non-empty data
  • internal/plexclient/client_helpers_test.go
    • tests for encodeMetadataIDs, parseOptionalFloat, and parseOptionalInt64

Testing

  • go test ./...

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89f208f980

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/plexclient/client.go Outdated
@dogbertdev

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dogbertdev
dogbertdev merged commit 999bfcb into main Mar 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant