Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect properly to qBittorrent v3.1.8 or v3.1.9 #115

Closed
elguaxo opened this issue Mar 16, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@elguaxo
Copy link

commented Mar 16, 2014

I was running Transdroid 2.1.2 and I got this issue when I updated to qBittorrent v3.1.8 (Windows). Now I have Transdroid 2.1.3 and qBittorrent v3.1.9 and the problem is still present.

Transdroid can for example add torrents to my remote qBittorrent, but it can't list any of the torrents that qBittorrent is seeding/leeching.

Thanks in advance.

@erickok

This comment has been minimized.

Copy link
Owner

commented Mar 18, 2014

Okay so I installed 3.1.9 and it seems they updated the web interface in an incompatible manner. What changed is that the web interface is now localized, including the JSON data that is send. Unfortunately that makes is hard to interpret.

While in the past a number was send simply as a string such as "1013.9 MiB" it is now a localized string such as "1 013,9 GiB" (on my French install). I tis pretty much impossible to try to parse every locale. (To be fare it was bound to break as the manual parsing of the "GiB" etc. strings I did also only worked on localisations that happen to use that exact string to denominate gigabytes.)

I requested an update of the web UI API so that this is properly handled, without me trying to parse a string what can take many different forms. See qbittorrent/qBittorrent#1524

@sledgehammer999

This comment has been minimized.

Copy link

commented Mar 19, 2014

A temporary solution is to do what we now do in qbittorrent: qbittorrent/qBittorrent@6cf780f

Search for the dot or comma as decimal point. AFAIK all locales either have dot or comma denote decimal point. There isn't any locale that uses some other character for the decimal point.

@erickok

This comment has been minimized.

Copy link
Owner

commented Mar 19, 2014

Although in a Dutch locale you write the above mentioned amount as "1.013,9 MiB" so that (in your code) would be rewritten as "1.013.9 MiB" and I am pretty sure parsing this as a number would cause an exception. Of course I can apply even more logic but I'd much rather just get some real data.

@sledgehammer999

This comment has been minimized.

Copy link

commented Mar 19, 2014

Wow does it actually return a character denoting thousands? (although I would expect that amount to be expressed in GiB). If yes, I need to revert the changes.

@erickok

This comment has been minimized.

Copy link
Owner

commented Mar 19, 2014

Yes. If I set my system language to Dutch (I just tested to be sure) the returned string is "1.013,9 MiB". It is not expressed in GiB because, well, it is less than a GiB -- I specifically tested that.

[
  {
    "hash": "e02f1d9979b6c72032768147a6b4115ca54f7571",
    "name": "some.torrent.file",
    "size": "1.013,9 MiB",
    "progress": 0,
    "dlspeed": "0 B/s",
    "upspeed": "0 B/s",
    "priority": "*",
    "num_seeds": "0",
    "num_leechs": "0 (6)",
    "ratio": "0,0",
    "eta": "∞",
    "state": "pausedDL"
  }
]
@sledgehammer999

This comment has been minimized.

Copy link

commented Mar 19, 2014

Oh boy. The change needs reverting. I tagged it for 3.1.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.