Permalink
Browse files

Stopped < 1 being used as a choice when multiple movies found

  • Loading branch information...
1 parent f44c584 commit a91f32601c8a5ff15617dd6d93fdff7887375bfb @Begall committed Jan 15, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 XBMC2/__init__.py
View
@@ -282,13 +282,16 @@ def mainvideo_command(self, speech, langauge, matchedRegex):
response = self.ask("", "Pick a number to play")
try:
- selection = foundinfo[int(response)-1] # Go back to 0 starting index
+ if int(response) > 0:
+ selection = foundinfo[int(response)-1] # Go back to 0 starting index
+ else:
+ raise IndexError
except IndexError:
self.say("That wasn't a choice, try again") # When index does not exist
self.complete_request()
- except NameError, ValueError:
+ except ValueError:
self.say("That wasn't a number silly!")
self.complete_request()

0 comments on commit a91f326

Please sign in to comment.