mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-21 16:11:33 +01:00
Add:Playlist API endpoints
This commit is contained in:
1 parent
59ed2ec87f
commit
f9b87b94bf
3 files changed
+205
-3
No files matched your search
@@ -12,8 +12,7 @@ class Playlist {
|
||||
|
||||
this.coverPath = null
|
||||
|
||||
// Array of objects like { libraryItemId: "", episodeId: "" }
|
||||
// episodeId optional
|
||||
// Array of objects like { libraryItemId: "", episodeId: "" } (episodeId optional)
|
||||
this.items = []
|
||||
|
||||
this.lastUpdate = null
|
||||
@@ -128,5 +127,10 @@ class Playlist {
|
||||
}
|
||||
return hasUpdates
|
||||
}
|
||||
|
||||
containsItem(item) {
|
||||
if (item.episodeId) return this.items.some(i => i.libraryItemId === item.libraryItemId && i.episodeId === item.episodeId)
|
||||
return this.items.some(i => i.libraryItemId === item.libraryItemId)
|
||||
}
|
||||
}
|
||||
module.exports = Playlist
|
||||
Reference in new issue
Block a user