rryam / MusadoraKit

The ultimate companion to MusicKit.
http://exploringmusickit.com
MIT License
340 stars 22 forks source link

LibraryPlaylistCreation - warnings. #17

Closed raymondwelch33 closed 1 year ago

raymondwelch33 commented 1 year ago

My issue is regarding the two '#TODO' warning notes in the code.

warning("TODO: ADD RELATIONSHIPS")

warning("TODO: ADD OPTION TO ADD TRACKS.")

When can we expect relationship and add track to playlist functions in the playlist class?

Thanks!

rudrankriyam commented 1 year ago

Hi @raymondwelch33! Thank you for using MusadoraKit!

Unfortunately, for playlist one, MusicKit is limiting the development as you cannot get relationships using the Apple Music API. I am thinking of creating a custom structure for it. No ETA, but hopefully should be done soon.

rudrankriyam commented 1 year ago

Hi @raymondwelch33.

I've added the option to create a playlist but only with songs at the moment. Let me know if it works for you.

Usage:

let song = try await MusadoraKit.catalogSong(id: "1651994123")
let playlist = try await MusadoraKit.createPlaylist(name: "TESTING SONGS", items: .init(arrayLiteral: song))
rudrankriyam commented 1 year ago

You can also add music videos to a playlist.

raymondwelch33 commented 1 year ago

Also I notice u change from static to dynamic? Y you do this?

rudrankriyam commented 1 year ago

Made the package type automatic in Version 1.9.2

raymondwelch33 commented 1 year ago

You can also add music videos to a playlist.

How can we achieve ?

raymondwelch33 commented 1 year ago

Can we do this how?

rudrankriyam commented 1 year ago

Added in Version 1.9.3. See the release notes for usage

https://github.com/rryam/MusadoraKit/releases/tag/v1.9.3