qbittorrent / qBittorrent

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

web search not downloading #15068

Open KwisatzJim opened 3 years ago

KwisatzJim commented 3 years ago

Please provide the following information

qBittorrent version and Operating System

4.3.5 macOS 11.4

If on linux, libtorrent-rasterbar and Qt version

(type here)

What is the problem

when I do a search in the webUI and then tell it to download, nothing happens

What is the expected behavior

download the item

Steps to reproduce

open webUI, search for something, download something

Extra info(if any)

similar to 14635 but on newer version

BoberMod commented 3 years ago

Same for me. qBittorrent v4.3.5 Web UI (64-bit)

Download window contains link to the torrent file, not magnet. No errors in log file: image

simeydk commented 3 years ago

I also have this problem.

This is my understanding of the problem:

The problem: Plugins which implement the download_torrent method

The Web UI downloads search results by posting to the /torrents/add endpoint of the API and setting the urls parameter equal to the fileUrl property from the search results. This works fine for plugins where the fileUrl property of search results contain a magnet/torrent link.

However for some sites fileUrl does not contain a magnet/torrent link, but instead contains a link to the details page of the torrent (which in turn would contain the magnet/torrent link). (This is presumably the case for sites where magnet/torrent links are only shown on torrent details pages and not on search result pages). This means using the /torrents/add endpoint won't work, since it needs a magnet/torrent link, but instead is receiving an HTML link.

The native UI still works for these plugins. It presumably "gets around this" by accessing the download_torrent method of the plugin, which then goes to the details page for the torrent, gets the torrent/magnet link and then uses that to add the torrent.

The problem is the web UI does not access the download_torrent method of the plugin, and has no way of doing so based on the current web API's documentation.

Proposed solution

  1. Add a get link for search result endpoint and/or a download search result endpoint to the Web API, which takes a search results' fileUrl as parameter and resolves it to a torrent/magnet link by using the download_torrent method of plugins, where these exist.
  2. Change the Search part of the current Web UI to make use of this.
evyd13 commented 2 years ago

Ah, so that's why it's not working.... Definitely needs to be fixed asap

Nikoh77 commented 2 years ago

hello guys, some news?

chriswatt commented 8 months ago

Same issue using v4.6.3. @simeydk really helpful comment above describes the problem well.

In the Web UI search results, the torrents that are failing to download have download links ending in .html instead of the actual magnet link.

schafdog commented 4 months ago
  1. WebAPI has been extended in PR20824