def download_all(): torrents = database.row_fetch( 'select * from torrents where downloaded = 0') for t in torrents: download_torrent(t[0]) print 'Downloaded ' + t[0] + '.torrent -- ' + t[1] + ' - ' + t[ 2] + ' / ' + t[3] + ' / ' + t[4] discord.send('Downloaded ' + t[1] + ' - ' + t[2] + ' / ' + t[3] + ' / ' + t[4])
def get_all(): s_list = database.row_fetch('select * from settings') s_dict = {} for setting in s_list: s_dict[setting['key']] = setting return s_dict
def get_all(): return database.row_fetch('select * from torrents order by added desc')
def get_recent(): return database.row_fetch( 'select * from torrents order by added desc limit 10')
def download_all(): torrents = database.row_fetch( 'select * from torrents where downloaded = 0') for t in torrents: download_torrent(t[0])
def get_recent(): return database.row_fetch('select * from torrents order by added desc limit 20')
def download_all(): torrents = database.row_fetch('select * from torrents where downloaded = 0') for t in torrents: download_torrent(t[0])