示例#1
0
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])
示例#2
0
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
示例#3
0
def get_all():
    return database.row_fetch('select * from torrents order by added desc')
示例#4
0
def get_recent():
    return database.row_fetch(
        'select * from torrents order by added desc limit 10')
示例#5
0
def download_all():
    torrents = database.row_fetch(
        'select * from torrents where downloaded = 0')
    for t in torrents:
        download_torrent(t[0])
示例#6
0
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
示例#7
0
def get_recent():
  return database.row_fetch('select * from torrents order by added desc limit 20')
示例#8
0
def download_all():
  torrents = database.row_fetch('select * from torrents where downloaded = 0')
  for t in torrents:
    download_torrent(t[0])