mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
fix bugs with saving magnets and torrents
This commit is contained in:
parent
cfb4a6ce38
commit
82b9c77ff1
@ -31,7 +31,7 @@ def print(*args, **kwargs):
|
|||||||
return builtins.print(*args, **kwargs)
|
return builtins.print(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def search_results(mags, sizes, uploaded, local):
|
def search_results(mags, sizes, uploaded, local=None):
|
||||||
columns = int(os.popen('stty size', 'r').read().split()[1])
|
columns = int(os.popen('stty size', 'r').read().split()[1])
|
||||||
cur_color = 'zebra_0'
|
cur_color = 'zebra_0'
|
||||||
|
|
||||||
|
@ -4,8 +4,10 @@ import gzip
|
|||||||
import urllib.request as request
|
import urllib.request as request
|
||||||
import urllib.parse as parse
|
import urllib.parse as parse
|
||||||
import urllib.error
|
import urllib.error
|
||||||
|
import os.path
|
||||||
|
|
||||||
import pirate.data
|
import pirate.data
|
||||||
|
from pirate.print import print
|
||||||
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
@ -152,4 +154,4 @@ def save_magnets(chosen_links, mags, folder):
|
|||||||
|
|
||||||
print('Saved {:X} in {}'.format(info_hash, file))
|
print('Saved {:X} in {}'.format(info_hash, file))
|
||||||
with open(file, 'w') as f:
|
with open(file, 'w') as f:
|
||||||
f.write(magnet + '\n')
|
f.write(magnet + '\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user