From 4ef42f3b15f3c2fba1e0bb7501dfe9a7f329dfb4 Mon Sep 17 00:00:00 2001 From: hiimkobeand Date: Mon, 12 Aug 2024 10:49:02 +0200 Subject: [PATCH] fix: missing uploadername in watch_history when using mark as watched --- src/components/VideoItem.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/VideoItem.vue b/src/components/VideoItem.vue index 765e56e0..474030a3 100644 --- a/src/components/VideoItem.vue +++ b/src/components/VideoItem.vue @@ -227,7 +227,6 @@ export default { }, toggleWatched(videoId) { if (window.db) { - // Should match WatchVideo.vue var tx = window.db.transaction("watch_history", "readwrite"); var store = tx.objectStore("watch_history"); var instance = this; @@ -237,23 +236,19 @@ export default { if (video) { video.watchedAt = Date.now(); } else { - // Should match WatchVideo.vue video = { videoId: videoId, title: instance.item.title, duration: instance.item.duration, thumbnail: instance.item.thumbnail, uploaderUrl: instance.item.uploaderUrl, - uploaderName: instance.item.uploader, + uploaderName: instance.item.uploaderName, watchedAt: Date.now(), }; } - // Set time to end for shouldShowVideo video.currentTime = instance.item.currentTime !== instance.item.duration ? instance.item.duration : 0; - // Save store.put(video); - // Disappear if hideWatched is on instance.$emit("update:watched", [instance.item.url]); instance.shouldShowVideo(); };