Fix https://github.com/matthieugrieger/mumbledj/issues/172: Index out of range error during skip
This commit is contained in:
parent
786ab8c3d6
commit
466e9189c6
|
@ -1,6 +1,9 @@
|
||||||
MumbleDJ Changelog
|
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`
|
### July 11, 2016 -- `v3.1.1`
|
||||||
* Updated vendored dependencies to hopefully address the following issue: https://github.com/matthieugrieger/mumbledj/issues/169.
|
* Updated vendored dependencies to hopefully address the following issue: https://github.com/matthieugrieger/mumbledj/issues/169.
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ func (q *Queue) Skip() {
|
||||||
|
|
||||||
q.mutex.Lock()
|
q.mutex.Lock()
|
||||||
// If caching is disabled, delete the track from disk.
|
// 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])
|
DJ.YouTubeDL.Delete(q.Queue[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue