-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi
I'm unable to download a pack searched using XDCC_EU Search engine
from xdcc_dl.xdcc import download_packs
from xdcc_dl.pack_search import SearchEngines
results = SearchEngines.XDCC_EU.value.search("test")
download_packs(results)
I get:
Traceback (most recent call last):
File "/home/user/PycharmProjects/pythonProject/main.py", line 7, in
download_packs(results)
File "/home/user/.local/lib/python3.8/site-packages/xdcc_dl/xdcc/init.py", line 51, in download_packs
for pack in packs:
TypeError: 'XDCCPack' object is not iterable
Even when using your example:
from xdcc_dl.xdcc import download_packs
from xdcc_dl.pack_search import SearchEngines
from xdcc_dl.entities import XDCCPack, IrcServer
# Generate packs
manual = XDCCPack(IrcServer("irc.rizon.net"), "bot", 1)
from_message = XDCCPack.from_xdcc_message("/msg bot xdcc send #2-10")
search_results = SearchEngines.HORRIBLESUBS.value.search("Test")
combined = [manual] + from_message + search_results
# Start download
download_packs(combined)
I get:
Traceback (most recent call last):
File "/home/user/PycharmProjects/pythonProject/main.py", line 9, in
combined = [manual] + from_message + search_results
TypeError: can only concatenate list (not "XDCCPack") to list`
I also tried to add a random.choice() in order to select a random choice from the packs list returned by the SearchEngine function without success. Am I doing something wrong or is it a bug?