Fix multiple bugs

This commit is contained in:
Tiberiu Ichim 2026-02-06 22:43:24 +02:00
parent f511e0046d
commit 653db18679
4 changed files with 18 additions and 4 deletions

View file

@ -97,12 +97,13 @@ export default {
if (this.isBatchMode && this.selectedItems.length > 0) {
return this.selectedItems[0].libraryId
}
return this.libraryItem?.libraryId
return this.libraryItem?.libraryId || this.$store.state.libraries.currentLibraryId
},
currentMediaType() {
// Get media type from the current library
const currentLibrary = this.$store.state.libraries.libraries.find((l) => l.id === this.currentLibraryId)
return currentLibrary?.mediaType || 'book'
if (this.isBatchMode && this.selectedItems.length > 0) {
return this.selectedItems[0].mediaType
}
return this.libraryItem?.mediaType || 'book'
},
targetLibraries() {
// Filter libraries to only show compatible ones (same media type, different library)