def get_nextpage(id): return int(id) + 1 if db.get_maxpages() > int(id) else 0
def get_maxpages(): return db.get_maxpages()