themerr_db_helper¶
-
Code.themerr_db_helper.
item_exists
(database_type, database, id)[source]¶ Check if an item exists in the ThemerrDB.
Parameters: Returns: py
bool
True if the item exists in the ThemerrDB, otherwise False.
Examples
>>> item_exists(database_type='games', database='igdb', id=1234) True
>>> item_exists(database_type='movies', database='themoviedb', id=1234) False
-
Code.themerr_db_helper.
update_cache
()[source]¶ Update the ThemerrDB cache.
The pages.json file is fetched for all database types, then each all_page_N.json file is fetched to form the complete set of available IDs.
Attempting to update the cache while an update is already in progress will wait until the current update is complete.
Updating the cache less than an hour after the last update is a no-op.