diff --git a/src/components/Feed/Episodes.vue b/src/components/Feed/Episodes.vue index 19ee056..6fb89fd 100644 --- a/src/components/Feed/Episodes.vue +++ b/src/components/Feed/Episodes.vue @@ -199,7 +199,7 @@ export default { async markAs(episode, read) { try { this.loadingAction = true - await axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [{ + const action = { podcast: this.url, episode: episode.url, guid: episode.guid, @@ -208,7 +208,14 @@ export default { started: episode.action ? episode.action.started : 0, position: read ? durationToSeconds(episode.duration) : 0, total: durationToSeconds(episode.duration), - }]) + } + await axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [action]) + this.episodes = this.episodes.map((e) => { + if (e.url === episode.url) { + e.action = action + } + return e + }) } catch (e) { console.error(e) showError(t('repod', 'Could not change the status of the episode'))