Fixed skipping songs
This commit is contained in:
parent
48e4eea70a
commit
0a50778618
|
@ -173,6 +173,7 @@ function skip(username)
|
||||||
local skip_ratio = song_queue:count_skippers() / count_users()
|
local skip_ratio = song_queue:count_skippers() / count_users()
|
||||||
if skip_ratio > config.SKIP_RATIO then
|
if skip_ratio > config.SKIP_RATIO then
|
||||||
piepan.me.channel:send(config.SONG_SKIPPED_HTML)
|
piepan.me.channel:send(config.SONG_SKIPPED_HTML)
|
||||||
|
piepan.Audio:stop()
|
||||||
next_song()
|
next_song()
|
||||||
else
|
else
|
||||||
piepan.me.channel:send(string.format(config.USER_SKIP_HTML, username))
|
piepan.me.channel:send(string.format(config.USER_SKIP_HTML, username))
|
||||||
|
|
|
@ -98,6 +98,9 @@ function start_song(info)
|
||||||
os.execute("sleep " .. tonumber(2))
|
os.execute("sleep " .. tonumber(2))
|
||||||
end
|
end
|
||||||
if not file_exists(".video_fail") then
|
if not file_exists(".video_fail") then
|
||||||
|
if piepan.Audio:isPlaying() then
|
||||||
|
piepan.Audio:stop()
|
||||||
|
end
|
||||||
piepan.me.channel:play("song-converted.ogg", SongQueue.get_next_song)
|
piepan.me.channel:play("song-converted.ogg", SongQueue.get_next_song)
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
|
|
Reference in a new issue