mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-22 16:34:10 +01:00
Update chromecast with new data model
This commit is contained in:
1 parent
8df05896b5
commit
99e2ea228d
3 files changed
+22
-21
No files matched your search
@@ -2,8 +2,8 @@ export default (ctx) => {
|
||||
var sendInit = async (castContext) => {
|
||||
// Fetch background covers for chromecast (temp)
|
||||
var covers = await ctx.$axios.$get(`/api/libraries/${ctx.$store.state.libraries.currentLibraryId}/items?limit=40&minified=1`).then((data) => {
|
||||
return data.results.filter((b) => b.book.cover).map((ab) => {
|
||||
var coverUrl = ctx.$store.getters['globals/getLibraryItemCoverSrc'](ab)
|
||||
return data.results.filter((b) => b.media.coverPath).map((libraryItem) => {
|
||||
var coverUrl = ctx.$store.getters['globals/getLibraryItemCoverSrc'](libraryItem)
|
||||
if (process.env.NODE_ENV === 'development') return coverUrl
|
||||
return `${window.location.origin}${coverUrl}`
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user