[PR #4907] Added buttons to add items to the top or bottom of a playlist. #4369

Open
opened 2026-04-25 00:19:27 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4907
Author: @sir-wilhelm
Created: 12/12/2025
Status: 🔄 Open

Base: masterHead: playlist-add-begin-end


📝 Commits (1)

  • 6c94913 Added buttons to add items to the top or bottom of a playlist.

📊 Changes

3 files changed (+15 additions, -8 deletions)

View changed files

📝 client/components/modals/playlists/AddCreateModal.vue (+3 -3)
📝 client/components/modals/playlists/UserPlaylistItem.vue (+10 -4)
📝 server/controllers/PlaylistController.js (+2 -1)

📄 Description

Brief summary

Updated the add to Playlist modal to support adding items to the top or bottom of playlist.

Which issue is fixed?

Fixes part of #4765. I only addressed playlist, since I don't use Collections.
If you want the same treatment for Collections let me know.

In-depth Description

I don't know if this is the best solution, but I thought it makes more sense to update the batch add items to a playlist endpoint to check for an optional addToTop property and then adjust where the item is added. That seemed better/easier than adding it at the bottom, then making more request to move it after the fact.

If you have a preferred implementation I'd be happy to update the PR after feedback.

How have you tested this?

I used github's codespaces via VSCode to make and test the server/UI changes.

Screenshots

image image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4907 **Author:** [@sir-wilhelm](https://github.com/sir-wilhelm) **Created:** 12/12/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `playlist-add-begin-end` --- ### 📝 Commits (1) - [`6c94913`](https://github.com/advplyr/audiobookshelf/commit/6c94913cb2f8988e487c4b71b38b9b79587ed02e) Added buttons to add items to the top or bottom of a playlist. ### 📊 Changes **3 files changed** (+15 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/playlists/AddCreateModal.vue` (+3 -3) 📝 `client/components/modals/playlists/UserPlaylistItem.vue` (+10 -4) 📝 `server/controllers/PlaylistController.js` (+2 -1) </details> ### 📄 Description ## Brief summary Updated the add to Playlist modal to support adding items to the top or bottom of playlist. ## Which issue is fixed? Fixes part of #4765. I only addressed playlist, since I don't use Collections. If you want the same treatment for Collections let me know. ## In-depth Description I don't know if this is the best solution, but I thought it makes more sense to update the [batch add items to a playlist](https://api.audiobookshelf.org/#batch-add-items-to-a-playlist) endpoint to check for an optional `addToTop` property and then adjust where the item is added. That seemed better/easier than adding it at the bottom, then making more request to move it after the fact. If you have a preferred implementation I'd be happy to update the PR after feedback. ## How have you tested this? I used github's codespaces via VSCode to make and test the server/UI changes. ## Screenshots <img width="487" height="89" alt="image" src="https://github.com/user-attachments/assets/2e7c0b19-7cf6-4f79-a922-4cd18daf4946" /> <img width="506" height="101" alt="image" src="https://github.com/user-attachments/assets/20c6abc8-52a4-4410-bb40-51bf9c3eae03" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:27 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4369