mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Fix multiple bugs
This commit is contained in:
parent
f511e0046d
commit
653db18679
4 changed files with 18 additions and 4 deletions
|
|
@ -135,6 +135,7 @@ export default {
|
|||
if (thisEntity) {
|
||||
const mediaItem = {
|
||||
id: thisEntity.id,
|
||||
libraryId: thisEntity.libraryId,
|
||||
mediaType: thisEntity.mediaType,
|
||||
hasTracks: thisEntity.mediaType === 'podcast' || thisEntity.media.audioFile || thisEntity.media.numTracks || (thisEntity.media.tracks && thisEntity.media.tracks.length)
|
||||
}
|
||||
|
|
@ -146,6 +147,7 @@ export default {
|
|||
} else {
|
||||
const mediaItem = {
|
||||
id: entity.id,
|
||||
libraryId: entity.libraryId,
|
||||
mediaType: entity.mediaType,
|
||||
hasTracks: entity.mediaType === 'podcast' || entity.media.audioFile || entity.media.numTracks || (entity.media.tracks && entity.media.tracks.length)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ export default {
|
|||
|
||||
const mediaItem = {
|
||||
id: thisEntity.id,
|
||||
libraryId: thisEntity.libraryId,
|
||||
mediaType: thisEntity.mediaType,
|
||||
hasTracks: thisEntity.mediaType === 'podcast' || thisEntity.media.audioFile || thisEntity.media.numTracks || (thisEntity.media.tracks && thisEntity.media.tracks.length)
|
||||
}
|
||||
|
|
@ -304,6 +305,7 @@ export default {
|
|||
} else {
|
||||
const mediaItem = {
|
||||
id: entity.id,
|
||||
libraryId: entity.libraryId,
|
||||
mediaType: entity.mediaType,
|
||||
hasTracks: entity.mediaType === 'podcast' || entity.media.audioFile || entity.media.numTracks || (entity.media.tracks && entity.media.tracks.length)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue