Changeset 1514:9c088d401de6
- Timestamp:
- 12/28/09 19:22:50 (3 months ago)
- Author:
- Mickael Royer <mickael.royer@…>
- Branch:
- GWT-webui
- Message:
-
[rpc] be sure id is string before use it
Ignore-this: a63aa39b35aa556240ab05c2f7a3195c
darcs-hash:20091228182250-b0006-e2f66d50afbab7772f861adbe6f1330f59352f1a.gz
committer: Mickael Royer <mickael.royer@…>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1480
|
r1514
|
|
| 283 | 283 | def jsonrpc_goto(self, id, id_type = "id", source = None): |
| 284 | 284 | """Begin playing at media file with id "id" or toggle play/pause.""" |
| 285 | | if not re.compile("^\w{1,}|\w{1,}\.\w{1,}$").search(id): |
| | 285 | if not re.compile("^\w{1,}|\w{1,}\.\w{1,}$").search(str(id)): |
| 286 | 286 | raise Fault(INVALID_METHOD_PARAMS, _("Wrong id parameter")) |
| 287 | | self.deejayd_core.go_to(id, id_type, source, objanswer=False) |
| | 287 | self.deejayd_core.go_to(str(id), id_type, source, objanswer=False) |
| 288 | 288 | |
| 289 | 289 | @returns_answer('ack', params=[{"name":"volume", "type":"int", "req":True}]) |