tfmart / ScrobbleKit

A Swift library for interacting with the Last.fm API on Apple platforms

Home Page:https://tfmart.github.io/ScrobbleKit/documentation/scrobblekit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track.getSimilarTracks return non-existing [SBKSSimilarTrack]

ridmaur opened this issue · comments

The getSimilarTracks function returns a collection of SBKSSimilarTrack, which does not exist publicly and is incorrect according to docs.
Hence, code like below does not compile properly:

do {
    let similarTracks = try await manager.getSimilarTracks(.trackInfo(entry.entryTitle, artist: entry.entryArtist), limit: 5)
    return similarTracks
}

and shows error message: Cannot convert return expression of type '[SBKSimilarTrack]' to return type '[SBKTrack]'

Solved it by deleting and reinstalling the package, rather than updating it using Xcode update packages functionality. All working fine now.