Skip to content

Commit

Permalink
fix zip path
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola committed Aug 3, 2021
1 parent 2684376 commit 7e41506
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TorrentPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

libtorrent = libtorrent.libtorrent

VERSION = '0.4.7'
VERSION = '0.4.8'

def popAlerts(session):
while 1:
Expand Down
7 changes: 4 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
else:
libtorrent_file = 'libtorrent.so'


libtorrent_zip_path = os.path.join(os.path.dirname(__file__),'libtorrent-{}.zip'.format(sys.platform))

# if libtorrent lib not present look for it
if not os.path.exists(os.path.join(os.path.dirname(__file__),'libtorrent', libtorrent_file)):
with zipfile.ZipFile('libtorrent-{}.zip'.format(sys.platform),'r') as zip_ref:
zip_ref.extractall('libtorrent')
with zipfile.ZipFile(libtorrent_zip_path,'r') as zip_ref:
zip_ref.extractall(os.path.join(os.path.dirname(__file__),'libtorrent'))

# Need to add libtorrent lib
sys.path.append(os.path.dirname(__file__))
Expand Down
2 changes: 1 addition & 1 deletion plugin_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "Torrent",
"description": "Torrent client in ZeroNet.",
"default": "enabled",
"rev": 11
"rev": 12
}

0 comments on commit 7e41506

Please sign in to comment.