qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.66k stars 4.01k forks source link

bencoded bug in webUI downloads #21921

Open Lancelight opened 4 days ago

Lancelight commented 4 days ago

qBittorrent & operating system versions

Qbittorrent 5.0.2 Winblowz 10

What is the problem?

Trying to DL any link using the WebUI that is in http format will result in this:

WebUI bug with http links: Reason: "expected value (list, dict, int or string) in bencoded string [bdecode:4]"

Downloading the EXACT same torrent link using the client works just fine.

Steps to reproduce

  1. Enable WebUI
  2. Enable search within qbittorrent
  3. Search for a torrent using a site that produces http/https links rather than magnet links
  4. Copy/paste http link into link field or select "download" within the search UI result for the torrent
  5. Observe error: expected value (list, dict, int or string) in bencoded string [bdecode:4]

Additional context

No response

Log(s) & preferences file(s)

11/26/2024 8:39 PM - Failed to add torrent. Source: "https://.............................-torrent.html". Reason: "expected value (list, dict, int or string) in bencoded string [bdecode:4]"

stalkerok commented 4 days ago

Example link?

Lancelight commented 4 days ago

Anything that has https/http in it. The link doesnt even matter so long as it's a web link and not a magnet link. The links came from the "search" feature found within qbittorrent. I ended up having to disable any site that didnt produce magnet links. So maybe the links that come from search are producing incorrect http/https links? I updated the reproduction steps above to include this in case it actually is the search engine thats producing bad http/https links.

stalkerok commented 3 days ago

So maybe the links that come from search are producing incorrect http/https links?

This!

This is not a qBittorrent bug, you should address this to the plugin author.

glassez commented 3 days ago

This is not a qBittorrent bug, you should address this to the plugin author.

WebUI doesn't support to download torrent files using search plugin provided "download" method.

Lancelight commented 3 days ago

After thinking this over, I forgot, if you put the http link in the non-webui client (the actual qbittorrent client), the link actually works and the torrent DLs. It's only the WebUI where it doesnt work (unless its a magnet link, then it works just fine). So it's not the search module that is the problem. It's whatever the download mechanism is that the webUI uses. If download from webUI isnt supported, what's the point of the webUI and the download feature (it's actually called "Add Torrent Link" when clicking "file").

davidroth-br commented 2 days ago

I get a similar error after the RSS downloader finds a match. It attempts to initiate the download but isn't able to do so. None of my auto downloads are working.

2024-11-28 16:37 - Failed to add torrent. Source: "xxxxxxxxxxxxxx". Reason: "expected value (list, dict, int or string) in bencoded string [bdecode:4]"