mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-14 05:58:17 +08:00
add skip playlist
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"AynaLivePlayer/config"
|
||||
"AynaLivePlayer/event"
|
||||
"AynaLivePlayer/player"
|
||||
"github.com/aynakeya/go-mpv"
|
||||
)
|
||||
|
||||
@@ -16,6 +18,11 @@ func handleMpvIdlePlayNext(property *mpv.EventProperty) {
|
||||
func handlePlaylistAdd(event *event.Event) {
|
||||
if MainPlayer.IsIdle() {
|
||||
PlayNext()
|
||||
return
|
||||
}
|
||||
if config.Player.SkipPlaylist && CurrentMedia != nil && CurrentMedia.User == player.PlaylistUser {
|
||||
PlayNext()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user