Skip to content

Commit

Permalink
Fix web seeds
Browse files Browse the repository at this point in the history
I think this works for a single entry, not sure about multiple or a list
  • Loading branch information
nitronarcosis committed Dec 19, 2023
1 parent 7129677 commit 6820dae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions torrentfile/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ def magnet(metafile: str, version: int = 0) -> str:
magnet += trackers if trackers != "&tr=" else ""

if "url-list" in meta:
web_seed = [
"&ws=" + quote_plus(url) for urllist in meta["url-list"]
for url in urllist
web_sources = [
"&ws=" + quote_plus(urllist) for urllist in meta["url-list"]
]
web_seed = "".join(web_sources)

magnet += web_seed if web_seed != "&ws=" else ""

logger.info("Created Magnet URI %s", magnet)
Expand Down

0 comments on commit 6820dae

Please sign in to comment.