Registered Member
|
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 ".". |
Moderator
|
|
Registered Member
|
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.
|
Registered Member
|
|
Registered Member
|
Ok. When I set the ratio to 1,20, it does get saved to ktorrentrc:
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. |
Registered Member
|
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.
|
Moderator
|
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 ? |
Registered Member
|
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. |
Registered Member
|
|
Registered Member
|
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. |
Registered Member
|
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? |
Registered Member
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]