11//
2- // MusicLibraryPlaylist .swift
2+ // LibraryPlaylist .swift
33// MusadoraKit
44//
55// Created by Rudrank Riyam on 06/10/22.
@@ -9,15 +9,15 @@ import Foundation
99
1010/// Represents a playlist within a user's music library.
1111///
12- /// A `MusicLibraryPlaylist` provides a detailed view of a playlist, including its attributes and associated metadata.
12+ /// A `LibraryPlaylist` represents a playlist within a user's music library, providing detailed information about its attributes and metadata.
1313/// This includes details like its editability, public status, artwork, and more.
1414///
1515/// Example usage:
1616///
17- /// let playlist: MusicLibraryPlaylist = fetchPlaylist(withID: someID)
17+ /// let playlist: LibraryPlaylist = fetchPlaylist(withID: someID)
1818/// print(playlist.attributes.name) // Prints the name of the playlist
1919///
20- public struct MusicLibraryPlaylist : Codable , MusicItem {
20+ public struct LibraryPlaylist : Codable , MusicItem {
2121 /// The unique identifier for the playlist.
2222 ///
2323 /// This identifier is unique to each playlist and can be used for fetching, updating, or deleting specific playlists.
@@ -49,7 +49,7 @@ public struct MusicLibraryPlaylist: Codable, MusicItem {
4949 public let hasCatalog : Bool
5050
5151 /// Parameters that determine how the playlist can be played.
52- public var playParams : MusicLibraryPlaylistPlayParameters
52+ public var playParams : LibraryPlaylistPlayParameters
5353
5454 /// A brief description of the playlist.
5555 ///
@@ -58,6 +58,9 @@ public struct MusicLibraryPlaylist: Codable, MusicItem {
5858
5959 /// Visual representation or image associated with the playlist.
6060 public let artwork : Artwork ?
61+
62+ /// A Boolean value indicating whether the playlist is in the user's favorites.
63+ public let inFavorites : Bool
6164 }
6265
6366 /// Contains the textual description of a playlist.
@@ -74,7 +77,7 @@ public struct MusicLibraryPlaylist: Codable, MusicItem {
7477
7578@available ( macOS 14 . 0 , * )
7679@available ( watchOS, unavailable)
77- extension MusicLibraryPlaylist : PlayableMusicItem {
80+ extension LibraryPlaylist : PlayableMusicItem {
7881 /// Retrieves the parameters required to play the playlist.
7982 ///
8083 /// - Returns: A set of play parameters or `nil` if they can't be determined.
@@ -99,7 +102,7 @@ extension MusicLibraryPlaylist: PlayableMusicItem {
99102}
100103
101104/// Defines the parameters required for playback of a library playlist.
102- public struct MusicLibraryPlaylistPlayParameters : Codable , Sendable {
105+ public struct LibraryPlaylistPlayParameters : Codable , Sendable {
103106 /// The unique identifier associated with the playlist.
104107 public let id : MusicItemID
105108
@@ -115,4 +118,4 @@ public struct MusicLibraryPlaylistPlayParameters: Codable, Sendable {
115118 }
116119}
117120
118- extension MusicLibraryPlaylist : Identifiable { }
121+ extension LibraryPlaylist : Identifiable { }
0 commit comments