This forum has been archived. All content is frozen. Please use KDE Discuss instead.

2.1.3: Global setting of max share ratio not working. Bug?

Tags: None
(comma "," separated)
Nuteater
Registered Member
Posts
5
Karma
0
Hi! I started using ktorrent around the 2.0 rcs, and I've never managed to get the global setting of max share ratio to work, including the latest 2.1.3.

It seems that whatever I enter to the box in Download Options, after I press
'Ok' and then return to Download Options, the value of max share ratio has been reset to "0,00". Setting max ratio for each torrent works normally.

My best guess is that this could be a locale issue - that somehow ktorrent gets confused here with the decimal separator being a "," and not a ".".
George
Moderator
Posts
5421
Karma
1

Tue Apr 03, 2007 6:10 pm
If . doesn't work try ,
Nuteater
Registered Member
Posts
5
Karma
0

Tue Apr 03, 2007 7:13 pm
It won't work with neither. If I enter e.g. "1.00", the value will reset as soon as the box loses focus (because it is not a decimal number in my locale and thus not a valid value for max share ratio), but if I enter e.g. "1,00", the value is accepted at first, but it is reset to "0,00" when I close the options window. The same happens if I scroll to some value with the little up-arrow next to the box.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Wed Apr 04, 2007 2:21 pm
Can you post [downloads] section from your ~/.kde/share/config/ktorrentrc file?
After you set limit and click 'Apply', offcourse.
Nuteater
Registered Member
Posts
5
Karma
0

Wed Apr 04, 2007 6:02 pm
Ok. When I set the ratio to 1,20, it does get saved to ktorrentrc:
Code: Select all
[downloads]
...
maxRatio=1.2
...

But it is still reset to zero when I reopen the settings dialog ...but on the other hand it stays in the configuration file. New torrents are started with no max ratio set, though.
Nuteater
Registered Member
Posts
5
Karma
0

Tue Apr 10, 2007 10:41 am
Update: Manually replacing "maxRatio=1.2" with "maxRatio=1,2" in ktorrentrc sets the maximum share ratio correctly. It seems ktorrent saves the value in ktorrentrc always using "." as the decimal separator, but fails to parse this value if the decimal separator is "," in the current locale.
George
Moderator
Posts
5421
Karma
1

Tue Apr 10, 2007 6:22 pm
The code which does the saving and loading of these settings is KDE code.

Anyway, I have taken a look at my locale and it is set to Belgium and we use a , just like you. When I set it to 3,50 in the GUI, it is saved as 3.50 in the ktorrentrc file.

So it seems to be more of a KDE problem, I'm running 3.5.5. Which version are you running ?
Nuteater
Registered Member
Posts
5
Karma
0

Wed Apr 11, 2007 9:46 am
I'm using 3.5.6.

I've been trying to find how other kde apps save decimal values in the config files, but it seems not many do :). I only found KWord's resolution setting, which does get saved with "." as the decimal separator. I don't have KWord installed at the moment though, so I cannot test whether KWord has troubles with saving and loading those values. Anyway, if I enter "1,20" to ktorrent's settings dialog, it gets saved as "1.20" and loaded as "0,00". Changing the decimal separator to "," in the config file makes it work correctly. Both LC_NUMERIC and kde's locale are set to Finnish, which does use "," as the decimal separator.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Fri Apr 13, 2007 1:50 pm
It's probably a KDE bug. Maybe you should report it.
paoleela
Registered Member
Posts
1
Karma
0

2.1.4: global ratio still no effect

Tue May 01, 2007 10:26 am
I have 2.1.4 and the global share ration doesn't work either. I have german locale.

If I replace the "1.2" with "1,2" in ktorrentrc the settings gui will show "0,00" and replaces again to "1.2" in ktorrentrc after I enter that.

All torrents have 1,20 but it continues sharing over a ratio of 1,21.
sledge hammer
Registered Member
Posts
4
Karma
0

Sun Aug 19, 2007 10:44 am
Same here. I am using ktorrent 2.2.1 and kde 3.4.7.
In the rc max ratio is set to 1.2. I am using german locale, that is a "," as separator. In the ktorrent gui it gives "0,00" for max ratio.
Is there another solution than to manually set the max share ratio for each torrent?
stoeptegel
Registered Member
Posts
1075
Karma
0

Sun Aug 19, 2007 11:11 am
Ivan wrote:It's probably a KDE bug. Maybe you should report it.


It is, in gibbon it seems to work again.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]