No server rename in handle_server_api

Bug #566447 reported by Severin Heiniger on 2010-04-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

What is currently being worked upon in LottaNZB are the facilities to manage server, i.e. adding, deleting and editing them. This works quite nicely so far thanks to the introduction of the set_config API command. However, I stumbled upon the following issue:

When changing the host or port through the API, it will properly change the corresponding properties in the configuration and also update the downloader. However, the server is not renamed in handle_server_api, compared to handle_server that is executed when the user clicks 'Save changes' in the web UI. This will cause the server name to stay the same even if the user has entered completely different values for host and port. This might confuse users of the web interface and requires LottaNZB to remember the old server name throughout the whole session.

So what I suggest is to perform that rename in handle_server_api. I'm aware that this changes the semantics of the API, but I suspect that no other third-party application makes that extensive use of the API at this point of time. Using this, it would be necessary for LottaNZB to remember the name of the server prior to the change of host and port and to update the name after a query such as the one below in order to ensure that subsequent queries will succeed. But this is not a problem since I designed the system like that in the first place.


If you want me to, I can conduct further testing and provide you with a branch.

Related branches

shypike (shypike) wrote :

There's a logic error in the way the server renaming is handled.
Will be fixed.

Changed in sabnzbd:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → shypike (shypike)
milestone: none → 0.5.2
shypike (shypike) on 2010-04-19
Changed in sabnzbd:
status: Triaged → Fix Committed
Severin Heiniger (severinh) wrote :

Thanks alot for taking care of this. Syncing of servers between LottaNZB and SABnzbd works perfectly now. I might post a short screencast in order to demonstrate this feature.

shypike (shypike) on 2010-05-03
Changed in sabnzbd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers