KodiItem
public protocol KodiItem : Decodable, Encodable, Hashable, Identifiable
A KodiItem is any kind of item from the Kodi library (SwiftlyKodi Type)
It can be an artist, album, song, movie, movie set, tv show, epiode, music video or a genre
-
The ID of the item
Declaration
Swift
var id: String { get } -
The Kodi ID of the item
Declaration
Swift
var kodiID: Library.ID { get } -
The title of the item
Declaration
Swift
var title: String { get } -
The subtitle of the item
Declaration
Swift
var subtitle: String { get } -
The details of the item
Declaration
Swift
var details: String { get } -
The description of the item (often plot)
Declaration
Swift
var description: String { get } -
The ‘sort by title’ of the item
Declaration
Swift
var sortByTitle: String { get } -
The playcount of the item
Declaration
Swift
var playcount: Int { get set } -
The date the item is added
Declaration
Swift
var dateAdded: String { get set } -
The release year of the item
Declaration
Swift
var year: Int { get set } -
The last played date of the item
Declaration
Swift
var lastPlayed: String { get set } -
The rating of the item
Declaration
Swift
var rating: Double { get set } -
The user rating of the item
Declaration
Swift
var userRating: Int { get set } -
The poster of the item
Declaration
Swift
var poster: String { get } -
The fanart of the item
Declaration
Swift
var fanart: String { get } -
The location of the file
Declaration
Swift
var file: String { get } -
The duration of the item
Declaration
Swift
var duration: Int { get } -
The resume position of the item
Declaration
Swift
var resume: Video.Resume { get set } -
The search string
Declaration
Swift
var search: String { get } -
markAsPlayed()Extension method, asynchronousMark a
KodiItemas playedDeclaration
Swift
func markAsPlayed() async -
markAsNew()Extension method, asynchronousMark a
KodiItemas newNote
You can’t set the date to nil or empty; that will be ignored, so we set it to a long time ago if neededDeclaration
Swift
func markAsNew() async -
togglePlayedState()Extension method, asynchronousToggle the played status of a
KodiItemNote
You can’t set the date to nil or empty; that will be ignored, so we set it to a long time ago if neededDeclaration
Swift
func togglePlayedState() async -
setResumeTime(time:Extension method, asynchronous) Set the resume time of a
KodiItemDeclaration
Swift
func setResumeTime(time: Double) async -
toggleFavorite()Extension method, asynchronousToggle a
KodiItemas ‘favorite’This will set the ‘userRating’ to either 10 or 0
Declaration
Swift
func toggleFavorite() async -
setUserRating(rating:Extension method, asynchronous) Set the user rating of a
KodiItemDeclaration
Swift
func setUserRating(rating: Int) async -
swiftDateFromKodiDate(_:Extension method) Convert a Kodi date string to a
DateDeclaration
Swift
public func swiftDateFromKodiDate(_ date: String) -> DateParameters
dateThe Kodi date string
Return Value
A Swift
Date -
playlistIDExtension methodThe ID of the playlist
Declaration
Swift
public var playlistID: Int? { get }
View on GitHub
KodiItem Protocol Reference