RB.MetaData¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class RB.MetaData(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
Provides a simple synchronous interface for metadata extraction and updating.
- classmethod get_field_name(field)¶
 - Parameters:
 field (
RB.MetaDataField) – aRB.MetaDataField- Returns:
 field name
- Return type:
 
Returns the name of a metadata field.
- classmethod get_field_type(field)¶
 - Parameters:
 field (
RB.MetaDataField) – aRB.MetaDataField- Returns:
 value type
- Return type:
 
Returns the
GObject.GTypeof the value for a metadata field.
- classmethod new()¶
 - Returns:
 new
RB.MetaDatainstance- Return type:
 
Creates a new metadata backend instance.
- can_save(media_type)¶
 - Parameters:
 media_type (
str) – the media type string to check- Returns:
 Trueif the file metadata for the given media type can be updated- Return type:
 
Checks if the metadata writer is capable of updating file metadata for a given media type.
- get(field)¶
 - Parameters:
 field (
RB.MetaDataField) – theRB.MetaDataFieldto retrieve- Returns:
 Trueif a value was returned- val:
 returns the field value
- Return type:
 (
bool, val:GObject.Value)
Retrieves the value of a metadata field extracted from the target URI. If the target URI contained no value for the field, returns
False.
- get_media_type()¶
 - Returns:
 media type string
- Return type:
 
Returns the type of the file from which metadata was read. This may look like a MIME type, but it isn’t.
- get_missing_plugins()¶
 - Returns:
 Trueif missing plugin information was returned- missing_plugins:
 returns machine-readable missing plugin information
- plugin_descriptions:
 returns human-readable missing plugin descriptions
- Return type:
 
This function returns the information used to request automatic installation of media framework plugins required to decode the target URI. Use
GLib.strfreev() to free the returned information arrays.
- get_saveable_types()¶
 - Returns:
 a
None-terminated array of media type strings. UseGLib.strfreevto free it.- Return type:
 [
str]
Constructs a list of the media types for which the metadata backend implements tag saving.
- has_missing_plugins()¶
 - 
If the metadata reader could not decode the file it was asked to because one or more media framework plugins (specifically, for the existing implementations, GStreamer plugins) required are missing, this will return
True. 
- load(uri)¶
 - Parameters:
 uri (
str) – URI from which to load metadata- Raises:
 
Reads metadata information from the specified URI. Once this has returned successfully (with *error ==
None),RB.MetaData.get,RB.MetaData.get_media_type,RB.MetaData.has_missing_plugins, andRB.MetaData.get_missing_pluginscan usefully be called.
- reset()¶
 Resets the state of the metadata interface. Call this before setting tags to be written to a file.
- save(uri)¶
 - Parameters:
 uri (
str) – the target URI- Raises:
 
Saves all metadata changes made with
RB.MetaData.setto the target URI.
- set(field, val)¶
 - Parameters:
 field (
RB.MetaDataField) – theRB.MetaDataFieldto setval (
GObject.Value) – the value to set
- Returns:
 Trueif the field is valid- Return type:
 
Sets a metadata field value. The value is only stored inside the
RB.MetaDataobject untilRB.MetaData.saveis called.