btclient
This commit is contained in:
1 parent
a4e728ae8a
commit
39783a1c8a
8 files changed
+2650
-485
No files matched your search
@@ -1 +0,0 @@
|
||||
__version__ = '0.4.2'
|
||||
File diff suppressed because it is too large.
Load diff
@@ -100,7 +100,6 @@ class StreamServer(SocketServer.ThreadingMixIn, htserver.HTTPServer):
|
||||
# pprint.pprint(e)
|
||||
else:
|
||||
logger.exception("HTTP Server Error")
|
||||
# TODO: remove print
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class BaseClient(object):
|
||||
self._delete_on_close = True if args and args.delete_on_finish else False
|
||||
|
||||
def _on_file_ready(self, filehash):
|
||||
self._file.filehash = filehash
|
||||
#self._file.filehash = filehash
|
||||
self._ready = True
|
||||
if self._on_ready_action:
|
||||
self._on_ready_action(self._file, self.is_file_complete)
|
||||
@@ -225,10 +225,6 @@ class PieceCache(object):
|
||||
c._cache_first = self._cache_first
|
||||
return c
|
||||
|
||||
@property
|
||||
def cached_piece(self):
|
||||
self._cache_first
|
||||
|
||||
def fill_cache(self, first):
|
||||
to_request = []
|
||||
with self._lock:
|
||||
|
||||
@@ -27,7 +27,7 @@ import gzip
|
||||
import json
|
||||
from collections import deque
|
||||
|
||||
from common import AbstractFile, BaseClient, Hasher, Resolver, TerminalColor
|
||||
from common import AbstractFile, BaseClient, Resolver, TerminalColor #Hasher
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
logger = logging.getLogger('htclient')
|
||||
@@ -321,7 +321,7 @@ class HTClient(BaseClient):
|
||||
if not self._file.pieces[i]:
|
||||
self._pool.add_piece(i)
|
||||
|
||||
self.hash = Hasher(self._file, self._on_file_ready)
|
||||
#self.hash = Hasher(self._file, self._on_file_ready)
|
||||
|
||||
@property
|
||||
def is_file_complete(self):
|
||||
|
||||
@@ -13,8 +13,6 @@ import subprocess
|
||||
import struct
|
||||
import time
|
||||
|
||||
from _version import __version__
|
||||
|
||||
logger = logging.getLogger('opensubtitles')
|
||||
|
||||
|
||||
@@ -33,7 +31,7 @@ class Urllib2Transport(xmlrpclib.Transport):
|
||||
|
||||
|
||||
class OpenSubtitles(object):
|
||||
USER_AGENT = 'BTClient v%s' % __version__
|
||||
USER_AGENT = 'BTClient'
|
||||
|
||||
def __init__(self, lang, user='', pwd=''):
|
||||
self._lang = lang
|
||||
|
||||
Reference in new issue
Block a user