Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Immediately stopping and playing appears to cause crash #206

Closed
Gert-dev opened this issue Sep 17, 2020 · 3 comments
Closed

Immediately stopping and playing appears to cause crash #206

Gert-dev opened this issue Sep 17, 2020 · 3 comments

Comments

@Gert-dev
Copy link
Contributor

Describe the bug
When telling the bot to stop and immediately play afterwards, it crashes.

Affected version
Commit e5a2d810fc0fb2443582af07ca1b3d75cbaec8c6 or tag 7.1 - only translation updates have happened on master at the time of writing.

To Reproduce
Steps to reproduce the behavior:

  1. Start the music bot with an empty playlist (e.g. fresh install).
  2. In Mumble, send the command !stop.
  3. In Mumble, send the command !play.

Expected behavior
The bot does not crash and does nothing instead.

Additional context

Traceback (most recent call last):
  File "mumbleBot.py", line 881, in <module>
    var.bot.loop()
  File "mumbleBot.py", line 543, in loop
    current = var.playlist.current_item()
  File "/home/user/botamusique/media/playlist.py", line 257, in current_item
    return self[self.current_index]
IndexError: list index out of range
@TerryGeng
Copy link
Collaborator

Sorry for the late reply. Problem reproduced. Investigating...

@TerryGeng
Copy link
Collaborator

I posted a quick fix. Can you have a look?

@Gert-dev
Copy link
Contributor Author

I can confirm it's fixed with latest master, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants