'Return some random (channel) torrents from the database.'

def get_random_channel_torrents(self, keys, limit=10):

    sql = ('SELECT    %s    FROM    ChannelTorrents,    Torrent    WHERE    ChannelTorrents.torrent_id    =    Torrent.torrent_id    AND    Torrent.name    IS    NOT    NULL    ORDER    BY    RANDOM()    LIMIT    ?' % ',    '.join(keys))
    results = self._db.fetchall(sql, (limit,))
    return self.__fixTorrents(keys, results)
