@@ -18,8 +18,7 @@ export default {
default: () => []
},
width: Number,
- height: Number,
- bookCoverAspectRatio: Number
+ height: Number
},
data() {
return {}
diff --git a/client/components/modals/collections/AddCreateModal.vue b/client/components/modals/collections/AddCreateModal.vue
index 487251a1..09571b26 100644
--- a/client/components/modals/collections/AddCreateModal.vue
+++ b/client/components/modals/collections/AddCreateModal.vue
@@ -112,23 +112,21 @@ export default {
},
methods: {
loadCollections() {
- if (!this.collections.length) {
- this.processing = true
- this.$axios
- .$get(`/api/libraries/${this.currentLibraryId}/collections`)
- .then((data) => {
- if (data.results) {
- this.$store.commit('libraries/setCollections', data.results || [])
- }
- })
- .catch((error) => {
- console.error('Failed to get collections', error)
- this.$toast.error('Failed to load collections')
- })
- .finally(() => {
- this.processing = false
- })
- }
+ this.processing = true
+ this.$axios
+ .$get(`/api/libraries/${this.currentLibraryId}/collections`)
+ .then((data) => {
+ if (data.results) {
+ this.$store.commit('libraries/setCollections', data.results || [])
+ }
+ })
+ .catch((error) => {
+ console.error('Failed to get collections', error)
+ this.$toast.error('Failed to load collections')
+ })
+ .finally(() => {
+ this.processing = false
+ })
},
removeFromCollection(collection) {
if (!this.selectedLibraryItemId && !this.selectedBookIds.length) return
@@ -231,19 +229,3 @@ export default {
mounted() {}
}
-
-
\ No newline at end of file
diff --git a/client/components/modals/playlists/AddCreateModal.vue b/client/components/modals/playlists/AddCreateModal.vue
index 88d257d9..e583a6ee 100644
--- a/client/components/modals/playlists/AddCreateModal.vue
+++ b/client/components/modals/playlists/AddCreateModal.vue
@@ -15,7 +15,7 @@
-
+
@@ -77,9 +77,6 @@ export default {
playlists() {
return this.$store.state.libraries.userPlaylists || []
},
- bookCoverAspectRatio() {
- return this.$store.getters['libraries/getBookCoverAspectRatio']
- },
sortedPlaylists() {
return this.playlists
.map((playlist) => {
@@ -110,21 +107,19 @@ export default {
return playlist.items.some((i) => i.libraryItemId === item.libraryItem.id)
},
loadPlaylists() {
- if (!this.playlists.length) {
- this.processing = true
- this.$axios
- .$get(`/api/libraries/${this.currentLibraryId}/playlists`)
- .then((data) => {
- this.$store.commit('libraries/setUserPlaylists', data.results || [])
- })
- .catch((error) => {
- console.error('Failed to get playlists', error)
- this.$toast.error('Failed to load user playlists')
- })
- .finally(() => {
- this.processing = false
- })
- }
+ this.processing = true
+ this.$axios
+ .$get(`/api/libraries/${this.currentLibraryId}/playlists`)
+ .then((data) => {
+ this.$store.commit('libraries/setUserPlaylists', data.results || [])
+ })
+ .catch((error) => {
+ console.error('Failed to get playlists', error)
+ this.$toast.error('Failed to load user playlists')
+ })
+ .finally(() => {
+ this.processing = false
+ })
},
removeFromPlaylist(playlist) {
if (!this.selectedPlaylistItems.length) return
@@ -194,19 +189,3 @@ export default {
mounted() {}
}
-
-
\ No newline at end of file
diff --git a/client/components/modals/playlists/EditModal.vue b/client/components/modals/playlists/EditModal.vue
index 057dabd2..05f560b4 100644
--- a/client/components/modals/playlists/EditModal.vue
+++ b/client/components/modals/playlists/EditModal.vue
@@ -9,7 +9,7 @@