mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-28 22:27:14 +02:00
Align with codebase
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<modals-podcast-episodes-feed-modal v-model="showPodcastEpisodeFeed" :library-item="libraryItem" :episodes="podcastFeedEpisodes" />
|
<modals-podcast-episodes-feed-modal v-model="showPodcastEpisodeFeed" :library-item="libraryItem" :episodes="podcastFeedEpisodes" />
|
||||||
|
|
||||||
<modals-order-modal v-model="showSortModal" :order-by.sync="sortKey" :descending.sync="sortDesc" episodes @change="saveSort" />
|
<modals-order-modal v-model="showSortModal" :order-by.sync="sortKey" :descending.sync="sortDesc" episodes />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -79,9 +79,6 @@ export default {
|
|||||||
episodesCopy: [],
|
episodesCopy: [],
|
||||||
showFiltersModal: false,
|
showFiltersModal: false,
|
||||||
showSortModal: false,
|
showSortModal: false,
|
||||||
sortKey: this.$store.state.user.settings.podcastEpisodesOrderBy || 'publishedAt',
|
|
||||||
sortDesc: this.$store.state.user.settings.podcastEpisodesOrderDesc,
|
|
||||||
filterKey: this.$store.state.user.settings.podcastEpisodesFilterBy || 'incomplete',
|
|
||||||
fetchingRSSFeed: false,
|
fetchingRSSFeed: false,
|
||||||
podcastFeedEpisodes: [],
|
podcastFeedEpisodes: [],
|
||||||
showPodcastEpisodeFeed: false,
|
showPodcastEpisodeFeed: false,
|
||||||
@@ -223,6 +220,27 @@ export default {
|
|||||||
if (!this.sortKey) return ''
|
if (!this.sortKey) return ''
|
||||||
const _sel = this.episodeSortItems.find((i) => i.value === this.sortKey)
|
const _sel = this.episodeSortItems.find((i) => i.value === this.sortKey)
|
||||||
return _sel?.text || ''
|
return _sel?.text || ''
|
||||||
|
},
|
||||||
|
filterKey() {
|
||||||
|
return this.$store.getters['user/getUserSetting']('podcastEpisodesFilterBy') || 'incomplete'
|
||||||
|
},
|
||||||
|
sortKey: {
|
||||||
|
get() {
|
||||||
|
return this.$store.getters['user/getUserSetting']('podcastEpisodesOrderBy') || 'publishedAt'
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesOrderBy: val })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sortDesc: {
|
||||||
|
get() {
|
||||||
|
const desc = this.$store.getters['user/getUserSetting']('podcastEpisodesOrderDesc')
|
||||||
|
if (desc === null || desc === undefined) return this.mediaMetadata.type === 'episodic'
|
||||||
|
return desc
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesOrderDesc: val })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -277,13 +295,9 @@ export default {
|
|||||||
this.$store.commit('globals/setShowPlaylistsAddCreateModal', true)
|
this.$store.commit('globals/setShowPlaylistsAddCreateModal', true)
|
||||||
},
|
},
|
||||||
setFilter(filter) {
|
setFilter(filter) {
|
||||||
this.filterKey = filter
|
|
||||||
this.showFiltersModal = false
|
this.showFiltersModal = false
|
||||||
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesFilterBy: filter })
|
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesFilterBy: filter })
|
||||||
},
|
},
|
||||||
saveSort() {
|
|
||||||
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesOrderBy: this.sortKey, podcastEpisodesOrderDesc: this.sortDesc })
|
|
||||||
},
|
|
||||||
showFilters() {
|
showFilters() {
|
||||||
this.showFiltersModal = true
|
this.showFiltersModal = true
|
||||||
},
|
},
|
||||||
@@ -318,12 +332,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.sortDesc === null || this.sortDesc === undefined) {
|
|
||||||
this.sortDesc = this.mediaMetadata.type === 'episodic'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.$route.query['episodefilter'] === 'downloaded') {
|
if (this.$route.query['episodefilter'] === 'downloaded') {
|
||||||
this.filterKey = 'downloaded'
|
this.$store.dispatch('user/updateUserSettings', { podcastEpisodesFilterBy: 'downloaded' })
|
||||||
}
|
}
|
||||||
this.$socket.$on('episode_download_queued', this.episodeDownloadQueued)
|
this.$socket.$on('episode_download_queued', this.episodeDownloadQueued)
|
||||||
this.$socket.$on('episode_download_started', this.episodeDownloadStarted)
|
this.$socket.$on('episode_download_started', this.episodeDownloadStarted)
|
||||||
|
|||||||
Reference in New Issue
Block a user