diff --git a/components/cards/LazyBookCard.vue b/components/cards/LazyBookCard.vue
index 4ca2cae9..93141c14 100644
--- a/components/cards/LazyBookCard.vue
+++ b/components/cards/LazyBookCard.vue
@@ -42,7 +42,7 @@
+
{{ isLocalOnly ? 'task' : 'download_done' }}
@@ -164,6 +164,7 @@ export default {
return this.media.numTracks
},
numEpisodes() {
+ if (this.isLocal && this.isPodcast && this.media.episodes) return this.media.episodes.length
return this.media.numEpisodes
},
processingBatch() {
@@ -351,6 +352,17 @@ export default {
if (!this.isAltViewEnabled) return 0
else if (!this.displaySortLine) return 3 * this.sizeMultiplier
return 4.25 * this.sizeMultiplier
+ },
+ showHasLocalDownload() {
+ if (this.localLibraryItem || this.isLocal) {
+ if (this.recentEpisode && !this.isLocal) {
+ const localEpisode = this.localLibraryItem.media.episodes.find((ep) => ep.serverEpisodeId === this.recentEpisode.id)
+ return !!localEpisode
+ } else {
+ return true
+ }
+ }
+ return false
}
},
methods: {
@@ -399,8 +411,26 @@ export default {
this.selectBtnClick()
} else if (this.recentEpisode) {
var eventBus = this.$eventBus || this.$nuxt.$eventBus
- if (this.streamIsPlaying) eventBus.$emit('pause-item')
- else eventBus.$emit('play-item', { libraryItemId: this.libraryItemId, episodeId: this.recentEpisode.id })
+ if (this.streamIsPlaying) {
+ eventBus.$emit('pause-item')
+ return
+ }
+
+ if (this.localLibraryItem) {
+ const localEpisode = this.localLibraryItem.media.episodes.find((ep) => ep.serverEpisodeId === this.recentEpisode.id)
+ if (localEpisode) {
+ // Play episode locally
+ eventBus.$emit('play-item', {
+ libraryItemId: this.localLibraryItemId,
+ episodeId: localEpisode.id,
+ serverLibraryItemId: this.libraryItemId,
+ serverEpisodeId: this.recentEpisode.id
+ })
+ return
+ }
+ }
+
+ eventBus.$emit('play-item', { libraryItemId: this.libraryItemId, episodeId: this.recentEpisode.id })
} else {
var router = this.$router || this.$nuxt.$router
if (router) {
diff --git a/components/tables/podcast/EpisodeRow.vue b/components/tables/podcast/EpisodeRow.vue
index bd2b4a6c..673613f2 100644
--- a/components/tables/podcast/EpisodeRow.vue
+++ b/components/tables/podcast/EpisodeRow.vue
@@ -193,7 +193,7 @@ export default {
episodeId: this.episode.id
}
if (localFolder) {
- this.localFolderId = localFolder.id
+ payload.localFolderId = localFolder.id
}
var downloadRes = await AbsDownloader.downloadLibraryItem(payload)
if (downloadRes && downloadRes.error) {
diff --git a/ios/App/Podfile b/ios/App/Podfile
index dcdae730..89125e80 100644
--- a/ios/App/Podfile
+++ b/ios/App/Podfile
@@ -9,12 +9,12 @@ install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
- pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
- pod 'CapacitorDialog', :path => '../../node_modules/@capacitor/dialog'
- pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
- pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
- pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
- pod 'CapacitorStorage', :path => '../../node_modules/@capacitor/storage'
+ pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app'
+ pod 'CapacitorDialog', :path => '..\..\node_modules\@capacitor\dialog'
+ pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics'
+ pod 'CapacitorNetwork', :path => '..\..\node_modules\@capacitor\network'
+ pod 'CapacitorStatusBar', :path => '..\..\node_modules\@capacitor\status-bar'
+ pod 'CapacitorStorage', :path => '..\..\node_modules\@capacitor\storage'
end
target 'App' do
diff --git a/pages/bookshelf/index.vue b/pages/bookshelf/index.vue
index e7cb3855..0806ca74 100644
--- a/pages/bookshelf/index.vue
+++ b/pages/bookshelf/index.vue
@@ -122,7 +122,7 @@ export default {
})
categories = categories.map((cat) => {
console.log('[breadcrumb] Personalized category from server', cat.type)
- if (cat.type == 'book' || cat.type == 'podcast') {
+ if (cat.type == 'book' || cat.type == 'podcast' || cat.type == 'episode') {
// Map localLibraryItem to entities
cat.entities = cat.entities.map((entity) => {
var localLibraryItem = this.localLibraryItems.find((lli) => {