ETVDB
0.6.0
ETVDB is a tool and a library to get data from The TV Database (TVDB)
|
General TVDB infrastructure API. More...
Functions | |
EAPI Eina_Hash * | etvdb_languages_get (const char *lang_file_path) |
Function to retrieve supported languages. More... | |
EAPI Eina_Bool | etvdb_language_set (Eina_Hash *hash, char *lang) |
Change the global language setting. More... | |
EAPI time_t | etvdb_server_time_get (void) |
Function to retrieve time from TVDB's servers. More... | |
General TVDB infrastructure API.
These functions retrieve basic infrastructure Data from the TVDB which are not directly related to any media.
EAPI Eina_Bool etvdb_language_set | ( | Eina_Hash * | hash, |
char * | lang | ||
) |
Change the global language setting.
This function sets the global language to a user setting. It is optional and there always is a default setting in place.
hash | hash table holding supported languages, as generated by |
lang | 2 character language code, e.g. "en" or "fr" (required) |
EAPI Eina_Hash* etvdb_languages_get | ( | const char * | lang_file_path | ) |
Function to retrieve supported languages.
This function parses a xml file containing tvdb language data, and adds it to a hash table (which it initializes). The xml data will be downloaded, or (optionally) read from a file.
If you no longer need the data, you'll have to free the hashtable (with eina_hash_free()), but not the data in the table.
lang_file_path | Path to a XML file containing TVDB's supported languages. This allows to provide a custom XML language file. It is recommended to pass NULL. In this case the languages.xml file provide with etvdb will be used and, if not available, the languages will be retrieved online. |
EAPI time_t etvdb_server_time_get | ( | void | ) |
Function to retrieve time from TVDB's servers.
This function will retrieve the server time from TVDB which is useful to update existing data. For larger persistent data sets, it is recommended to store this time with the data.