lbryio / spec

LBRY protocol specification
https://spec.lbry.io
MIT License
8 stars 9 forks source link

proposal: metadata extensions #32

Closed lyoshenka closed 1 year ago

lyoshenka commented 2 years ago

LBRY has a base schema for claim metadata. This schema is very general. Different file types and communities will want to include metadata that is specific to them. It would be good to have a mechanism to suppor this.

One idea for this is to allow publishing of metadata schemas to LBRY itself. This would be a new claim type (Schema). The schema would be a protobuf file (or similar, if protobufs cannot be compiled live), plus other information that hubs need (e.g. which fields to index). Then a claim can reference a published schema to tell hubs how to decode extra metadata contained in the claim.

Schema claim type

Stream and Channel claim changes

SDK search changes

The SDK would switch from using flags for search to using a simple DSL. This way the SDK does not need to know all possible metadata fields in advance.

Concerns

lyoshenka commented 1 year ago

we're doing a limited version of this here https://github.com/lbryio/lbry-sdk/pull/3706

will revisit after thats been out in the wild