From 4cacc6b15e7a40a6c7ada13c6a588fee190640a2 Mon Sep 17 00:00:00 2001
From: Jonas Heinrich <onny@project-insanity.org>
Date: Mon, 29 Mar 2021 16:37:18 +0200
Subject: [PATCH] fix subscribe/unsubscribe show

---
 src/components/MediaHeader.vue | 4 ++--
 src/views/Show.vue             | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/components/MediaHeader.vue b/src/components/MediaHeader.vue
index a92e41d..2ae8132 100644
--- a/src/components/MediaHeader.vue
+++ b/src/components/MediaHeader.vue
@@ -106,8 +106,8 @@ export default {
 			default: false,
 		},
 		dateadded: {
-			type: Boolean,
-			default: false,
+			type: String,
+			default: null,
 		},
 	},
 	computed: {
diff --git a/src/views/Show.vue b/src/views/Show.vue
index ed39a4a..84b38dc 100644
--- a/src/views/Show.vue
+++ b/src/views/Show.vue
@@ -103,10 +103,12 @@ export default {
 		]),
 
 		doSubscribe() {
-			if (this.podcast.showadded) {
+			if (this.podcast.dateadded) {
 				this.removeShow(this.podcast)
+				this.podcast.dateadded = null
 			} else {
 				this.addShow(this.podcast)
+				this.podcast.dateadded = Date.now()
 			}
 		},
 
-- 
GitLab