ETVDB
0.6.0
ETVDB is a tool and a library to get data from The TV Database (TVDB)
|
Overall Series Functions. More...
Functions | |
EAPI Series * | etvdb_series_by_id_get (uint32_t id) |
Get Series data by TVDB Series ID. More... | |
EAPI Series * | etvdb_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... | |
Overall Series Functions.
These functions retrieve general series data
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().
id | TVDB ID of a series |
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.
s | pointer to Series static |
season | number of the season |
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.
name | string to search for (name or id of the series). |
EAPI void etvdb_series_free | ( | Series * | s | ) |
Free a Series structure.
This function frees a Series structure and its data.
s | pointer 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.
list | a list containing etvdb Series structures |
number | the number of the list item to use |
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!
s | pointer to Series structure. |