Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server/player): support getting/setting nested metadata #653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mafewtm
Copy link
Member

@mafewtm mafewtm commented Jan 4, 2025

Description

Handles nested metadata as requested in #646. Doesn't allow for more than one level deep. I think there's probably a better way to do this but right now it just checks for periods as seperators.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

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

What if we split the key on periods using gmatch, then iterate over the nested keys to have this solution work for any depth. One thing I didn't think of, could this be a problem for existing metadata event handlers. i.e. if someone is listening for a change in the key 'license', then this solution would also need to emit the event for the top level key in addition to the nested key string to preserve backwards compatibility.

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.

2 participants