fixed wrong source type

This commit is contained in:
Hazel Noack
2025-10-09 13:35:47 +02:00
parent 07468e5b4f
commit b5a78eb5b9
2 changed files with 9 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package plugin
import (
"errors"
"fmt"
"regexp"
"gitea.elara.ws/Hazel/music-kraken/internal/common"
@@ -101,6 +102,8 @@ func compileSource(source data.Source) (data.Source, error) {
func FetchSource(source data.Source) (data.MusicObject, error) {
// the fetch function without the post processing of the music objects
fmt.Println("call")
source, err := compileSource(source)
if err != nil {
return nil, err
@@ -111,6 +114,8 @@ func FetchSource(source data.Source) (data.MusicObject, error) {
return nil, errors.New("didn't find plugin of the name " + source.SourceType.Name)
}
fmt.Println("call2", source)
if source.ObjectType == data.SongSource {
song, err := plugin.FetchSong(source)