Merge pull request #1165 from 1hitsong/singleSongLoopToggle

This commit is contained in:
1hitsong 2023-04-05 21:18:12 -04:00 committed by GitHub
commit f39dba7494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,6 +254,11 @@ function previousClicked() as boolean
m.global.audioPlayer.control = "stop"
end if
' Reset loop mode due to manual user interaction
if m.global.audioPlayer.loopMode = "one"
resetLoopModeToDefault()
end if
m.global.queueManager.callFunc("moveBack")
pageContentChanged()
@ -261,6 +266,11 @@ function previousClicked() as boolean
return true
end function
sub resetLoopModeToDefault()
m.global.audioPlayer.loopMode = ""
setLoopButtonImage()
end sub
function loopClicked() as boolean
if m.global.audioPlayer.loopMode = ""
@ -290,6 +300,11 @@ end sub
function nextClicked() as boolean
if m.playlistTypeCount > 1 then return false
' Reset loop mode due to manual user interaction
if m.global.audioPlayer.loopMode = "one"
resetLoopModeToDefault()
end if
if m.global.queueManager.callFunc("getPosition") < m.global.queueManager.callFunc("getCount") - 1
LoadNextSong()
end if