ETVDB  0.6.0
ETVDB is a tool and a library to get data from The TV Database (TVDB)
Functions
Series

Overall Series Functions. More...

Functions

EAPI Seriesetvdb_series_by_id_get (uint32_t id)
 Get Series data by TVDB Series ID. More...
 
EAPI Seriesetvdb_series_from_list_get (Eina_List *list, int number)
 Get a Series from a list and initialize it fully. More...
 
EAPI Eina_List * etvdb_series_find (const char *name)
 Find Series by Name. More...
 
EAPI Eina_Bool etvdb_series_populate (Series *s)
 Populate a Series structure with Episode data. More...
 
EAPI void etvdb_series_free (Series *s)
 Free a Series structure. More...
 
EAPI int etvdb_series_episodes_count (Series *s, int season)
 Count episodes of one season in a Series structure. More...
 

Detailed Description

Overall Series Functions.

These functions retrieve general series data

Function Documentation

EAPI Series* etvdb_series_by_id_get ( uint32_t  id)

Get Series data by TVDB Series ID.

This function will retreive the data for one series, identified by its TVDB ID. This is a TVDB Base Series Record, if you need all the episodes, you additionally need to call etvdb_series_populate().

See also
etvdb_series_populate.
Parameters
idTVDB ID of a series
Returns
a Series structure on success,
NULL on failure.
EAPI int etvdb_series_episodes_count ( Series s,
int  season 
)

Count episodes of one season in a Series structure.

This functions counts the number of episodes of one season in a Series structure.

Parameters
spointer to Series static
seasonnumber of the season
Returns
number of seasons >=1 on success
0 on error or empty structure
EAPI Eina_List* etvdb_series_find ( const char *  name)

Find Series by Name.

This function takes a name to search for. It can also search by IMDB ID (parameter starting with "tt"), or by zap2it ID (starting with "SH"). Important: TVDBs search only delivers a subset of a Base Series Record, so you will have to retrieve the full Record by etvdb_series_by_id_get() after the correct Series has been selected from the list.

It is suggested to not use Eina_List functions to retreive one of the Series, but call evdb_series_from_list_get() instead, because it will spare you some further hassle, though of course you can do so if you wish.

Parameters
namestring to search for (name or id of the series).
Returns
a list containing all found series.
EAPI void etvdb_series_free ( Series s)

Free a Series structure.

This function frees a Series structure and its data.

Parameters
spointer to Series structure
EAPI Series* etvdb_series_from_list_get ( Eina_List *  list,
int  number 
)

Get a Series from a list and initialize it fully.

This function gets a Series from a List, usually one generated with etvdb_series_find() and retreives the full Base Series Record for it. This can be done by using eina_list_nth() and etvdb_series_by_id_get for example, so this is only a convenience function, hiding the problem, that TVDB search only returns a subset of a Base Series Record per series.

Parameters
lista list containing etvdb Series structures
numberthe number of the list item to use
Returns
a fully initialized Series on success.
NULL on failure.
EAPI Eina_Bool etvdb_series_populate ( Series s)

Populate a Series structure with Episode data.

This function populates a Series structure with all available and supported Episode data.

The Series has to be initialized and at least contain an ID.

As this can be a fairly large amount of data (up to serveral ten thousand lines XML), this function can be slow (largely limited by the TVDB download speed). Only use it when more than a few specific episode records are required.

Since you might want to populate a Series that already contains episode data, for example after using etvdb_episode_by_id_get(), this function will dump and free all existing associated episodes. Be aware of any pointers left to existing episodes before using it!

Parameters
spointer to Series structure.
Returns
EINA_TRUE on success
EINA_FALSE on failure.
See also
etvdb_series_find()
etvdb_series_free()