mex-metadata-utils

mex-metadata-utils

Synopsis

void                mex_metadata_from_uri               (const gchar *uri,
                                                         gchar **title,
                                                         gchar **showname,
                                                         GDate **date,
                                                         gint *season,
                                                         gint *episode);
gchar *             mex_metadata_humanise_duration      (const gchar *duration);
gchar *             mex_metadata_humanise_date          (const gchar *iso8601_date);
gchar *             mex_metadata_humanise_time          (const gchar *time);
void                mex_metadata_get_metadata           (GList **metadata_template,
                                                         MexContent *content);
MexMetadataInfo *   mex_metadata_info_new               (MexContentMetadata key,
                                                         const gchar *key_string,
                                                         gint priority);
void                mex_metadata_info_free              (MexMetadataInfo *info);

Description

Details

mex_metadata_from_uri ()

void                mex_metadata_from_uri               (const gchar *uri,
                                                         gchar **title,
                                                         gchar **showname,
                                                         GDate **date,
                                                         gint *season,
                                                         gint *episode);

mex_metadata_humanise_duration ()

gchar *             mex_metadata_humanise_duration      (const gchar *duration);

Gives a human readable version of the duration

duration :

duration in seconds

Returns :

Human friendly version of duration or NULL

mex_metadata_humanise_date ()

gchar *             mex_metadata_humanise_date          (const gchar *iso8601_date);

Parses the date string given and outputs human friendly version

iso8601_date :

iso8601 date string dd-mm-yyyyThh:mm:ssZ

Returns :

Human friendly version of date or NULL

mex_metadata_humanise_time ()

gchar *             mex_metadata_humanise_time          (const gchar *time);

mex_metadata_get_metadata ()

void                mex_metadata_get_metadata           (GList **metadata_template,
                                                         MexContent *content);

Fills in the values for the GList of MexMetadataInfo using the priority value to provide fall back metadata. Where the highest priority is 0.

metadata_template :

A GList with MexMetadataInfo data

mex_metadata_info_new ()

MexMetadataInfo *   mex_metadata_info_new               (MexContentMetadata key,
                                                         const gchar *key_string,
                                                         gint priority);

Container to pass through mex_metadata_get_metadata

key :

Metadata key

key_string :

A field label for the metadata value

priority :

How important this metadata is. 0 = High

Returns :

a new MexMetadataInfo.

mex_metadata_info_free ()

void                mex_metadata_info_free              (MexMetadataInfo *info);

Free/0 the values of MexMetadataInfo

info :

MexMetadaInfo

Returns :

a new MexMetadataInfo.