added audio url to datatype

This commit is contained in:
acute_interpreter_panic
2025-10-10 13:25:29 +02:00
parent 1ff37517a5
commit 82c541653c

View File

@@ -19,7 +19,9 @@ const AlbumSource = ObjectType("album")
const ArtistSource = ObjectType("artist")
type Source struct {
Url string
Url string
AudioUrl string // will only be used when ObjectType = SongSource
SourceType *SourceType
ObjectType ObjectType
}
@@ -38,6 +40,9 @@ func dedupeSources(inputSources []Source) []Source {
if source.SourceType != nil {
deduped[mergeWithIndex].SourceType = source.SourceType
}
if source.AudioUrl != "" {
deduped[mergeWithIndex].AudioUrl = source.AudioUrl
}
} else {
// just appending