mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 18:32:50 +08:00
add multiple diange command handling
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
|||||||
"fyne.io/fyne/v2/data/binding"
|
"fyne.io/fyne/v2/data/binding"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
"github.com/AynaLivePlayer/miaosic"
|
"github.com/AynaLivePlayer/miaosic"
|
||||||
|
"golang.org/x/exp/slices"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -151,7 +152,8 @@ func (d *Diange) getSources() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Diange) getSource(cmd string) []string {
|
func (d *Diange) getSource(cmd string) []string {
|
||||||
if cmd == d.CustomCMD {
|
customCmds := strings.Split(d.CustomCMD, "|")
|
||||||
|
if slices.Contains(customCmds, cmd) {
|
||||||
return d.getSources()
|
return d.getSources()
|
||||||
}
|
}
|
||||||
sources := []string{}
|
sources := []string{}
|
||||||
|
|||||||
Reference in New Issue
Block a user