def duration_to_seconds(duration_str):
    values = duration_str.split(':')
    
    if len(values) == 1:
        raise Exception('Invalid value supplied: %s', duration_str)
    
    seconds = 0
    
    for i, val in enumerate(reversed(values)):        
        val = int(val) * pow(60, i)
        seconds = seconds + val
        
    return seconds
Lazy load the redis connection
dataset/ETHPy150Open pascalw/Airplayer/airplayer/utils.py/duration_to_seconds--crossover with--dataset/ETHPy150Open tschellenbach/Stream-Framework/stream_framework/storage/redis/lists_storage.py/RedisListsStorage.redis