mirror of
https://github.com/NohamR/Ratio.py.git
synced 2026-01-14 09:58:17 +00:00
Add configuration file
This commit is contained in:
@@ -16,8 +16,10 @@ logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
class torrent():
|
||||
|
||||
def __init__(self, torrent_tile):
|
||||
with open(torrent_tile, 'rb') as tf:
|
||||
def __init__(self, configuration):
|
||||
self.configuration = configuration
|
||||
torrent_file = self.configuration['torrent:']
|
||||
with open(torrent_file, 'rb') as tf:
|
||||
data = tf.read()
|
||||
self.b_enc = bencoding()
|
||||
self.metainfo = self.b_enc.bdecode(data)
|
||||
|
||||
Reference in New Issue
Block a user