Grl.Media

g GObject.Object GObject.Object Grl.Data Grl.Data GObject.Object->Grl.Data Grl.Media Grl.Media Grl.Data->Grl.Media

Subclasses:

None

Methods

Inherited:

Grl.Data (36), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

audio_new ()

class

container_new ()

class

image_new ()

class

new ()

class

unserialize (serial)

class

video_new ()

add_artist (artist)

add_author (author)

add_director (director)

add_external_player (player)

add_external_url (url)

add_genre (genre)

add_keyword (keyword)

add_lyrics (lyrics)

add_mb_artist_id (mb_artist_id)

add_performer (performer)

add_producer (producer)

add_region_data (region, publication_date, certificate)

add_thumbnail (thumbnail)

add_thumbnail_binary (thumbnail, size)

add_url_data (url, mime, bitrate, framerate, width, height)

get_album ()

get_album_artist ()

get_album_disc_number ()

get_artist ()

get_artist_nth (index)

get_author ()

get_author_nth (index)

get_bitrate ()

get_camera_model ()

get_certificate ()

get_childcount ()

get_composer ()

get_composer_nth (index)

get_creation_date ()

get_description ()

get_director ()

get_director_nth (index)

get_duration ()

get_episode ()

get_episode_title ()

get_exposure_time ()

get_external_url ()

get_external_url_nth (index)

get_favourite ()

get_flash_used ()

get_framerate ()

get_genre ()

get_genre_nth (index)

get_height ()

get_id ()

get_iso_speed ()

get_keyword ()

get_keyword_nth (index)

get_last_played ()

get_last_position ()

get_license ()

get_lyrics ()

get_lyrics_nth (index)

get_mb_album_id ()

get_mb_artist_id ()

get_mb_artist_id_nth (index)

get_mb_recording_id ()

get_mb_release_group_id ()

get_mb_release_id ()

get_mb_track_id ()

get_media_type ()

get_mime ()

get_modification_date ()

get_orientation ()

get_original_title ()

get_performer ()

get_performer_nth (index)

get_play_count ()

get_player ()

get_player_nth (index)

get_producer ()

get_producer_nth (index)

get_publication_date ()

get_rating ()

get_region ()

get_region_data ()

get_region_data_nth (index)

get_season ()

get_show ()

get_site ()

get_size ()

get_source ()

get_start_time ()

get_studio ()

get_thumbnail ()

get_thumbnail_binary (size)

get_thumbnail_binary_nth (size, index)

get_thumbnail_nth (index)

get_title ()

get_track_number ()

get_url ()

get_url_data (framerate, width, height)

get_url_data_nth (index, framerate, width, height)

get_width ()

is_audio ()

is_container ()

is_image ()

is_video ()

serialize ()

set_album (album)

set_album_artist (album_artist)

set_album_disc_number (disc_number)

set_artist (artist)

set_author (author)

set_bitrate (bitrate)

set_camera_model (camera_model)

set_certificate (certificate)

set_childcount (childcount)

set_composer (composer)

set_creation_date (creation_date)

set_description (description)

set_director (director)

set_duration (duration)

set_episode (episode)

set_episode_title (episode_title)

set_exposure_time (exposure_time)

set_external_player (player)

set_external_url (url)

set_favourite (favourite)

set_flash_used (flash_used)

set_framerate (framerate)

set_genre (genre)

set_height (height)

set_id (id)

set_iso_speed (iso_speed)

set_keyword (keyword)

set_last_played (last_played)

set_last_position (last_position)

set_license (license)

set_lyrics (lyrics)

set_mb_album_id (mb_album_id)

set_mb_artist_id (mb_artist_id)

set_mb_recording_id (mb_recording_id)

set_mb_release_group_id (mb_release_group_id)

set_mb_release_id (mb_release_id)

set_mb_track_id (mb_track_id)

set_mime (mime)

set_modification_date (modification_date)

set_orientation (orientation)

set_original_title (original_title)

set_performer (performer)

set_play_count (play_count)

set_producer (producer)

set_publication_date (date)

set_rating (rating, max)

set_region (region)

set_region_data (region, publication_date, certificate)

set_season (season)

set_show (show)

set_site (site)

set_size (size)

set_source (source)

set_studio (studio)

set_thumbnail (thumbnail)

set_thumbnail_binary (thumbnail, size)

set_title (title)

set_track_number (track_number)

set_url (url)

set_url_data (url, mime, bitrate, framerate, width, height)

set_width (width)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

media-type

Grl.MediaType

r/w/c

Type of media

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Grl.Data

r

Class Details

class Grl.Media(**kwargs)
Bases:

Grl.Data

Abstract:

No

Structure:

Grl.MediaClass

classmethod audio_new()
Returns:

a newly-allocated media audio.

Return type:

Grl.Media

Creates a new media audio object.

New in version 0.1.4.

classmethod container_new()
Returns:

a newly-allocated media container.

Return type:

Grl.Media

Creates a new media container object.

New in version 0.3.0.

classmethod image_new()
Returns:

a newly-allocated media image.

Return type:

Grl.Media

Creates a new media image object.

New in version 0.1.4.

classmethod new()
Returns:

a newly-allocated data media.

Return type:

Grl.Media

Creates a new data media object.

classmethod unserialize(serial)
Parameters:

serial (str) – a serialized media

Returns:

the Grl.Media from the serial

Return type:

Grl.Media

Unserializes a Grl.Media.

New in version 0.1.6.

classmethod video_new()
Returns:

a newly-allocated media video.

Return type:

Grl.Media

Creates a new media video object.

New in version 0.1.4.

add_artist(artist)
Parameters:

artist (str) – an audio’s artist

Adds a new artist to self.

New in version 0.3.0.

add_author(author)
Parameters:

author (str) – an author for self

Adds a new author to self.

New in version 0.1.10.

add_director(director)
Parameters:

director (str) – director of the movie

Adds the director of the media

New in version 0.3.0.

add_external_player(player)
Parameters:

player (str) – an external player for self

Adds a new external player to self.

New in version 0.1.10.

add_external_url(url)
Parameters:

url (str) – an external url for self

Adds a new external url to self.

New in version 0.1.10.

add_genre(genre)
Parameters:

genre (str) – an audio’s genre

Adds a new genre to self.

New in version 0.3.0.

add_keyword(keyword)
Parameters:

keyword (str) – a keyword describing the media

Adds the keyword describing the self.

New in version 0.2.3.

add_lyrics(lyrics)
Parameters:

lyrics (str) – an audio’s lyrics

Adds a new lyrics to self.

New in version 0.3.0.

add_mb_artist_id(mb_artist_id)
Parameters:

mb_artist_id (str) – a MusicBrainz artist identifier

Adds a new MusicBrainz artist id to self.

New in version 0.3.0.

add_performer(performer)
Parameters:

performer (str) – an actor performing in the movie

Adds the actor performing in the movie.

New in version 0.3.0.

add_producer(producer)
Parameters:

producer (str) – producer of the movie

Adds the producer of the media.

New in version 0.3.0.

add_region_data(region, publication_date, certificate)
Parameters:
  • region (str) – the region’s ISO-3166-1 code

  • publication_date (GLib.DateTime) – the publication date

  • certificate (str) – the age certification

Adds regional publication and certification information for region.

New in version 0.2.3.

add_thumbnail(thumbnail)
Parameters:

thumbnail (str) – a thumbnail for self

Adds a new thumbnail to self.

New in version 0.1.10.

add_thumbnail_binary(thumbnail, size)
Parameters:
  • thumbnail (int) – a buffer containing the thumbnail for self

  • size (int) – size of buffer

Adds a new thumbnail to self.

New in version 0.1.10.

add_url_data(url, mime, bitrate, framerate, width, height)
Parameters:
  • url (str) – a media’s URL

  • mime (str) – th url mime type

  • bitrate (int) – the url bitrate, or -1 to ignore

  • framerate (float) – media framerate, or -1 to ignore

  • width (int) – media width, or -1 to ignore

  • height (int) – media height, or -1 to ignore

Sets all the keys related with the URL of a media resource and adds it to self (useful for resources with more than one URL).

New in version 0.3.0.

get_album()
Returns:

the album of the media

Return type:

str

New in version 0.3.0.

get_album_artist()
Returns:

the main artist of the album of the media

Return type:

str

New in version 0.3.1.

get_album_disc_number()
Returns:

the disc number of the media for multi-disc album sets.

Return type:

int

New in version 0.3.1.

get_artist()
Returns:

the artist of the media

Return type:

str

New in version 0.3.0.

get_artist_nth(index)
Parameters:

index (int) – element to retrieve, starting at 0

Returns:

the n-th artist of the media

Return type:

str

New in version 0.3.0.

get_author()
Returns:

the media’s author

Return type:

str

New in version 0.1.4.

get_author_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the n-th media’s author.

Return type:

str

New in version 0.1.10.

get_bitrate()
Returns:

the bitrate of the media

Return type:

int

New in version 0.3.0.

get_camera_model()
Returns:

model of camera used to take picture

Return type:

str

New in version 0.3.0.

get_certificate()
Returns:

the media’s age certification

Return type:

str

Returns the media’s first age certificate. This should usually be the media’s most relevant age certificate. Use Grl.Media.get_region_data_nth() to get other age certificates.

New in version 0.1.6.

get_childcount()
Returns:

number of children, or Grl.METADATA_KEY_CHILDCOUNT_UNKNOWN if unknown.

Return type:

int

Number of children of this container.

New in version 0.3.0.

get_composer()
Returns:

the composer of the media

Return type:

str

New in version 0.3.1.

get_composer_nth(index)
Parameters:

index (int) – element to retrieve, starting at 0

Returns:

the n-th composer of the media

Return type:

str

New in version 0.3.1.

get_creation_date()
Returns:

date when media was created (owned by self).

Return type:

GLib.DateTime

New in version 0.2.0.

get_description()
Returns:

the media’s description

Return type:

str

New in version 0.1.4.

get_director()
Returns:

the director of the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_director_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the director of the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_duration()
Returns:

the media’s duration in seconds

Return type:

int

New in version 0.1.4.

get_episode()
Returns:

the episode number of the media

Return type:

int

New in version 0.3.0.

get_episode_title()
Returns:

the title of the episode

Return type:

str

New in version 0.3.0.

get_exposure_time()
Returns:

picture’s exposure time

Return type:

float

New in version 0.3.0.

get_external_url()
Returns:

URL of an external location where the user play the media.

Return type:

str

New in version 0.1.6.

get_external_url_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the n-th media’s external location where the user can play it.

Return type:

str

New in version 0.1.10.

get_favourite()
Returns:

whether the media is favourite or not

Return type:

bool

New in version 0.2.3.

get_flash_used()
Returns:

whether the flash was used.

See http://library.gnome.org/devel/ontology/unstable/nmm-classes.html#nmm-Flash

Return type:

str

New in version 0.3.0.

get_framerate()
Returns:

the framerate of the media

Return type:

float

New in version 0.3.0.

get_genre()
Returns:

the genre of the media

Return type:

str

New in version 0.3.0.

get_genre_nth(index)
Parameters:

index (int) – element to retrieve, starting at 0

Returns:

the n-th genre of the media

Return type:

str

New in version 0.3.0.

get_height()
Returns:

the height of the media

Return type:

int

New in version 0.3.0.

get_id()
Returns:

the media’s identifier

Return type:

str

New in version 0.1.4.

get_iso_speed()
Returns:

picture’s iso speed

Return type:

float

New in version 0.3.0.

get_keyword()
Returns:

the keyword describing the self (owned by self).

Return type:

str

New in version 0.2.3.

get_keyword_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the keyword describing the self (owned by self).

Return type:

str

New in version 0.2.3.

get_last_played()
Returns:

the media’s last played time

Return type:

GLib.DateTime

New in version 0.3.0.

get_last_position()
Returns:

the media’s last_played position (in seconds)

Return type:

int

New in version 0.1.4.

get_license()
Returns:

the license the media is under

Return type:

str

New in version 0.1.6.

get_lyrics()
Returns:

the lyrics of the media

Return type:

str

New in version 0.3.0.

get_lyrics_nth(index)
Parameters:

index (int) – element to retrieve, starting at 0

Returns:

the n-th lyrics of the media

Return type:

str

New in version 0.3.0.

get_mb_album_id()
Returns:

the MusicBrainz album identifier

Return type:

str

New in version 0.3.0.

Deprecated since version 0.3.8: in favor of more specific metadata-keys Grl.METADATA_KEY_MB_RELEASE_ID and Grl.METADATA_KEY_MB_RELEASE_GROUP_ID

get_mb_artist_id()
Returns:

the MusicBrainz artist identifier

Return type:

str

New in version 0.3.0.

get_mb_artist_id_nth(index)
Parameters:

index (int) – element to retrieve, starting at 0

Returns:

the n-th MusicBrainz artist identifier of the media

Return type:

str

New in version 0.3.0.

get_mb_recording_id()
Returns:

the MusicBrainz recording identifier

Return type:

str

New in version 0.3.0.

get_mb_release_group_id()
Returns:

the MusicBrainz release group identifier of the media

Return type:

str

New in version 0.3.8.

get_mb_release_id()
Returns:

the MusicBrainz release identifier of the media

Return type:

str

New in version 0.3.8.

get_mb_track_id()
Returns:

the MusicBrainz track identifier

Return type:

str

New in version 0.3.0.

get_media_type()
Returns:

media type

Return type:

Grl.MediaType

Gets the “media-type” property.

New in version 0.3.0.

get_mime()
Returns:

the media’s mime-type

Return type:

str

New in version 0.1.4.

get_modification_date()
Returns:

date when the media was last modified (owned by self).

Return type:

GLib.DateTime

New in version 0.2.0.

get_orientation()
Returns:

degrees clockwise orientation of the picture

Return type:

int

New in version 0.3.0.

get_original_title()
Returns:

the original, untranslated title of the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_performer()
Returns:

the actor performing in the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_performer_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the actor performing in the movie (owned by medi).

Return type:

str

New in version 0.3.0.

get_play_count()
Returns:

the media’s play count

Return type:

int

New in version 0.1.4.

get_player()
Returns:

URL of an external player object for this media

Return type:

str

New in version 0.1.6.

get_player_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the n-th media’s external player object.

Return type:

str

New in version 0.1.10.

get_producer()
Returns:

the producer of the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_producer_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the producer of the movie (owned by self).

Return type:

str

New in version 0.3.0.

get_publication_date()
Returns:

the publication date of self (owned by self).

Return type:

GLib.DateTime

New in version 0.2.0.

get_rating()
Returns:

the media’s rating

Return type:

float

New in version 0.1.5.

get_region()
Returns:

the ISO-3166-1 of the region where the media was published (owned by self).

Return type:

str

New in version 0.2.3.

get_region_data()
Returns:

the ISO-3166-1 of the region where the media was published (owned by self).

publication_date:

the publication date, or None to ignore.

certificate:

the age certification, or None to ignore.

Return type:

(str, publication_date: GLib.DateTime, certificate: str)

Returns the media’s age certificate and publication date for the first region. This should usually be the media’s most relevant region. Use Grl.Media.get_region_data_nth() to get the age certificate and publication date for other regions.

New in version 0.2.3.

get_region_data_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the ISO-3166-1 of the region where the media was published (owned by self).

publication_date:

the publication date, or None to ignore.

certificate:

the age certification, or None to ignore.

Return type:

(str, publication_date: GLib.DateTime, certificate: str)

Returns the media’s age certificate and publication date for one region. Use Grl.Data.length() with Grl.METADATA_KEY_REGION to discover how many regions are available. For instance:

guint count = grl_data_length (GRL_DATA (media), GRL_METADATA_KEY_REGION);
guint i;
for (i = 0; i < count; ++i) {
  const GDateTime* publication_date = NULL;
  const gchar* certificate = NULL;
  const gchar* region =
    grl_media_get_region_data_nth (media, i,
      &publication_date, &certificate);
  ...
}

New in version 0.2.3.

get_season()
Returns:

the season number of the media

Return type:

int

New in version 0.3.0.

get_show()
Returns:

the show title of the media

Return type:

str

New in version 0.3.0.

get_site()
Returns:

the media’s site

Return type:

str

New in version 0.1.4.

get_size()
Returns:

the media’s size, in bytes or -1 if unknown.

Return type:

int

New in version 0.2.10.

get_source()
Returns:

the media’s source

Return type:

str

New in version 0.1.4.

get_start_time()
Returns:

the start time of the logical media resource inside the file containing it, in seconds.

Return type:

float

New in version 0.1.19.

get_studio()
Returns:

the studio the media is from

Return type:

str

New in version 0.1.6.

get_thumbnail()
Returns:

the media’s thumbnail URL

Return type:

str

New in version 0.1.4.

get_thumbnail_binary(size)
Parameters:

size (int) – pointer to storing the thumbnail buffer size

Returns:

the media’s thumbnail data and set size to the thumbnail buffer size

Return type:

int

New in version 0.1.9.

get_thumbnail_binary_nth(size, index)
Parameters:
  • size (int) – pointer to store the thumbnail buffer size

  • index (int) – element to retrieve

Returns:

the n-th media’s thumbnail binary and sets size to the thumbnail buffer size.

Return type:

int

New in version 0.1.10.

get_thumbnail_nth(index)
Parameters:

index (int) – element to retrieve

Returns:

the n-th media’s thumbnail.

Return type:

str

New in version 0.1.10.

get_title()
Returns:

the media’s title

Return type:

str

New in version 0.1.4.

get_track_number()
Returns:

the track number of the media

Return type:

int

New in version 0.3.0.

get_url()
Returns:

the media’s URL

Return type:

str

New in version 0.1.4.

get_url_data(framerate, width, height)
Parameters:
  • framerate (float) – the url framerate, or None to ignore

  • width (int) – the url width, or None to ignore

  • height (int) – the url height, or None to ignore

Returns:

the media’s URL and its related properties.

mime:

the mime-type, or None to ignore.

bitrate:

the url bitrate, or None to ignore

Return type:

(str, mime: str, bitrate: int)

New in version 0.3.0.

get_url_data_nth(index, framerate, width, height)
Parameters:
  • index (int) – element to retrieve

  • framerate (float) – the url framerate, or None to ignore

  • width (int) – the url width, or None to ignore

  • height (int) – the url height, or None to ignore

Returns:

the n-th media’s URL and its related properties.

mime:

the mime-type, or None to ignore.

bitrate:

the url bitrate, or None to ignore

Return type:

(str, mime: str, bitrate: int)

New in version 0.3.0.

get_width()
Returns:

the width of the media

Return type:

int

New in version 0.3.0.

is_audio()
Returns:

True if self is an audio

Return type:

bool

Check if self is an audio

New in version 0.3.0.

is_container()
Returns:

True if self is a container

Return type:

bool

Check if self is a container

New in version 0.3.0.

is_image()
Returns:

True if self is an image

Return type:

bool

Check if self is an image

New in version 0.3.0.

is_video()
Returns:

True if self is a video

Return type:

bool

Check if self is a video

New in version 0.3.0.

serialize()
Returns:

serialized media

Return type:

str

Serializes a Grl.Media into a string. It does a basic serialization.

See grl_media_serialize_extended() to get more serialization approaches.

New in version 0.1.6.

set_album(album)
Parameters:

album (str) – the audio’s album

Set the album of the media

New in version 0.3.0.

set_album_artist(album_artist)
Parameters:

album_artist (str) – the audio’s album main artist

Set the main artist of the album of the media

New in version 0.3.1.

set_album_disc_number(disc_number)
Parameters:

disc_number (int) – the disc number within an album

Set the disc number of the media for multi-disc album sets.

New in version 0.3.1.

set_artist(artist)
Parameters:

artist (str) – the audio’s artist

Set the artist of the media

New in version 0.3.0.

set_author(author)
Parameters:

author (str) – the media’s author

Set the media’s author

New in version 0.1.4.

set_bitrate(bitrate)
Parameters:

bitrate (int) – the audio’s bitrate

Set the bitrate of the media

New in version 0.3.0.

set_camera_model(camera_model)
Parameters:

camera_model (str) – model of camera used to take picture

Set the camera_model of the media

New in version 0.3.0.

set_certificate(certificate)
Parameters:

certificate (str) – The age certificate of the media

Set the media’s first age certification. This should usually be the media’s most relevant age certificate. Use Grl.Media.set_region_data() to set other age certificates.

New in version 0.1.6.

set_childcount(childcount)
Parameters:

childcount (int) – number of children

Sets the number of children of this container. Use Grl.METADATA_KEY_CHILDCOUNT_UNKNOWN if it is unknown.

New in version 0.3.0.

set_composer(composer)
Parameters:

composer (str) – the audio’s composer

Set the composer of the media

New in version 0.3.1.

set_creation_date(creation_date)
Parameters:

creation_date (GLib.DateTime) – date when media was created

Set the creation_date of the media

New in version 0.2.0.

set_description(description)
Parameters:

description (str) – the description

Set the media’s description

New in version 0.1.4.

set_director(director)
Parameters:

director (str) – director of the movie

Sets the director of the media.

New in version 0.3.0.

set_duration(duration)
Parameters:

duration (int) – the duration in seconds

Set the media’s duration

New in version 0.1.4.

set_episode(episode)
Parameters:

episode (int) – the video’s episode

Sets the episode number of the media

New in version 0.3.0.

set_episode_title(episode_title)
Parameters:

episode_title (str) – the title of the episode

Sets the title of an media

New in version 0.3.0.

set_exposure_time(exposure_time)
Parameters:

exposure_time (float) – picture’s exposure time

Set the exposure_time of the media

New in version 0.3.0.

set_external_player(player)
Parameters:

player (str) – location of an external player for this media

Set the location of a player for the media (usually a flash player)

New in version 0.1.6.

set_external_url(url)
Parameters:

url (str) – external location where this media can be played.

Set an external location where users can play the media

New in version 0.1.6.

set_favourite(favourite)
Parameters:

favourite (bool) – whether the item is favourite or not

Set if the media is favourite or not

New in version 0.2.3.

set_flash_used(flash_used)
Parameters:

flash_used (str) – whether the flash was used

Set the flash_used of the media See http://library.gnome.org/devel/ontology/unstable/nmm-classes.html#nmm-Flash

New in version 0.3.0.

set_framerate(framerate)
Parameters:

framerate (float) – the video’s framerate

Set the framerate of the media

New in version 0.3.0.

set_genre(genre)
Parameters:

genre (str) – the audio’s genre

Set the genre of the media

New in version 0.3.0.

set_height(height)
Parameters:

height (int) – the video’s height

Set the height of the media

New in version 0.3.0.

set_id(id)
Parameters:

id (str) – the identifier of the media

Set the media identifier

New in version 0.1.4.

set_iso_speed(iso_speed)
Parameters:

iso_speed (float) – picture’s iso speed

Set the iso_speed of the media

New in version 0.3.0.

set_keyword(keyword)
Parameters:

keyword (str) – a keyword describing the media

Sets the keyword describing the self.

New in version 0.2.3.

set_last_played(last_played)
Parameters:

last_played (GLib.DateTime) – date when the media was last played

Set the media last played date

New in version 0.3.0.

set_last_position(last_position)
Parameters:

last_position (int) – second at which the media playback was interrupted

Set the media last played position

New in version 0.1.4.

set_license(license)
Parameters:

license (str) – The license of the media

Set the media license

New in version 0.1.6.

set_lyrics(lyrics)
Parameters:

lyrics (str) – the audio’s lyrics

Set the lyrics of the media

New in version 0.3.0.

set_mb_album_id(mb_album_id)
Parameters:

mb_album_id (str) – the MusicBrainz album identifier

Set the MusicBrainz album identifier of the media

New in version 0.3.0.

Deprecated since version 0.3.8: in favor of more specific metadata-keys Grl.METADATA_KEY_MB_RELEASE_ID and Grl.METADATA_KEY_MB_RELEASE_GROUP_ID

set_mb_artist_id(mb_artist_id)
Parameters:

mb_artist_id (str) – the MusicBrainz artist identifier

Set the MusicBrainz artist identifier of the media

New in version 0.3.0.

set_mb_recording_id(mb_recording_id)
Parameters:

mb_recording_id (str) – the MusicBrainz recording identifier

Set the MusicBrainz recording identifier of the media

New in version 0.3.0.

set_mb_release_group_id(mb_release_group_id)
Parameters:

mb_release_group_id (str) – Album group release identifier in MusicBrainz

Set the MusicBrainz Release Group identifier of the media

New in version 0.3.8.

set_mb_release_id(mb_release_id)
Parameters:

mb_release_id (str) – Album release identifier in MusicBrainz

Set the MusicBrainz release identifier of the media

New in version 0.3.8.

set_mb_track_id(mb_track_id)
Parameters:

mb_track_id (str) – the MusicBrainz track identifier

Set the MusicBrainz track identifier of the media

New in version 0.3.0.

set_mime(mime)
Parameters:

mime (str) – the mime type

Set the media’s mime-type

New in version 0.1.4.

set_modification_date(modification_date)
Parameters:

modification_date (GLib.DateTime) – date when the media was last modified

Set the modification date of the media

New in version 0.2.0.

set_orientation(orientation)
Parameters:

orientation (int) – degrees clockwise orientation of the picture

Set the orientation of the media

New in version 0.3.0.

set_original_title(original_title)
Parameters:

original_title (str) – original, untranslated title of the movie

Sets the original, untranslated title of the media.

New in version 0.3.0.

set_performer(performer)
Parameters:

performer (str) – an actor performing in the movie

Sets the actor performing in the movie.

New in version 0.3.0.

set_play_count(play_count)
Parameters:

play_count (int) – the play count

Set the media play count

New in version 0.1.4.

set_producer(producer)
Parameters:

producer (str) – producer of the movie

Sets the producer of the media.

New in version 0.3.0.

set_publication_date(date)
Parameters:

date (GLib.DateTime) – the date

Set the publication date of self.

New in version 0.2.0.

set_rating(rating, max)
Parameters:
  • rating (float) – a rating value

  • max (float) – maximum rating value

This method receives a rating and its scale and normalizes it on a scale from 0…5 to match the usual five-star rating.

New in version 0.1.5.

set_region(region)
Parameters:

region (str) – the region’s ISO-3166-1 code

Sets the region where self was published.

New in version 0.2.3.

set_region_data(region, publication_date, certificate)
Parameters:
  • region (str) – the region’s ISO-3166-1 code

  • publication_date (GLib.DateTime) – the publication date

  • certificate (str) – the age certification

Sets regional publication and certification information for region.

New in version 0.2.3.

set_season(season)
Parameters:

season (int) – the video’s season

Sets the season number of the media

New in version 0.3.0.

set_show(show)
Parameters:

show (str) – the video’s show name

Sets the show title of the media

New in version 0.3.0.

set_site(site)
Parameters:

site (str) – the site

Set the media’s site. A site is a website about the media such as a studio’s promotional website for a movie.

New in version 0.1.4.

set_size(size)
Parameters:

size (int) – the size in bytes

Set the size of the media

New in version 0.2.10.

set_source(source)
Parameters:

source (str) – the source

Set the media’s source

New in version 0.1.4.

set_studio(studio)
Parameters:

studio (str) – The studio the media is from

Set the media studio

New in version 0.1.6.

set_thumbnail(thumbnail)
Parameters:

thumbnail (str) – the thumbnail URL

Set the media’s thumbnail URL

New in version 0.1.4.

set_thumbnail_binary(thumbnail, size)
Parameters:
  • thumbnail (int) – thumbnail buffer

  • size (int) – thumbnail buffer size

Set the media’s binary thumbnail

New in version 0.1.9.

set_title(title)
Parameters:

title (str) – the title

Set the media’s title

New in version 0.1.4.

set_track_number(track_number)
Parameters:

track_number (int) – the audio’s track number

Set the track number of the media

New in version 0.3.0.

set_url(url)
Parameters:

url (str) – the media’s URL

Set the media’s URL

New in version 0.1.4.

set_url_data(url, mime, bitrate, framerate, width, height)
Parameters:
  • url (str) – the media’s URL

  • mime (str) – the url mime type

  • bitrate (int) – the url bitrate, or -1 to ignore

  • framerate (float) – media framerate, or -1 to ignore

  • width (int) – media width, or -1 to ignore

  • height (int) – media height, or -1 to ignore

Sets all the keys related with the URL of a media resource in one go.

New in version 0.3.0.

set_width(width)
Parameters:

width (int) – the video’s width

Set the width of the media

New in version 0.3.0.

Property Details

Grl.Media.props.media_type
Name:

media-type

Type:

Grl.MediaType

Default Value:

Grl.MediaType.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT

Type of media