From a0fd6df318a172d66842088c35082ed749c85144 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Sat, 18 Nov 2023 15:27:42 +0800 Subject: [PATCH 01/11] + Add feature to set a playlist as quick bookmark target --- src/constants.js | 4 +- src/datastores/handlers/base.js | 22 ++++-- src/datastores/handlers/electron.js | 4 +- src/datastores/handlers/web.js | 4 +- src/main/index.js | 15 +++- .../components/ft-list-video/ft-list-video.js | 69 +++++++++++++++++++ .../ft-list-video/ft-list-video.vue | 14 ++++ .../components/playlist-info/playlist-info.js | 35 ++++++++++ .../playlist-info/playlist-info.vue | 14 ++++ src/renderer/main.js | 4 ++ src/renderer/scss-partials/_ft-list-item.scss | 4 ++ src/renderer/store/modules/playlists.js | 16 +++-- src/renderer/store/modules/settings.js | 1 + static/locales/en-US.yaml | 6 ++ 14 files changed, 193 insertions(+), 19 deletions(-) diff --git a/src/constants.js b/src/constants.js index f1d68b592466a..b281fb168256f 100644 --- a/src/constants.js +++ b/src/constants.js @@ -47,7 +47,7 @@ const DBActions = { UPSERT_VIDEOS: 'db-action-playlists-upsert-videos-by-playlist-name', DELETE_VIDEO_ID: 'db-action-playlists-delete-video-by-playlist-name', DELETE_VIDEO_IDS: 'db-action-playlists-delete-video-ids', - DELETE_ALL_VIDEOS: 'db-action-playlists-delete-all-videos' + DELETE_ALL_VIDEOS: 'db-action-playlists-delete-all-videos', } } @@ -66,7 +66,7 @@ const SyncEvents = { PLAYLISTS: { UPSERT_VIDEO: 'sync-playlists-upsert-video', - DELETE_VIDEO: 'sync-playlists-delete-video' + DELETE_VIDEO: 'sync-playlists-delete-video', } } diff --git a/src/datastores/handlers/base.js b/src/datastores/handlers/base.js index 070ebda8e8e2a..e9c2008d7f2f8 100644 --- a/src/datastores/handlers/base.js +++ b/src/datastores/handlers/base.js @@ -136,12 +136,22 @@ class Playlists { return db.playlists.removeAsync({ _id, protected: { $ne: true } }) } - static deleteVideoIdByPlaylistId(_id, playlistItemId) { - return db.playlists.updateAsync( - { _id }, - { $pull: { videos: { playlistItemId } } }, - { upsert: true } - ) + static deleteVideoIdByPlaylistId({ _id, videoId, playlistItemId }) { + if (playlistItemId != null) { + return db.playlists.updateAsync( + { _id }, + { $pull: { videos: { playlistItemId } } }, + { upsert: true } + ) + } else if (videoId != null) { + return db.playlists.updateAsync( + { _id }, + { $pull: { videos: { videoId } } }, + { upsert: true } + ) + } else { + throw new Error(`Both videoId & playlistItemId are absent, _id: ${_id}`) + } } static deleteVideoIdsByPlaylistId(_id, videoIds) { diff --git a/src/datastores/handlers/electron.js b/src/datastores/handlers/electron.js index d84ccac13c78d..9bf2526cf3585 100644 --- a/src/datastores/handlers/electron.js +++ b/src/datastores/handlers/electron.js @@ -160,12 +160,12 @@ class Playlists { ) } - static deleteVideoIdByPlaylistId(_id, playlistItemId) { + static deleteVideoIdByPlaylistId({ _id, videoId, playlistItemId }) { return ipcRenderer.invoke( IpcChannels.DB_PLAYLISTS, { action: DBActions.PLAYLISTS.DELETE_VIDEO_ID, - data: { _id, playlistItemId } + data: { _id, videoId, playlistItemId } } ) } diff --git a/src/datastores/handlers/web.js b/src/datastores/handlers/web.js index 103d93d441a2b..e8618beab086a 100644 --- a/src/datastores/handlers/web.js +++ b/src/datastores/handlers/web.js @@ -97,8 +97,8 @@ class Playlists { return baseHandlers.playlists.delete(_id) } - static deleteVideoIdByPlaylistId(_id, playlistItemId) { - return baseHandlers.playlists.deleteVideoIdByPlaylistId(_id, playlistItemId) + static deleteVideoIdByPlaylistId({ _id, videoId, playlistItemId }) { + return baseHandlers.playlists.deleteVideoIdByPlaylistId({ _id, videoId, playlistItemId }) } static deleteVideoIdsByPlaylistId(_id, videoIds) { diff --git a/src/main/index.js b/src/main/index.js index 0ca9917a3c86d..fac3c429bf802 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -995,7 +995,11 @@ function runApp() { return null case DBActions.PLAYLISTS.DELETE_VIDEO_ID: - await baseHandlers.playlists.deleteVideoIdByPlaylistId(data._id, data.playlistItemId) + await baseHandlers.playlists.deleteVideoIdByPlaylistId({ + _id: data._id, + videoId: data.videoId, + playlistItemId: data.playlistItemId, + }) syncOtherWindows( IpcChannels.SYNC_PLAYLISTS, event, @@ -1003,6 +1007,15 @@ function runApp() { ) return null + case DBActions.PLAYLISTS.SET_QUICK_SAVE_TARGET_PLAYLIST: + await baseHandlers.playlists.setPlaylistAsQuickBookmarkTarget(data) + syncOtherWindows( + IpcChannels.SYNC_PLAYLISTS, + event, + { event: SyncEvents.PLAYLISTS.SET_QUICK_SAVE_TARGET_PLAYLIST, data } + ) + return null + case DBActions.PLAYLISTS.DELETE_VIDEO_IDS: await baseHandlers.playlists.deleteVideoIdsByPlaylistId(data._id, data.videoIds) // TODO: Syncing (implement only when it starts being used) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index fd58c6f67bfb9..c18b37462791d 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -397,6 +397,26 @@ export default defineComponent({ return this.playlistIdTypePairFinal?.playlistItemId }, + quickBookmarkPlaylistId() { + return this.$store.getters.getQuickBookmarkTargetPlaylistId + }, + quickBookmarkPlaylist() { + return this.$store.getters.getPlaylist(this.quickBookmarkPlaylistId) + }, + isQuickBookmarkEnabled() { + return this.quickBookmarkPlaylist != null + }, + isInQuickBookmarkPlaylist: function () { + if (!this.isQuickBookmarkEnabled) { return false } + + return this.quickBookmarkPlaylist.videos.some((video) => { + return video.videoId === this.id + }) + }, + quickBookmarkIconTheme: function () { + return this.isInQuickBookmarkPlaylist ? 'base favorite' : 'base' + }, + watchPageLinkTo() { // For `router-link` attribute `to` return { @@ -729,12 +749,61 @@ export default defineComponent({ showToast(this.$t('Channel Unhidden', { channel: channelName })) }, + toggleQuickBookmarked() { + if (!this.isQuickBookmarkEnabled) { + // This should be prevented by UI + return + } + + if (this.isInQuickBookmarkPlaylist) { + this.removeFromQuickBookmarkPlaylist() + } else { + this.addToQuickBookmarkPlaylist() + } + }, + addToQuickBookmarkPlaylist() { + const videoData = { + videoId: this.id, + title: this.title, + author: this.channelName, + authorId: this.channelId, + description: this.description, + viewCount: this.viewCount, + lengthSeconds: this.data.lengthSeconds, + } + + this.addVideos({ + _id: this.quickBookmarkPlaylist._id, + videos: [videoData], + }) + // Update playlist's `lastUpdatedAt` + this.updatePlaylist({ _id: this.quickBookmarkPlaylist._id }) + + // TODO: Maybe show playlist name + showToast(this.$t('Video.Video has been saved')) + }, + removeFromQuickBookmarkPlaylist() { + this.removeVideo({ + _id: this.quickBookmarkPlaylist._id, + // Remove all playlist items with same videoId + videoId: this.id, + }) + // Update playlist's `lastUpdatedAt` + this.updatePlaylist({ _id: this.quickBookmarkPlaylist._id }) + + // TODO: Maybe show playlist name + showToast(this.$t('Video.Video has been removed from your saved list')) + }, + ...mapActions([ 'openInExternalPlayer', 'updateHistory', 'removeFromHistory', 'updateChannelsHidden', 'showAddToPlaylistPromptForManyVideos', + 'addVideos', + 'updatePlaylist', + 'removeVideo', ]) } }) diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index 495b3464bffcf..9226e23087de0 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -55,6 +55,20 @@ :size="appearance === `watchPlaylistItem` ? 14 : 18" @click="togglePlaylistPrompt" /> + { + this.updateQuickBookmarkTargetPlaylistId(this.id) + }) + return + } + + this.updateQuickBookmarkTargetPlaylistId(this.id) + showToast(this.$t('User Playlists.SinglePlaylistView.Toast.This playlist is now used for quick bookmark')) + }, + disableQuickBookmark() { + this.updateQuickBookmarkTargetPlaylistId(null) + showToast(this.$t('User Playlists.SinglePlaylistView.Toast.Quick bookmark disabled')) + }, + ...mapActions([ 'showAddToPlaylistPromptForManyVideos', 'updatePlaylist', 'removePlaylist', + 'updateQuickBookmarkTargetPlaylistId', ]), }, }) diff --git a/src/renderer/components/playlist-info/playlist-info.vue b/src/renderer/components/playlist-info/playlist-info.vue index f481205053a4e..b064a1837be5b 100644 --- a/src/renderer/components/playlist-info/playlist-info.vue +++ b/src/renderer/components/playlist-info/playlist-info.vue @@ -135,6 +135,20 @@ theme="secondary" @click="toggleCopyVideosPrompt" /> + + playlist._id === payload._id) + removeVideo(state, { _id, videoId, playlistItemId }) { + const playlist = state.playlists.find(playlist => playlist._id === _id) if (playlist) { - playlist.videos = playlist.videos.filter(video => video.playlistItemId !== payload.playlistItemId) + if (playlistItemId != null) { + playlist.videos = playlist.videos.filter(video => video.playlistItemId !== playlistItemId) + } else if (videoId != null) { + playlist.videos = playlist.videos.filter(video => video.videoId !== videoId) + } } }, diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index 4bbf28e0a1359..bf3f9141f82ce 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -299,6 +299,7 @@ const state = { allowDashAv1Formats: false, commentAutoLoadEnabled: false, useDeArrowTitles: false, + quickBookmarkTargetPlaylistId: null, } const stateWithSideEffects = { diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index c26943a73c73c..bc710f08ab54f 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -159,6 +159,8 @@ User Playlists: Edit Playlist Info: Edit Playlist Info Copy Playlist: Copy Playlist Remove Watched Videos: Remove Watched Videos + Enable Quick Bookmark With This Playlist: Enable Quick Bookmark With This Playlist + Disable Quick Bookmark: Disable Quick Bookmark Are you sure you want to remove all watched videos from this playlist? This cannot be undone: Are you sure you want to remove all watched videos from this playlist? This cannot be undone. Delete Playlist: Delete Playlist Are you sure you want to delete this playlist? This cannot be undone: Are you sure you want to delete this playlist? This cannot be undone. @@ -185,6 +187,10 @@ User Playlists: Video has been removed: Video has been removed There was a problem with removing this video: There was a problem with removing this video + This playlist is now used for quick bookmark: This playlist is now used for quick bookmark + Quick bookmark disabled: Quick bookmark disabled + Another playlist is already used for quick bookmark. Click here to use this playlist anyway: Another playlist is already used for quick bookmark. Click here to use this playlist anyway + Some videos in the playlist are not loaded yet. Click here to copy anyway.: Some videos in the playlist are not loaded yet. Click here to copy anyway. Playlist name cannot be empty. Please input a name.: Playlist name cannot be empty. Please input a name. Playlist has been updated.: Playlist has been updated. From 8207348258cde93e474f72937a3633377145eff3 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 4 Jan 2024 09:49:32 +0800 Subject: [PATCH 02/11] Add back button to watch page --- .../watch-video-info/watch-video-info.js | 73 ++++++++++++++++++- .../watch-video-info/watch-video-info.vue | 11 +++ 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 2a123929937e0..2f2a504f4126e 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -4,7 +4,7 @@ import FtCard from '../ft-card/ft-card.vue' import FtIconButton from '../ft-icon-button/ft-icon-button.vue' import FtShareButton from '../ft-share-button/ft-share-button.vue' import FtSubscribeButton from '../ft-subscribe-button/ft-subscribe-button.vue' -import { formatNumber, openExternalLink } from '../../helpers/utils' +import { formatNumber, openExternalLink, showToast } from '../../helpers/utils' export default defineComponent({ name: 'WatchVideoInfo', @@ -214,7 +214,27 @@ export default defineComponent({ defaultPlayback: function () { return this.$store.getters.getDefaultPlayback - } + }, + + quickBookmarkPlaylistId() { + return this.$store.getters.getQuickBookmarkTargetPlaylistId + }, + quickBookmarkPlaylist() { + return this.$store.getters.getPlaylist(this.quickBookmarkPlaylistId) + }, + isQuickBookmarkEnabled() { + return this.quickBookmarkPlaylist != null + }, + isInQuickBookmarkPlaylist: function () { + if (!this.isQuickBookmarkEnabled) { return false } + + return this.quickBookmarkPlaylist.videos.some((video) => { + return video.videoId === this.id + }) + }, + quickBookmarkIconTheme: function () { + return this.isInQuickBookmarkPlaylist ? 'base favorite' : 'base' + }, }, mounted: function () { if ('mediaSession' in navigator) { @@ -311,10 +331,59 @@ export default defineComponent({ this.showAddToPlaylistPromptForManyVideos({ videos: [videoData] }) }, + toggleQuickBookmarked() { + if (!this.isQuickBookmarkEnabled) { + // This should be prevented by UI + return + } + + if (this.isInQuickBookmarkPlaylist) { + this.removeFromQuickBookmarkPlaylist() + } else { + this.addToQuickBookmarkPlaylist() + } + }, + addToQuickBookmarkPlaylist() { + const videoData = { + videoId: this.id, + title: this.title, + author: this.channelName, + authorId: this.channelId, + description: this.description, + viewCount: this.viewCount, + lengthSeconds: this.lengthSeconds, + } + + this.addVideos({ + _id: this.quickBookmarkPlaylist._id, + videos: [videoData], + }) + // Update playlist's `lastUpdatedAt` + this.updatePlaylist({ _id: this.quickBookmarkPlaylist._id }) + + // TODO: Maybe show playlist name + showToast(this.$t('Video.Video has been saved')) + }, + removeFromQuickBookmarkPlaylist() { + this.removeVideo({ + _id: this.quickBookmarkPlaylist._id, + // Remove all playlist items with same videoId + videoId: this.id, + }) + // Update playlist's `lastUpdatedAt` + this.updatePlaylist({ _id: this.quickBookmarkPlaylist._id }) + + // TODO: Maybe show playlist name + showToast(this.$t('Video.Video has been removed from your saved list')) + }, + ...mapActions([ 'openInExternalPlayer', 'downloadMedia', 'showAddToPlaylistPromptForManyVideos', + 'addVideos', + 'updatePlaylist', + 'removeVideo', ]) } }) diff --git a/src/renderer/components/watch-video-info/watch-video-info.vue b/src/renderer/components/watch-video-info/watch-video-info.vue index af56b5c905a90..f6e3017d374b8 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.vue +++ b/src/renderer/components/watch-video-info/watch-video-info.vue @@ -89,6 +89,17 @@ theme="base" @click="togglePlaylistPrompt" /> + Date: Thu, 4 Jan 2024 10:00:56 +0800 Subject: [PATCH 03/11] focus behavior style update --- src/renderer/scss-partials/_ft-list-item.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/scss-partials/_ft-list-item.scss b/src/renderer/scss-partials/_ft-list-item.scss index eaab53cb50c3a..899948d171cf9 100644 --- a/src/renderer/scss-partials/_ft-list-item.scss +++ b/src/renderer/scss-partials/_ft-list-item.scss @@ -363,13 +363,14 @@ $watched-transition-duration: 0.5s; .quickBookmarkVideoIcon.bookmarked:not(.alwaysVisible), &:hover .addToPlaylistIcon:not(.alwaysVisible), &:hover .externalPlayerIcon, - &:focus-within .addToPlaylistIcon:not(.alwaysVisible), - &:focus-within .externalPlayerIcon { + &:has(:focus-visible) .addToPlaylistIcon:not(.alwaysVisible), + &:has(:focus-visible) .quickBookmarkVideoIcon:not(.alwaysVisible), + &:has(:focus-visible) .externalPlayerIcon { opacity: $thumbnail-overlay-opacity; } &:hover .optionsButton, - &:focus-within .optionsButton { + &:has(:focus-visible) .optionsButton { opacity: 1; } From a2d53960856da89e984c8fc6d6bfad7bba468450 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 4 Jan 2024 10:08:21 +0800 Subject: [PATCH 04/11] * Different button text when video saved --- src/renderer/components/ft-list-video/ft-list-video.js | 3 +++ src/renderer/components/ft-list-video/ft-list-video.vue | 2 +- src/renderer/components/watch-video-info/watch-video-info.js | 3 +++ src/renderer/components/watch-video-info/watch-video-info.vue | 2 +- static/locales/en-US.yaml | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index c18b37462791d..81f28f4d6b618 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -413,6 +413,9 @@ export default defineComponent({ return video.videoId === this.id }) }, + quickBookmarkIconText: function () { + return this.isInQuickBookmarkPlaylist ? this.$t('User Playlists.Remove from Favorites') : this.$t('User Playlists.Add to Favorites') + }, quickBookmarkIconTheme: function () { return this.isInQuickBookmarkPlaylist ? 'base favorite' : 'base' }, diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index 9226e23087de0..0d57b0d024e09 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -57,7 +57,7 @@ /> { - this.updateQuickBookmarkTargetPlaylistId(this.id) - }) - return - } + const currentQuickBookmarkTargetPlaylist = this.quickBookmarkPlaylist this.updateQuickBookmarkTargetPlaylistId(this.id) - showToast(this.$t('User Playlists.SinglePlaylistView.Toast.This playlist is now used for quick bookmark')) + if (currentQuickBookmarkTargetPlaylist != null) { + showToast( + this.$t('User Playlists.SinglePlaylistView.Toast["This playlist is now used for quick bookmark instead of {oldPlaylistName}. Click here to undo"]', { + oldPlaylistName: currentQuickBookmarkTargetPlaylist.playlistName, + }), + 5000, + () => { + this.updateQuickBookmarkTargetPlaylistId(currentQuickBookmarkTargetPlaylist._id) + showToast( + this.$t('User Playlists.SinglePlaylistView.Toast["Reverted to use {oldPlaylistName} for quick bookmark"]', { + oldPlaylistName: currentQuickBookmarkTargetPlaylist.playlistName, + }), + 5000, + ) + }, + ) + } else { + showToast(this.$t('User Playlists.SinglePlaylistView.Toast.This playlist is now used for quick bookmark')) + } }, disableQuickBookmark() { this.updateQuickBookmarkTargetPlaylistId(null) diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index b42e9dc9cd364..c1b45f98747b3 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -192,7 +192,8 @@ User Playlists: This playlist is now used for quick bookmark: This playlist is now used for quick bookmark Quick bookmark disabled: Quick bookmark disabled - Another playlist is already used for quick bookmark. Click here to use this playlist anyway: Another playlist is already used for quick bookmark. Click here to use this playlist anyway + This playlist is now used for quick bookmark instead of {oldPlaylistName}. Click here to undo: This playlist is now used for quick bookmark instead of {oldPlaylistName}. Click here to undo + Reverted to use {oldPlaylistName} for quick bookmark: Reverted to use {oldPlaylistName} for quick bookmark Some videos in the playlist are not loaded yet. Click here to copy anyway.: Some videos in the playlist are not loaded yet. Click here to copy anyway. Playlist name cannot be empty. Please input a name.: Playlist name cannot be empty. Please input a name. From 7d3c54701b52317334e0612474dc40c612ecbd10 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 4 Jan 2024 15:12:36 +0800 Subject: [PATCH 10/11] * Update single playlist view to hide fav button when viewing the target playlist --- .../components/ft-list-video-lazy/ft-list-video-lazy.js | 4 ++++ .../components/ft-list-video-lazy/ft-list-video-lazy.vue | 1 + src/renderer/components/ft-list-video/ft-list-video.js | 4 ++++ src/renderer/components/ft-list-video/ft-list-video.vue | 2 +- src/renderer/views/Playlist/Playlist.js | 9 +++++++++ src/renderer/views/Playlist/Playlist.vue | 1 + 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js index 10639a3a43bae..ef5a044b27d44 100644 --- a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js +++ b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.js @@ -55,6 +55,10 @@ export default defineComponent({ type: Boolean, default: false, }, + quickBookmarkButtonEnabled: { + type: Boolean, + default: true, + }, canMoveVideoUp: { type: Boolean, default: false, diff --git a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.vue b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.vue index 197d7226ca079..9af01de8af16a 100644 --- a/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.vue +++ b/src/renderer/components/ft-list-video-lazy/ft-list-video-lazy.vue @@ -18,6 +18,7 @@ :force-list-type="forceListType" :appearance="appearance" :always-show-add-to-playlist-button="alwaysShowAddToPlaylistButton" + :quick-bookmark-button-enabled="quickBookmarkButtonEnabled" :can-move-video-up="canMoveVideoUp" :can-move-video-down="canMoveVideoDown" :can-remove-from-playlist="canRemoveFromPlaylist" diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 0047e1abdc485..42714cd2eb511 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -66,6 +66,10 @@ export default defineComponent({ type: Boolean, default: false, }, + quickBookmarkButtonEnabled: { + type: Boolean, + default: true, + }, canMoveVideoUp: { type: Boolean, default: false, diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index 0d57b0d024e09..40db3b5356ff3 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -56,7 +56,7 @@ @click="togglePlaylistPrompt" /> Date: Wed, 10 Jan 2024 08:39:36 +0800 Subject: [PATCH 11/11] - Remove unused code --- src/main/index.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index fac3c429bf802..0be1137584fbc 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1007,15 +1007,6 @@ function runApp() { ) return null - case DBActions.PLAYLISTS.SET_QUICK_SAVE_TARGET_PLAYLIST: - await baseHandlers.playlists.setPlaylistAsQuickBookmarkTarget(data) - syncOtherWindows( - IpcChannels.SYNC_PLAYLISTS, - event, - { event: SyncEvents.PLAYLISTS.SET_QUICK_SAVE_TARGET_PLAYLIST, data } - ) - return null - case DBActions.PLAYLISTS.DELETE_VIDEO_IDS: await baseHandlers.playlists.deleteVideoIdsByPlaylistId(data._id, data.videoIds) // TODO: Syncing (implement only when it starts being used)