mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Skip if unauthenticated
This commit is contained in:
@@ -383,7 +383,8 @@ export default {
|
||||
.replaceAll('\n', '<br>')
|
||||
)
|
||||
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 {
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user