<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/LibraryTrackSortProperties",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit26LibraryTrackSortPropertiesP"
  },
  "title" : "LibraryTrackSortProperties"
}
-->

# LibraryTrackSortProperties

Track properties your app uses to sort results for a library request.

```
protocol LibraryTrackSortProperties
```

## Topics

### Instance Properties

[`var albumTitle: String?`](/documentation/MusicKit/LibraryTrackSortProperties/albumTitle)

The title of the album the track appears on.

[`var artistName: String?`](/documentation/MusicKit/LibraryTrackSortProperties/artistName)

The artist’s name.

[`var discNumber: Int?`](/documentation/MusicKit/LibraryTrackSortProperties/discNumber)

The disc number of the track.

[`var duration: TimeInterval?`](/documentation/MusicKit/LibraryTrackSortProperties/duration)

The duration of the track.

[`var lastPlayedDate: Date?`](/documentation/MusicKit/LibraryTrackSortProperties/lastPlayedDate)

The date when the user last played the track on this device.

[`var libraryAddedDate: Date?`](/documentation/MusicKit/LibraryTrackSortProperties/libraryAddedDate)

The date when the user added the track to the library.

[`var playCount: Int?`](/documentation/MusicKit/LibraryTrackSortProperties/playCount)

The number of times the user played the track.

[`var title: String`](/documentation/MusicKit/LibraryTrackSortProperties/title)

The title of the track.

[`var trackNumber: Int?`](/documentation/MusicKit/LibraryTrackSortProperties/trackNumber)

The track’s number in the album’s track list.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)