mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 01:05:25 +02:00
Fix:Batch selecting ebooks showing play button in appbar #1235
This commit is contained in:
parent
d917f0e37d
commit
725f8eecdb
16 changed files with 117 additions and 89 deletions
|
@ -91,11 +91,13 @@
|
|||
<script>
|
||||
export default {
|
||||
async asyncData({ store, redirect, app }) {
|
||||
if (!store.state.selectedLibraryItems.length) {
|
||||
if (!store.state.globals.selectedMediaItems.length) {
|
||||
return redirect('/')
|
||||
}
|
||||
var libraryItems = await app.$axios.$post(`/api/items/batch/get`, { libraryItemIds: store.state.selectedLibraryItems }).catch((error) => {
|
||||
var errorMsg = error.response.data || 'Failed to get items'
|
||||
|
||||
const libraryItemIds = store.state.globals.selectedMediaItems.map((i) => i.id)
|
||||
const libraryItems = await app.$axios.$post(`/api/items/batch/get`, { libraryItemIds }).catch((error) => {
|
||||
const errorMsg = error.response.data || 'Failed to get items'
|
||||
console.error(errorMsg, error)
|
||||
return []
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue