OpenBroadcaster Documentation
models / mediametadata_model.php

MediaMetadataModel

Model

Secondary model for managing media metadata.

public  delete ( id )

Delete a metadata field.

Parameters
id
Returns was_deleted
public  get_all ( )

Get all metadata columns.

Returns metadata_columns
public  get_by_name ( name )

Get a metadata column by name.

Parameters
name
metadata_column
public  get_fields ( )

Get metadata field settings, which fields are required/enabled/disabled, and dynamic content field settings.

Returns field_settings
public  get_one ( id )

Get a metadata column.

Parameters
id
metadata_column
public  required_fields ( data )

Update required field settings.

Parameters
data
public  save ( data, id )

Save a metadata field.

Parameters
data
id Optional. Specified when updating an existing metadata field.
Returns id
public  save_field_order ( order )

Save a new order for metadata fields.

Parameters
order An array of metadata column IDs in the preferred order.
Returns is_valid_order
public  tag_search ( data )

Search tags in a metadata field of the tag type. Maximum 25 tags returned by query.

Parameters
data
Returns results
public  validate ( data, id )

Validate metadata field before updating.

Parameters
data
id Optional. Specified when updating an existing metadata field.
Returns [is_valid, msg]
public  validate_fields ( data )

Validate metadata fields. Making sure that all the mandatory fields are set, and that metadata has no invalid associated values.

Parameters
data