mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Added buttons to add items to the top or bottom of a playlist.
This commit is contained in:
parent
122fc34a75
commit
6c94913cb2
3 changed files with 15 additions and 8 deletions
|
|
@ -397,9 +397,10 @@ class PlaylistController {
|
|||
|
||||
const mediaItemsToAdd = []
|
||||
const jsonExpanded = req.playlist.toOldJSONExpanded()
|
||||
const addToTop = req.body.addToTop === true
|
||||
|
||||
// Setup array of playlistMediaItem records to add
|
||||
let order = req.playlist.playlistMediaItems.length + 1
|
||||
let order = addToTop ? 0 : (req.playlist.playlistMediaItems.length + 1)
|
||||
for (const item of req.body.items) {
|
||||
const libraryItem = libraryItems.find((li) => li.id === item.libraryItemId)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue