forked from LBRYCommunity/lbry-sdk
remove dead code
This commit is contained in:
parent
5c543cb374
commit
0961cad716
1 changed files with 0 additions and 34 deletions
|
@ -10,47 +10,13 @@ from typing import Optional
|
||||||
import libtorrent
|
import libtorrent
|
||||||
|
|
||||||
|
|
||||||
NOTIFICATION_MASKS = [
|
|
||||||
"error",
|
|
||||||
"peer",
|
|
||||||
"port_mapping",
|
|
||||||
"storage",
|
|
||||||
"tracker",
|
|
||||||
"debug",
|
|
||||||
"status",
|
|
||||||
"progress",
|
|
||||||
"ip_block",
|
|
||||||
"dht",
|
|
||||||
"stats",
|
|
||||||
"session_log",
|
|
||||||
"torrent_log",
|
|
||||||
"peer_log",
|
|
||||||
"incoming_request",
|
|
||||||
"dht_log",
|
|
||||||
"dht_operation",
|
|
||||||
"port_mapping_log",
|
|
||||||
"picker_log",
|
|
||||||
"file_progress",
|
|
||||||
"piece_progress",
|
|
||||||
"upload",
|
|
||||||
"block_progress"
|
|
||||||
]
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_FLAGS = ( # fixme: somehow the logic here is inverted?
|
DEFAULT_FLAGS = ( # fixme: somehow the logic here is inverted?
|
||||||
libtorrent.add_torrent_params_flags_t.flag_auto_managed
|
libtorrent.add_torrent_params_flags_t.flag_auto_managed
|
||||||
| libtorrent.add_torrent_params_flags_t.flag_update_subscribe
|
| libtorrent.add_torrent_params_flags_t.flag_update_subscribe
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_notification_type(notification) -> str:
|
|
||||||
for i, notification_type in enumerate(NOTIFICATION_MASKS):
|
|
||||||
if (1 << i) & notification:
|
|
||||||
return notification_type
|
|
||||||
raise ValueError("unrecognized notification type")
|
|
||||||
|
|
||||||
|
|
||||||
class TorrentHandle:
|
class TorrentHandle:
|
||||||
def __init__(self, loop, executor, handle):
|
def __init__(self, loop, executor, handle):
|
||||||
self._loop = loop
|
self._loop = loop
|
||||||
|
|
Loading…
Reference in a new issue