diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py
index b9b417e..36d2f35 100644
a
|
b
|
def get_session_auth_level(self):
|
494 | 494 | """ |
495 | 495 | if not self.listen: |
496 | 496 | return AUTH_LEVEL_ADMIN |
497 | | return self.factory.authorized_sessions[self.get_session_id()][0] |
| 497 | session_id = self.get_session_id() |
| 498 | if session_id > -1: |
| 499 | return self.factory.authorized_sessions[self.get_session_id()][0] |
| 500 | else: |
| 501 | return AUTH_LEVEL_ADMIN |
498 | 502 | |
499 | 503 | def get_rpc_auth_level(self, rpc): |
500 | 504 | """ |
diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py
index 6d829b4..f6c96d4 100644
a
|
b
|
def update_watchdir(self, watchdir_id):
|
241 | 241 | if watchdir.get(option+'_toggle', True): |
242 | 242 | opts[option] = value |
243 | 243 | |
| 244 | # Force session ID to -1 so this isn't mistaken for an RPC call |
| 245 | component.get("RPCServer").factory.session_id = -1 |
| 246 | |
244 | 247 | # Check for .magnet files containing multiple magnet links and |
245 | 248 | # create a new .magnet file for each of them. |
246 | 249 | for filename in os.listdir(watchdir["abspath"]): |