diff --git a/src/routes/WatchVideo.vue b/src/routes/WatchVideo.vue index f0a3f10..a420bfa 100644 --- a/src/routes/WatchVideo.vue +++ b/src/routes/WatchVideo.vue @@ -383,7 +383,8 @@ export default { .replaceAll('\n', '
') ) try { - if (!this.$store.getters['prefs/getPreference']('disableDuplicateHistoryEntries', false) && false) { + // eslint-disable-next-line no-constant-condition + if (!this.$store.getters['prefs/getPreference']('disableDuplicateHistoryEntries', false) || true) { this.dbID = await addWatchedVideo(this.$store, video) this.lastWatch = await findLastWatch(this.videoId) } else { diff --git a/src/store/watched-videos-playlist.js b/src/store/watched-videos-playlist.js index d6c9df5..f9bd783 100644 --- a/src/store/watched-videos-playlist.js +++ b/src/store/watched-videos-playlist.js @@ -12,12 +12,17 @@ export const WatchedVideosPlaylist = { }, actions: { async resolvePlaylistID ({ dispatch, commit }) { - const playlists = await dispatch('auth/makeRequest', { - method: 'GET', - path: '/user/playlists' - }, { - root: true - }) + let playlists + try { + playlists = await dispatch('auth/makeRequest', { + method: 'GET', + path: '/user/playlists' + }, { + root: true + }) + } catch (e) { + return + } let found = false; let pl for (const _pl of playlists) { const sdp = _pl.shortDescription ?? '' @@ -45,6 +50,9 @@ export const WatchedVideosPlaylist = { commit('replaceID', pl.id) }, async addVideo ({ state, dispatch }, videoID) { + if (state.playlistID === '') { + return + } await dispatch('auth/makeRequest', { method: 'POST', path: '/user/playlists/add',