RB.RhythmDBEntryType¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
metadata cache name |
||
r/w/co |
|
||
r/w/co |
|
||
r/w/co |
entry type name |
||
r/w/co |
whether to save this type of entry to disk |
||
r/w/co |
size of entry type specific data |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.RhythmDBEntryType(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This is the base class for database entry type classes, which provide some aspects of the behaviour of database entry types. There are different entry types for songs, radio streams, podcast feeds and episodes, and so on.
Plugins written in Python or Vala can create new entry types by subclassing and overriding any methods required. Plugins written in C can create a new instance of the
RB.RhythmDBEntryType
base class and use its function pointer members rather than subclassing.- fetch_metadata(uri, metadata)¶
- Parameters:
uri (
str
) – uri of the item to fetchmetadata ([
RB.RhythmDBEntryChange
]) – returns fetched metadata
- Returns:
True
if metadata is returned- Return type:
Fetches metadata for a URI (not an entry yet, at this point) from a cache, if possible.
The metadata array contains
RB.RhythmDBEntryChange
items with just the ‘new’ value set.
- purge_metadata_cache(prefix, max_age)¶
- do_can_sync_metadata(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –- Return type:
- do_create_ext_db_key(entry, prop) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –prop (
RB.RhythmDBPropType
) –
- Return type:
- do_destroy_entry(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –
- do_entry_created(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –
- do_get_playback_uri(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –- Return type:
- do_update_availability(entry, avail) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –avail (
RB.RhythmDBEntryAvailability
) –
Property Details¶
- RB.RhythmDBEntryType.props.cache_name¶
- Name:
cache-name
- Type:
- Default Value:
- Flags:
Metadata cache name. For entry types created by a plugin, should match the plugin name. If this is set, the entry type must also implement the uri_to_cache_key method.
- RB.RhythmDBEntryType.props.category¶
- Name:
category
- Type:
- Default Value:
- Flags:
The
RB.RhythmDBEntryCategory
that this entry type fits into.
- RB.RhythmDBEntryType.props.db¶
- Name:
db
- Type:
- Default Value:
- Flags:
The
RB.RhythmDB
instance.
- RB.RhythmDBEntryType.props.name¶
- Name:
name
- Type:
- Default Value:
- Flags:
Entry type name. This must be unique.
- RB.RhythmDBEntryType.props.save_to_disk¶
- Name:
save-to-disk
- Type:
- Default Value:
- Flags:
If
True
, entries of this type should be written to the on-disk database.
- RB.RhythmDBEntryType.props.type_data_size¶
- Name:
type-data-size
- Type:
- Default Value:
0
- Flags:
The size of the type-specific data structure to allocate for each entry of this type.