Bug - Scheduler should consider the lower bound

Suggestions and discussion of future versions
Post Reply
ikus060

Bug - Scheduler should consider the lower bound

Post by ikus060 »

Hi,

I'm using the Scheduler plugin in Deluge 1.3.3 and I notice when the scheduler is in 'yellow' state it's always apply the scheduler config event is the 'core.conf' configuration define a lower settings.

Step to reproduce :
1. Sets the 'core' config max_download_speed to 50kb/s
2. Enable the scheduler plugin and change the current hours to yellow.
3. Sets the low_down to 25kb/s
4. The download rate should now correspond to the low_down.
5. Sets the 'core' config max_download_speed to 10kb/s

Expected behavior:
6. The download_rate_limit of the current session should be the 10kb/s (the min between max_download_speed and low_down)

Current behavior:
7. The download_rate_limit of the current session is set to 25kb/s without consideration of the 'core' config.

I had a look to deluge/plugins/Scheduler-02.egg./scheduler/core.py line 148. I think it's just a matter of settings the download_rate_limit to the lower value between self.config["low_down"] and the core config. But, there is also something to do when the core configuration is set (i.e. core.set_config())
Post Reply