diff --git a/lbry/torrent/session.py b/lbry/torrent/session.py index feff53f75..857540d4c 100644 --- a/lbry/torrent/session.py +++ b/lbry/torrent/session.py @@ -10,47 +10,13 @@ from typing import Optional 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__) - - 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_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: def __init__(self, loop, executor, handle): self._loop = loop