Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
Fix #172: Index out of range error during skip
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugrieger committed Aug 14, 2016
1 parent 786ab8c commit 466e918
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
MumbleDJ Changelog
==================

### August 14, 2016 -- `v3.1.2`
* Fixed an index out of range crash in the queue skipping function.

### July 11, 2016 -- `v3.1.1`
* Updated vendored dependencies to hopefully address the following issue: https://github.com/matthieugrieger/mumbledj/issues/169.

Expand Down
2 changes: 1 addition & 1 deletion bot/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (q *Queue) Skip() {

q.mutex.Lock()
// If caching is disabled, delete the track from disk.
if !viper.GetBool("cache.enabled") {
if q.Length() != 0 && !viper.GetBool("cache.enabled") {
DJ.YouTubeDL.Delete(q.Queue[0])
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {
services.DJ = DJ
bot.DJ = DJ

DJ.Version = "v3.1.1"
DJ.Version = "v3.1.2"

logrus.SetLevel(logrus.WarnLevel)
}
Expand Down

0 comments on commit 466e918

Please sign in to comment.