add search for bilivideo

This commit is contained in:
Aynakeya
2022-07-07 00:44:10 -07:00
parent 3431b5cafe
commit fd91b1e130
5 changed files with 90 additions and 5 deletions

View File

@@ -1,8 +1,18 @@
package provider
import "AynaLivePlayer/player"
import (
"AynaLivePlayer/config"
"AynaLivePlayer/player"
"os"
)
type _LocalPlaylist struct {
Name string
Medias []*player.Media
}
type Local struct {
Playlists []_LocalPlaylist
}
var LocalAPI *Local
@@ -13,12 +23,26 @@ func init() {
}
func _newLocal() *Local {
return &Local{}
l := &Local{Playlists: make([]_LocalPlaylist, 0)}
if err := os.MkdirAll(config.Provider.LocalDir, 0755); err != nil {
return l
}
return l
}
func (l *Local) GetName() string {
return "local"
}
func (l *Local) MatchMedia(keyword string) *player.Media {
//TODO implement me
panic("implement me")
}
func (l *Local) UpdateMediaLyric(media *player.Media) error {
//TODO implement me
panic("implement me")
}
func (l *Local) FormatPlaylistUrl(uri string) string {
return ""