Beispiel #1
0
def get_score_index():
    key = "scr_index"
    mycnt = get_or_create(db.session, Counters, key=key)
    return mycnt.value
Beispiel #2
0
def count_stuff(key):
    if key == "playcount":
        mycnt = get_or_create(db.session, Counters, key=key)
        mycnt.value += 1
        db.session.commit()
Beispiel #3
0
def save_score_index(start_index):
    key = "scr_index"
    mycnt = get_or_create(db.session, Counters, key=key)
    mycnt.value = start_index
    db.session.commit()
Beispiel #4
0
def get_broken_index():
    key = "strt_index"
    mycnt = get_or_create(db.session, Counters, key=key)
    return mycnt.value
Beispiel #5
0
def get_index(key):
    if key in key_list:
        mycnt = get_or_create(db.session, Counters, key=key)
        return mycnt.value
Beispiel #6
0
def save_index(key, start_index):
    if key in key_list:
        mycnt = get_or_create(db.session, Counters, key=key)
        mycnt.value = start_index
        db.session.commit()
Beispiel #7
0
def print_stuff(key):
    if key == "playcount":
        mycnt = get_or_create(db.session, Counters, key=key)
        print(key + " ", mycnt.value)