2020-02-16 19:30:00 +01:00
|
|
|
import Datastore from 'nedb'
|
2020-04-18 05:17:45 +02:00
|
|
|
|
|
|
|
let dbLocation
|
2020-10-06 17:53:54 +02:00
|
|
|
let electron = null
|
|
|
|
let webframe = null
|
2020-04-18 05:17:45 +02:00
|
|
|
|
|
|
|
if (window && window.process && window.process.type === 'renderer') {
|
|
|
|
// Electron is being used
|
2020-04-22 04:59:09 +02:00
|
|
|
/* let dbLocation = localStorage.getItem('dbLocation')
|
2020-04-18 05:17:45 +02:00
|
|
|
|
|
|
|
if (dbLocation === null) {
|
|
|
|
const electron = require('electron')
|
|
|
|
dbLocation = electron.remote.app.getPath('userData')
|
2020-04-22 04:59:09 +02:00
|
|
|
} */
|
|
|
|
|
2020-10-06 17:53:54 +02:00
|
|
|
electron = require('electron')
|
|
|
|
webframe = electron.webFrame
|
2021-03-03 04:51:01 +01:00
|
|
|
const remote = require('@electron/remote')
|
|
|
|
dbLocation = remote.app.getPath('userData')
|
2020-04-18 05:17:45 +02:00
|
|
|
|
2020-04-22 04:59:09 +02:00
|
|
|
dbLocation = dbLocation + '/settings.db'
|
2020-04-18 05:17:45 +02:00
|
|
|
} else {
|
|
|
|
dbLocation = 'settings.db'
|
|
|
|
}
|
2020-02-16 19:30:00 +01:00
|
|
|
|
2020-04-22 04:59:09 +02:00
|
|
|
console.log(dbLocation)
|
|
|
|
|
2020-02-16 19:30:00 +01:00
|
|
|
const settingsDb = new Datastore({
|
2020-04-18 05:17:45 +02:00
|
|
|
filename: dbLocation,
|
2020-02-16 19:30:00 +01:00
|
|
|
autoload: true
|
|
|
|
})
|
|
|
|
|
|
|
|
const state = {
|
2020-02-27 04:10:56 +01:00
|
|
|
currentTheme: 'lightRed',
|
2020-10-06 17:53:54 +02:00
|
|
|
uiScale: 100,
|
2020-03-01 04:37:02 +01:00
|
|
|
backendFallback: true,
|
|
|
|
checkForUpdates: true,
|
2020-09-20 20:22:39 +02:00
|
|
|
checkForBlogPosts: true,
|
2020-02-19 04:31:10 +01:00
|
|
|
backendPreference: 'local',
|
2020-03-01 04:37:02 +01:00
|
|
|
landingPage: 'subscriptions',
|
|
|
|
region: 'US',
|
|
|
|
listType: 'grid',
|
2020-02-27 04:10:56 +01:00
|
|
|
thumbnailPreference: '',
|
2020-09-16 15:51:26 +02:00
|
|
|
invidiousInstance: 'https://invidious.snopyta.org',
|
2020-08-24 04:56:33 +02:00
|
|
|
defaultProfile: 'allChannels',
|
2020-03-01 04:37:02 +01:00
|
|
|
barColor: false,
|
2020-06-19 21:46:01 +02:00
|
|
|
enableSearchSuggestions: true,
|
2020-03-01 04:37:02 +01:00
|
|
|
rememberHistory: true,
|
2020-08-22 22:51:04 +02:00
|
|
|
saveWatchedProgress: true,
|
2020-03-01 04:37:02 +01:00
|
|
|
autoplayVideos: true,
|
|
|
|
autoplayPlaylists: true,
|
2020-02-27 04:10:56 +01:00
|
|
|
playNextVideo: false,
|
2020-03-01 04:37:02 +01:00
|
|
|
enableSubtitles: true,
|
2020-10-01 02:49:43 +02:00
|
|
|
forceLocalBackendForLegacy: false,
|
2020-03-01 04:37:02 +01:00
|
|
|
proxyVideos: false,
|
2020-04-22 04:59:09 +02:00
|
|
|
defaultTheatreMode: false,
|
2020-03-01 04:37:02 +01:00
|
|
|
defaultVolume: 1,
|
|
|
|
defaultPlayback: 1,
|
|
|
|
defaultVideoFormat: 'dash',
|
2020-05-28 04:48:41 +02:00
|
|
|
defaultQuality: '720',
|
2021-01-14 19:51:33 +01:00
|
|
|
useProxy: false,
|
|
|
|
proxyProtocol: 'socks5',
|
|
|
|
proxyHostname: '127.0.0.1',
|
|
|
|
proxyPort: '9050',
|
2020-02-16 19:30:00 +01:00
|
|
|
debugMode: false,
|
2020-10-07 15:57:22 +02:00
|
|
|
disableSmoothScrolling: false,
|
2020-02-16 19:30:00 +01:00
|
|
|
hideWatchedSubs: false,
|
2020-09-02 05:20:21 +02:00
|
|
|
useRssFeeds: false,
|
2020-10-06 04:27:32 +02:00
|
|
|
usingElectron: true,
|
|
|
|
hideVideoViews: false,
|
|
|
|
hideVideoLikesAndDislikes: false,
|
|
|
|
hideChannelSubscriptions: false,
|
|
|
|
hideCommentLikes: false,
|
|
|
|
hideRecommendedVideos: false,
|
|
|
|
hideTrendingVideos: false,
|
|
|
|
hidePopularVideos: false,
|
2021-03-06 17:21:22 +01:00
|
|
|
hidePlaylists: false,
|
2021-01-10 04:11:42 +01:00
|
|
|
hideLiveChat: false,
|
|
|
|
hideActiveSubscriptions: false
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const getters = {
|
2020-02-27 04:10:56 +01:00
|
|
|
getBackendFallback: () => {
|
|
|
|
return state.backendFallback
|
|
|
|
},
|
|
|
|
|
|
|
|
getCheckForUpdates: () => {
|
|
|
|
return state.checkForUpdates
|
|
|
|
},
|
|
|
|
|
2020-09-20 20:22:39 +02:00
|
|
|
getCheckForBlogPosts: () => {
|
|
|
|
return state.checkForBlogPosts
|
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
getBarColor: () => {
|
|
|
|
return state.barColor
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
|
2020-10-06 17:53:54 +02:00
|
|
|
getUiScale: () => {
|
|
|
|
return state.uiScale
|
|
|
|
},
|
|
|
|
|
2020-06-19 21:46:01 +02:00
|
|
|
getEnableSearchSuggestions: () => {
|
|
|
|
return state.enableSearchSuggestions
|
|
|
|
},
|
|
|
|
|
2020-02-16 19:30:00 +01:00
|
|
|
getBackendPreference: () => {
|
|
|
|
return state.backendPreference
|
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
getLandingPage: () => {
|
|
|
|
return state.landingPage
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
getRegion: () => {
|
|
|
|
return state.region
|
|
|
|
},
|
|
|
|
|
|
|
|
getListType: () => {
|
|
|
|
return state.listType
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
getThumbnailPreference: () => {
|
|
|
|
return state.thumbnailPreference
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
getInvidiousInstance: () => {
|
|
|
|
return state.invidiousInstance
|
2020-02-18 21:59:01 +01:00
|
|
|
},
|
|
|
|
|
2020-08-24 04:56:33 +02:00
|
|
|
getDefaultProfile: () => {
|
|
|
|
return state.defaultProfile
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
getRememberHistory: () => {
|
|
|
|
return state.rememberHistory
|
|
|
|
},
|
|
|
|
|
2020-08-22 22:51:04 +02:00
|
|
|
getSaveWatchedProgress: () => {
|
|
|
|
return state.saveWatchedProgress
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
getAutoplayVideos: () => {
|
|
|
|
return state.autoplayVideos
|
|
|
|
},
|
|
|
|
|
|
|
|
getAutoplayPlaylists: () => {
|
|
|
|
return state.autoplayPlaylists
|
|
|
|
},
|
|
|
|
|
|
|
|
getPlayNextVideo: () => {
|
|
|
|
return state.playNextVideo
|
|
|
|
},
|
|
|
|
|
|
|
|
getEnableSubtitles: () => {
|
|
|
|
return state.enableSubtitles
|
|
|
|
},
|
|
|
|
|
|
|
|
getForceLocalBackendForLegacy: () => {
|
|
|
|
return state.forceLocalBackendForLegacy
|
|
|
|
},
|
|
|
|
|
|
|
|
getProxyVideos: () => {
|
|
|
|
return state.proxyVideos
|
|
|
|
},
|
|
|
|
|
2021-01-14 19:51:33 +01:00
|
|
|
getUseProxy: () => {
|
|
|
|
return state.useProxy
|
|
|
|
},
|
|
|
|
|
|
|
|
getProxyProtocol: () => {
|
|
|
|
return state.proxyProtocol
|
|
|
|
},
|
|
|
|
|
|
|
|
getProxyHostname: () => {
|
|
|
|
return state.proxyHostname
|
|
|
|
},
|
|
|
|
|
|
|
|
getProxyPort: () => {
|
|
|
|
return state.proxyPort
|
|
|
|
},
|
|
|
|
|
2020-04-22 04:59:09 +02:00
|
|
|
getDefaultTheatreMode: () => {
|
|
|
|
return state.defaultTheatreMode
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
getDefaultVolume: () => {
|
|
|
|
return state.defaultVolume
|
|
|
|
},
|
|
|
|
|
|
|
|
getDefaultPlayback: () => {
|
|
|
|
return state.defaultPlayback
|
2020-02-20 21:58:21 +01:00
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
getDefaultVideoFormat: () => {
|
|
|
|
return state.defaultVideoFormat
|
|
|
|
},
|
|
|
|
|
|
|
|
getDefaultQuality: () => {
|
|
|
|
return state.defaultQuality
|
2020-04-18 05:17:45 +02:00
|
|
|
},
|
|
|
|
|
2020-09-02 05:20:21 +02:00
|
|
|
getHideWatchedSubs: () => {
|
|
|
|
return state.hideWatchedSubs
|
|
|
|
},
|
|
|
|
|
|
|
|
getUseRssFeeds: () => {
|
|
|
|
return state.useRssFeeds
|
|
|
|
},
|
|
|
|
|
2020-04-18 05:17:45 +02:00
|
|
|
getUsingElectron: () => {
|
|
|
|
return state.usingElectron
|
2020-10-06 04:27:32 +02:00
|
|
|
},
|
|
|
|
|
2020-10-07 15:57:22 +02:00
|
|
|
getDisableSmoothScrolling: () => {
|
|
|
|
return state.disableSmoothScrolling
|
|
|
|
},
|
|
|
|
|
2020-10-06 04:27:32 +02:00
|
|
|
getHideVideoViews: () => {
|
|
|
|
return state.hideVideoViews
|
|
|
|
},
|
|
|
|
|
|
|
|
getHideVideoLikesAndDislikes: () => {
|
|
|
|
return state.hideVideoLikesAndDislikes
|
|
|
|
},
|
|
|
|
|
|
|
|
getHideChannelSubscriptions: () => {
|
|
|
|
return state.hideChannelSubscriptions
|
|
|
|
},
|
|
|
|
|
|
|
|
getHideCommentLikes: () => {
|
|
|
|
return state.hideCommentLikes
|
|
|
|
},
|
|
|
|
|
|
|
|
getHideRecommendedVideos: () => {
|
|
|
|
return state.hideRecommendedVideos
|
|
|
|
},
|
|
|
|
|
|
|
|
getHideTrendingVideos: () => {
|
|
|
|
return state.hideTrendingVideos
|
|
|
|
},
|
|
|
|
|
|
|
|
getHidePopularVideos: () => {
|
|
|
|
return state.hidePopularVideos
|
|
|
|
},
|
2021-03-06 17:21:22 +01:00
|
|
|
|
|
|
|
getHidePlaylists: () => {
|
|
|
|
return state.hidePlaylists
|
|
|
|
},
|
|
|
|
|
2020-10-06 04:27:32 +02:00
|
|
|
getHideLiveChat: () => {
|
|
|
|
return state.hideLiveChat
|
2021-01-10 04:11:42 +01:00
|
|
|
},
|
2021-03-06 17:21:22 +01:00
|
|
|
|
2021-01-10 04:11:42 +01:00
|
|
|
getHideActiveSubscriptions: () => {
|
|
|
|
return state.hideActiveSubscriptions
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const actions = {
|
2020-09-02 05:20:21 +02:00
|
|
|
grabUserSettings ({ dispatch, commit, rootState }) {
|
2020-02-27 04:10:56 +01:00
|
|
|
settingsDb.find({}, (err, results) => {
|
|
|
|
if (!err) {
|
2020-03-01 04:37:02 +01:00
|
|
|
console.log(results)
|
2020-02-27 04:10:56 +01:00
|
|
|
results.forEach((result) => {
|
|
|
|
switch (result._id) {
|
2020-05-28 04:48:41 +02:00
|
|
|
case 'invidiousInstance':
|
2020-06-02 04:42:29 +02:00
|
|
|
if (result.value === '') {
|
2020-09-16 15:51:26 +02:00
|
|
|
dispatch('updateInvidiousInstance', 'https://invidious.snopyta.org')
|
2020-06-02 04:42:29 +02:00
|
|
|
} else {
|
|
|
|
commit('setInvidiousInstance', result.value)
|
|
|
|
}
|
2020-05-28 04:48:41 +02:00
|
|
|
break
|
2020-02-27 04:10:56 +01:00
|
|
|
case 'backendFallback':
|
|
|
|
commit('setBackendFallback', result.value)
|
|
|
|
break
|
2020-08-24 04:56:33 +02:00
|
|
|
case 'defaultProfile':
|
|
|
|
commit('setDefaultProfile', result.value)
|
|
|
|
break
|
2020-02-27 04:10:56 +01:00
|
|
|
case 'checkForUpdates':
|
|
|
|
commit('setCheckForUpdates', result.value)
|
|
|
|
break
|
2020-09-20 20:22:39 +02:00
|
|
|
case 'checkForBlogPosts':
|
|
|
|
commit('setCheckForBlogPosts', result.value)
|
|
|
|
break
|
2020-06-19 21:46:01 +02:00
|
|
|
case 'enableSearchSuggestions':
|
|
|
|
commit('setEnableSearchSuggestions', result.value)
|
|
|
|
break
|
2020-02-27 04:10:56 +01:00
|
|
|
case 'backendPreference':
|
|
|
|
commit('setBackendPreference', result.value)
|
|
|
|
break
|
|
|
|
case 'landingPage':
|
|
|
|
commit('setLandingPage', result.value)
|
|
|
|
break
|
|
|
|
case 'region':
|
|
|
|
commit('setRegion', result.value)
|
|
|
|
break
|
|
|
|
case 'listType':
|
|
|
|
commit('setListType', result.value)
|
|
|
|
break
|
|
|
|
case 'thumbnailPreference':
|
|
|
|
commit('setThumbnailPreference', result.value)
|
|
|
|
break
|
2020-03-01 04:37:02 +01:00
|
|
|
case 'barColor':
|
|
|
|
commit('setBarColor', result.value)
|
|
|
|
break
|
2020-10-06 17:53:54 +02:00
|
|
|
case 'uiScale':
|
|
|
|
webframe.setZoomFactor(parseInt(result.value) / 100)
|
|
|
|
commit('setUiScale', result.value)
|
|
|
|
break
|
2020-10-07 15:57:22 +02:00
|
|
|
case 'disableSmoothScrolling':
|
|
|
|
commit('setDisableSmoothScrolling', result.value)
|
|
|
|
break
|
2020-09-02 05:20:21 +02:00
|
|
|
case 'hideWatchedSubs':
|
|
|
|
commit('setHideWatchedSubs', result.value)
|
|
|
|
break
|
|
|
|
case 'useRssFeeds':
|
|
|
|
commit('setUseRssFeeds', result.value)
|
|
|
|
break
|
2020-03-01 04:37:02 +01:00
|
|
|
case 'rememberHistory':
|
|
|
|
commit('setRememberHistory', result.value)
|
|
|
|
break
|
2020-08-22 22:51:04 +02:00
|
|
|
case 'saveWatchedProgress':
|
|
|
|
commit('setSaveWatchedProgress', result.value)
|
|
|
|
break
|
2020-03-01 04:37:02 +01:00
|
|
|
case 'autoplayVideos':
|
|
|
|
commit('setAutoplayVideos', result.value)
|
|
|
|
break
|
|
|
|
case 'autoplayPlaylists':
|
|
|
|
commit('setAutoplayPlaylists', result.value)
|
|
|
|
break
|
|
|
|
case 'playNextVideo':
|
|
|
|
commit('setPlayNextVideo', result.value)
|
|
|
|
break
|
|
|
|
case 'enableSubtitles':
|
|
|
|
commit('setEnableSubtitles', result.value)
|
|
|
|
break
|
|
|
|
case 'forceLocalBackendForLegacy':
|
|
|
|
commit('setForceLocalBackendForLegacy', result.value)
|
|
|
|
break
|
|
|
|
case 'proxyVideos':
|
|
|
|
commit('setProxyVideos', result.value)
|
|
|
|
break
|
2021-01-14 19:51:33 +01:00
|
|
|
case 'useProxy':
|
|
|
|
commit('setUseProxy', result.value)
|
|
|
|
break
|
|
|
|
case 'proxyProtocol':
|
|
|
|
commit('setProxyProtocol', result.value)
|
|
|
|
break
|
|
|
|
case 'proxyHostname':
|
|
|
|
commit('setProxyHostname', result.value)
|
|
|
|
break
|
|
|
|
case 'proxyPort':
|
|
|
|
commit('setProxyPort', result.value)
|
|
|
|
break
|
2020-04-22 04:59:09 +02:00
|
|
|
case 'defaultTheatreMode':
|
|
|
|
commit('setDefaultTheatreMode', result.value)
|
|
|
|
break
|
2020-03-01 04:37:02 +01:00
|
|
|
case 'defaultVolume':
|
|
|
|
commit('setDefaultVolume', result.value)
|
|
|
|
sessionStorage.setItem('volume', result.value)
|
|
|
|
break
|
|
|
|
case 'defaultPlayback':
|
|
|
|
commit('setDefaultPlayback', result.value)
|
|
|
|
break
|
|
|
|
case 'defaultVideoFormat':
|
|
|
|
commit('setDefaultVideoFormat', result.value)
|
|
|
|
break
|
|
|
|
case 'defaultQuality':
|
|
|
|
commit('setDefaultQuality', result.value)
|
|
|
|
break
|
2020-10-06 04:27:32 +02:00
|
|
|
case 'hideVideoViews':
|
|
|
|
commit('setHideVideoViews', result.value)
|
|
|
|
break
|
|
|
|
case 'hideVideoLikesAndDislikes':
|
|
|
|
commit('setHideVideoLikesAndDislikes', result.value)
|
|
|
|
break
|
|
|
|
case 'hideChannelSubscriptions':
|
|
|
|
commit('setHideChannelSubscriptions', result.value)
|
|
|
|
break
|
|
|
|
case 'hideCommentLikes':
|
|
|
|
commit('setHideCommentLikes', result.value)
|
|
|
|
break
|
|
|
|
case 'hideRecommendedVideos':
|
|
|
|
commit('setHideRecommendedVideos', result.value)
|
|
|
|
break
|
|
|
|
case 'hideTrendingVideos':
|
|
|
|
commit('setHideTrendingVideos', result.value)
|
|
|
|
break
|
|
|
|
case 'hidePopularVideos':
|
|
|
|
commit('setHidePopularVideos', result.value)
|
|
|
|
break
|
2021-03-06 17:21:22 +01:00
|
|
|
case 'hidePlaylists':
|
|
|
|
commit('setHidePlaylists', result.value)
|
|
|
|
break
|
2020-10-06 04:27:32 +02:00
|
|
|
case 'hideLiveChat':
|
|
|
|
commit('setHideLiveChat', result.value)
|
|
|
|
break
|
2021-01-10 04:11:42 +01:00
|
|
|
case 'hideActiveSubscriptions':
|
|
|
|
commit('setHideActiveSubscriptions', result.value)
|
|
|
|
break
|
2020-02-27 04:10:56 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-05-28 04:48:41 +02:00
|
|
|
updateInvidiousInstance ({ commit }, invidiousInstance) {
|
|
|
|
console.log(invidiousInstance)
|
|
|
|
settingsDb.update({ _id: 'invidiousInstance' }, { _id: 'invidiousInstance', value: invidiousInstance }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setInvidiousInstance', invidiousInstance)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-08-24 04:56:33 +02:00
|
|
|
updateDefaultProfile ({ commit }, defaultProfile) {
|
|
|
|
settingsDb.update({ _id: 'defaultProfile' }, { _id: 'defaultProfile', value: defaultProfile }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultProfile', defaultProfile)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
updateBackendFallback ({ commit }, backendFallback) {
|
|
|
|
settingsDb.update({ _id: 'backendFallback' }, { _id: 'backendFallback', value: backendFallback }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setBackendFallback', backendFallback)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateCheckForUpdates ({ commit }, checkForUpdates) {
|
|
|
|
settingsDb.update({ _id: 'checkForUpdates' }, { _id: 'checkForUpdates', value: checkForUpdates }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setCheckForUpdates', checkForUpdates)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-09-20 20:22:39 +02:00
|
|
|
updateCheckForBlogPosts ({ commit }, checkForBlogPosts) {
|
|
|
|
settingsDb.update({ _id: 'checkForBlogPosts' }, { _id: 'checkForBlogPosts', value: checkForBlogPosts }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setCheckForBlogPosts', checkForBlogPosts)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-06-19 21:46:01 +02:00
|
|
|
updateEnableSearchSuggestions ({ commit }, enableSearchSuggestions) {
|
|
|
|
settingsDb.update({ _id: 'enableSearchSuggestions' }, { _id: 'enableSearchSuggestions', value: enableSearchSuggestions }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setEnableSearchSuggestions', enableSearchSuggestions)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-02-27 04:10:56 +01:00
|
|
|
updateBackendPreference ({ commit }, backendPreference) {
|
|
|
|
settingsDb.update({ _id: 'backendPreference' }, { _id: 'backendPreference', value: backendPreference }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setBackendPreference', backendPreference)
|
|
|
|
}
|
|
|
|
})
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
|
|
|
|
updateLandingPage ({ commit }, landingPage) {
|
|
|
|
settingsDb.update({ _id: 'landingPage' }, { _id: 'landingPage', value: landingPage }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setLandingPage', landingPage)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateRegion ({ commit }, region) {
|
|
|
|
settingsDb.update({ _id: 'region' }, { _id: 'region', value: region }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setRegion', region)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateListType ({ commit }, listType) {
|
|
|
|
settingsDb.update({ _id: 'listType' }, { _id: 'listType', value: listType }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setListType', listType)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateThumbnailPreference ({ commit }, thumbnailPreference) {
|
|
|
|
settingsDb.update({ _id: 'thumbnailPreference' }, { _id: 'thumbnailPreference', value: thumbnailPreference }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setThumbnailPreference', thumbnailPreference)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
updateBarColor ({ commit }, barColor) {
|
|
|
|
settingsDb.update({ _id: 'barColor' }, { _id: 'barColor', value: barColor }, { upsert: true }, (err, numReplaced) => {
|
2020-02-16 19:30:00 +01:00
|
|
|
if (!err) {
|
2020-03-01 04:37:02 +01:00
|
|
|
commit('setBarColor', barColor)
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
|
2020-10-06 17:53:54 +02:00
|
|
|
updateUiScale ({ commit }, uiScale) {
|
|
|
|
settingsDb.update({ _id: 'uiScale' }, { _id: 'uiScale', value: uiScale }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setUiScale', uiScale)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-09-02 05:20:21 +02:00
|
|
|
updateHideWatchedSubs ({ commit }, hideWatchedSubs) {
|
|
|
|
settingsDb.update({ _id: 'hideWatchedSubs' }, { _id: 'hideWatchedSubs', value: hideWatchedSubs }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideWatchedSubs', hideWatchedSubs)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateUseRssFeeds ({ commit }, useRssFeeds) {
|
|
|
|
settingsDb.update({ _id: 'useRssFeeds' }, { _id: 'useRssFeeds', value: useRssFeeds }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setUseRssFeeds', useRssFeeds)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
updateRememberHistory ({ commit }, history) {
|
|
|
|
settingsDb.update({ _id: 'rememberHistory' }, { _id: 'rememberHistory', value: history }, { upsert: true }, (err, numReplaced) => {
|
2020-02-16 19:30:00 +01:00
|
|
|
if (!err) {
|
2020-03-01 04:37:02 +01:00
|
|
|
commit('setRememberHistory', history)
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
|
2020-08-22 22:51:04 +02:00
|
|
|
updateSaveWatchedProgress ({ commit }, saveWatchedProgress) {
|
|
|
|
settingsDb.update({ _id: 'saveWatchedProgress' }, { _id: 'saveWatchedProgress', value: saveWatchedProgress }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setSaveWatchedProgress', saveWatchedProgress)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
updateAutoplayVideos ({ commit }, autoplayVideos) {
|
|
|
|
settingsDb.update({ _id: 'autoplayVideos' }, { _id: 'autoplayVideos', value: autoplayVideos }, { upsert: true }, (err, numReplaced) => {
|
2020-02-16 19:30:00 +01:00
|
|
|
if (!err) {
|
2020-03-01 04:37:02 +01:00
|
|
|
commit('setAutoplayVideos', autoplayVideos)
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
updateAutoplayPlaylists ({ commit }, autoplayPlaylists) {
|
|
|
|
settingsDb.update({ _id: 'autoplayPlaylists' }, { _id: 'autoplayPlaylists', value: autoplayPlaylists }, { upsert: true }, (err, numReplaced) => {
|
2020-02-16 19:30:00 +01:00
|
|
|
if (!err) {
|
|
|
|
commit('setAutoplayPlaylists', autoplayPlaylists)
|
|
|
|
}
|
|
|
|
})
|
2020-03-01 04:37:02 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
updatePlayNextVideo ({ commit }, playNextVideo) {
|
|
|
|
settingsDb.update({ _id: 'playNextVideo' }, { _id: 'playNextVideo', value: playNextVideo }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setPlayNextVideo', playNextVideo)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateEnableSubtitles ({ commit }, enableSubtitles) {
|
|
|
|
settingsDb.update({ _id: 'enableSubtitles' }, { _id: 'enableSubtitles', value: enableSubtitles }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setEnableSubtitles', enableSubtitles)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateForceLocalBackendForLegacy ({ commit }, forceLocalBackendForLegacy) {
|
|
|
|
settingsDb.update({ _id: 'forceLocalBackendForLegacy' }, { _id: 'forceLocalBackendForLegacy', value: forceLocalBackendForLegacy }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setForceLocalBackendForLegacy', forceLocalBackendForLegacy)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateProxyVideos ({ commit }, proxyVideos) {
|
|
|
|
settingsDb.update({ _id: 'proxyVideos' }, { _id: 'proxyVideos', value: proxyVideos }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setProxyVideos', proxyVideos)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-04-22 04:59:09 +02:00
|
|
|
updateDefaultTheatreMode ({ commit }, defaultTheatreMode) {
|
|
|
|
settingsDb.update({ _id: 'defaultTheatreMode' }, { _id: 'defaultTheatreMode', value: defaultTheatreMode }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultTheatreMode', defaultTheatreMode)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-03-01 04:37:02 +01:00
|
|
|
updateDefaultVolume ({ commit }, defaultVolume) {
|
|
|
|
settingsDb.update({ _id: 'defaultVolume' }, { _id: 'defaultVolume', value: defaultVolume }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultVolume', defaultVolume)
|
|
|
|
sessionStorage.setItem('volume', defaultVolume)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateDefaultPlayback ({ commit }, defaultPlayback) {
|
|
|
|
settingsDb.update({ _id: 'defaultPlayback' }, { _id: 'defaultPlayback', value: defaultPlayback }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultPlayback', defaultPlayback)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateDefaultVideoFormat ({ commit }, defaultVideoFormat) {
|
|
|
|
settingsDb.update({ _id: 'defaultVideoFormat' }, { _id: 'defaultVideoFormat', value: defaultVideoFormat }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultVideoFormat', defaultVideoFormat)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateDefaultQuality ({ commit }, defaultQuality) {
|
|
|
|
settingsDb.update({ _id: 'defaultQuality' }, { _id: 'defaultQuality', value: defaultQuality }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDefaultQuality', defaultQuality)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2021-01-14 19:51:33 +01:00
|
|
|
updateUseProxy ({ commit }, useProxy) {
|
|
|
|
settingsDb.update({ _id: 'useProxy' }, { _id: 'useProxy', value: useProxy }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setUseProxy', useProxy)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateProxyProtocol ({ commit }, proxyProtocol) {
|
|
|
|
settingsDb.update({ _id: 'proxyProtocol' }, { _id: 'proxyProtocol', value: proxyProtocol }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setProxyProtocol', proxyProtocol)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateProxyHostname ({ commit }, proxyHostname) {
|
|
|
|
settingsDb.update({ _id: 'proxyHostname' }, { _id: 'proxyHostname', value: proxyHostname }, { upsert: true }, (err, numReplaced) => {
|
2020-03-01 04:37:02 +01:00
|
|
|
if (!err) {
|
2021-01-14 19:51:33 +01:00
|
|
|
commit('setProxyHostname', proxyHostname)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateProxyPort ({ commit }, proxyPort) {
|
|
|
|
settingsDb.update({ _id: 'proxyPort' }, { _id: 'proxyPort', value: proxyPort }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setProxyPort', proxyPort)
|
2020-03-01 04:37:02 +01:00
|
|
|
}
|
|
|
|
})
|
2020-10-06 04:27:32 +02:00
|
|
|
},
|
|
|
|
|
2020-10-07 15:57:22 +02:00
|
|
|
updateDisableSmoothScrolling ({ commit }, disableSmoothScrolling) {
|
|
|
|
settingsDb.update({ _id: 'disableSmoothScrolling' }, { _id: 'disableSmoothScrolling', value: disableSmoothScrolling }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setDisableSmoothScrolling', disableSmoothScrolling)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-10-06 04:27:32 +02:00
|
|
|
updateHideVideoViews ({ commit }, hideVideoViews) {
|
|
|
|
settingsDb.update({ _id: 'hideVideoViews' }, { _id: 'hideVideoViews', value: hideVideoViews }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideVideoViews', hideVideoViews)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHideVideoLikesAndDislikes ({ commit }, hideVideoLikesAndDislikes) {
|
|
|
|
settingsDb.update({ _id: 'hideVideoLikesAndDislikes' }, { _id: 'hideVideoLikesAndDislikes', value: hideVideoLikesAndDislikes }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideVideoLikesAndDislikes', hideVideoLikesAndDislikes)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHideChannelSubscriptions ({ commit }, hideChannelSubscriptions) {
|
|
|
|
settingsDb.update({ _id: 'hideChannelSubscriptions' }, { _id: 'hideChannelSubscriptions', value: hideChannelSubscriptions }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideChannelSubscriptions', hideChannelSubscriptions)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHideCommentLikes ({ commit }, hideCommentLikes) {
|
|
|
|
settingsDb.update({ _id: 'hideCommentLikes' }, { _id: 'hideCommentLikes', value: hideCommentLikes }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideCommentLikes', hideCommentLikes)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHideRecommendedVideos ({ commit }, hideRecommendedVideos) {
|
|
|
|
settingsDb.update({ _id: 'hideRecommendedVideos' }, { _id: 'hideRecommendedVideos', value: hideRecommendedVideos }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideRecommendedVideos', hideRecommendedVideos)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHideTrendingVideos ({ commit }, hideTrendingVideos) {
|
|
|
|
settingsDb.update({ _id: 'hideTrendingVideos' }, { _id: 'hideTrendingVideos', value: hideTrendingVideos }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideTrendingVideos', hideTrendingVideos)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
updateHidePopularVideos ({ commit }, hidePopularVideos) {
|
|
|
|
settingsDb.update({ _id: 'hidePopularVideos' }, { _id: 'hidePopularVideos', value: hidePopularVideos }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHidePopularVideos', hidePopularVideos)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2021-03-06 17:21:22 +01:00
|
|
|
updateHidePlaylists ({ commit }, hidePlaylists) {
|
|
|
|
settingsDb.update({ _id: 'hidePlaylists' }, { _id: 'hidePlaylists', value: hidePlaylists }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHidePlaylists', hidePlaylists)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2021-01-10 04:11:42 +01:00
|
|
|
updateHideActiveSubscriptions ({ commit }, hideActiveSubscriptions) {
|
|
|
|
settingsDb.update({ _id: 'hideActiveSubscriptions' }, { _id: 'hideActiveSubscriptions', value: hideActiveSubscriptions }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideActiveSubscriptions', hideActiveSubscriptions)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2020-10-06 04:27:32 +02:00
|
|
|
updateHideLiveChat ({ commit }, hideLiveChat) {
|
|
|
|
settingsDb.update({ _id: 'hideLiveChat' }, { _id: 'hideLiveChat', value: hideLiveChat }, { upsert: true }, (err, numReplaced) => {
|
|
|
|
if (!err) {
|
|
|
|
commit('setHideLiveChat', hideLiveChat)
|
|
|
|
}
|
|
|
|
})
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const mutations = {
|
2020-05-28 04:48:41 +02:00
|
|
|
setInvidiousInstance (state, invidiousInstance) {
|
|
|
|
state.invidiousInstance = invidiousInstance
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
setCurrentTheme (state, currentTheme) {
|
|
|
|
state.barColor = currentTheme
|
|
|
|
},
|
2020-08-24 04:56:33 +02:00
|
|
|
setDefaultProfile (state, defaultProfile) {
|
|
|
|
state.defaultProfile = defaultProfile
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
setBackendFallback (state, backendFallback) {
|
|
|
|
state.backendFallback = backendFallback
|
|
|
|
},
|
|
|
|
setCheckForUpdates (state, checkForUpdates) {
|
|
|
|
state.checkForUpdates = checkForUpdates
|
|
|
|
},
|
2020-09-20 20:22:39 +02:00
|
|
|
setCheckForBlogPosts (state, checkForBlogPosts) {
|
|
|
|
state.checkForBlogPosts = checkForBlogPosts
|
|
|
|
},
|
2020-02-27 04:10:56 +01:00
|
|
|
setBackendPreference (state, backendPreference) {
|
|
|
|
state.backendPreference = backendPreference
|
|
|
|
},
|
|
|
|
setLandingPage (state, defaultLandingPage) {
|
|
|
|
state.defaultLandingPage = defaultLandingPage
|
|
|
|
},
|
|
|
|
setRegion (state, region) {
|
|
|
|
state.region = region
|
|
|
|
},
|
|
|
|
setListType (state, listType) {
|
|
|
|
state.listType = listType
|
|
|
|
},
|
|
|
|
setThumbnailPreference (state, thumbnailPreference) {
|
|
|
|
state.thumbnailPreference = thumbnailPreference
|
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setBarColor (state, barColor) {
|
|
|
|
state.barColor = barColor
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-10-06 17:53:54 +02:00
|
|
|
setUiScale (state, uiScale) {
|
|
|
|
state.uiScale = uiScale
|
|
|
|
},
|
2020-06-19 21:46:01 +02:00
|
|
|
setEnableSearchSuggestions (state, enableSearchSuggestions) {
|
|
|
|
state.enableSearchSuggestions = enableSearchSuggestions
|
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setRememberHistory (state, rememberHistory) {
|
|
|
|
state.rememberHistory = rememberHistory
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-08-22 22:51:04 +02:00
|
|
|
setSaveWatchedProgress (state, saveWatchedProgress) {
|
|
|
|
state.saveWatchedProgress = saveWatchedProgress
|
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setAutoplayVideos (state, autoplayVideos) {
|
|
|
|
state.autoplayVideos = autoplayVideos
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
setAutoplayPlaylists (state, autoplayPlaylists) {
|
|
|
|
state.autoplayPlaylists = autoplayPlaylists
|
|
|
|
},
|
|
|
|
setPlayNextVideo (state, playNextVideo) {
|
|
|
|
state.playNextVideo = playNextVideo
|
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setEnableSubtitles (state, enableSubtitles) {
|
|
|
|
state.enableSubtitles = enableSubtitles
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setForceLocalBackendForLegacy (state, forceLocalBackendForLegacy) {
|
|
|
|
state.forceLocalBackendForLegacy = forceLocalBackendForLegacy
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setProxyVideos (state, proxyVideos) {
|
|
|
|
state.proxyVideos = proxyVideos
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setDefaultVolume (state, defaultVolume) {
|
|
|
|
state.defaultVolume = defaultVolume
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setDefaultPlayback (state, defaultPlayback) {
|
|
|
|
state.defaultPlayback = defaultPlayback
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setDefaultVideoFormat (state, defaultVideoFormat) {
|
|
|
|
state.defaultVideoFormat = defaultVideoFormat
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
2020-03-01 04:37:02 +01:00
|
|
|
setDefaultQuality (state, defaultQuality) {
|
|
|
|
state.defaultQuality = defaultQuality
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
setProxy (state, proxy) {
|
|
|
|
state.proxy = proxy
|
|
|
|
},
|
2020-04-22 04:59:09 +02:00
|
|
|
setDefaultTheatreMode (state, defaultTheatreMode) {
|
|
|
|
state.defaultTheatreMode = defaultTheatreMode
|
|
|
|
},
|
2021-01-14 19:51:33 +01:00
|
|
|
setUseProxy (state, useProxy) {
|
|
|
|
state.useProxy = useProxy
|
|
|
|
},
|
|
|
|
setProxyProtocol (state, proxyProtocol) {
|
|
|
|
state.proxyProtocol = proxyProtocol
|
|
|
|
},
|
|
|
|
setProxyHostname (state, proxyHostname) {
|
|
|
|
state.proxyHostname = proxyHostname
|
|
|
|
},
|
|
|
|
setProxyPort (state, proxyPort) {
|
|
|
|
state.proxyPort = proxyPort
|
2020-02-16 19:30:00 +01:00
|
|
|
},
|
|
|
|
setDebugMode (state, debugMode) {
|
|
|
|
state.debugMode = debugMode
|
|
|
|
},
|
|
|
|
setHideWatchedSubs (state, hideWatchedSubs) {
|
|
|
|
state.hideWatchedSubs = hideWatchedSubs
|
|
|
|
},
|
2020-09-02 05:20:21 +02:00
|
|
|
setUseRssFeeds (state, useRssFeeds) {
|
|
|
|
state.useRssFeeds = useRssFeeds
|
|
|
|
},
|
2020-04-18 05:17:45 +02:00
|
|
|
setUsingElectron (state, usingElectron) {
|
|
|
|
state.usingElectron = usingElectron
|
|
|
|
},
|
2020-10-07 15:57:22 +02:00
|
|
|
setDisableSmoothScrolling (state, disableSmoothScrolling) {
|
|
|
|
state.disableSmoothScrolling = disableSmoothScrolling
|
|
|
|
},
|
2020-02-16 19:30:00 +01:00
|
|
|
setVideoView (state, videoView) {
|
|
|
|
state.videoView = videoView
|
|
|
|
},
|
|
|
|
setProfileList (state, profileList) {
|
|
|
|
state.profileList = profileList
|
2020-10-06 04:27:32 +02:00
|
|
|
},
|
|
|
|
setHideVideoViews (state, hideVideoViews) {
|
|
|
|
state.hideVideoViews = hideVideoViews
|
|
|
|
},
|
|
|
|
setHideVideoLikesAndDislikes (state, hideVideoLikesAndDislikes) {
|
|
|
|
state.hideVideoLikesAndDislikes = hideVideoLikesAndDislikes
|
|
|
|
},
|
|
|
|
setHideChannelSubscriptions (state, hideChannelSubscriptions) {
|
|
|
|
state.hideChannelSubscriptions = hideChannelSubscriptions
|
|
|
|
},
|
|
|
|
setHideCommentLikes (state, hideCommentLikes) {
|
|
|
|
state.hideCommentLikes = hideCommentLikes
|
|
|
|
},
|
|
|
|
setHideRecommendedVideos (state, hideRecommendedVideos) {
|
|
|
|
state.hideRecommendedVideos = hideRecommendedVideos
|
|
|
|
},
|
|
|
|
setHideTrendingVideos (state, hideTrendingVideos) {
|
|
|
|
state.hideTrendingVideos = hideTrendingVideos
|
|
|
|
},
|
|
|
|
setHidePopularVideos (state, hidePopularVideos) {
|
|
|
|
state.hidePopularVideos = hidePopularVideos
|
|
|
|
},
|
2021-03-06 17:21:22 +01:00
|
|
|
setHidePlaylists (state, hidePlaylists) {
|
|
|
|
state.hidePlaylists = hidePlaylists
|
|
|
|
},
|
2020-10-06 04:27:32 +02:00
|
|
|
setHideLiveChat (state, hideLiveChat) {
|
|
|
|
state.hideLiveChat = hideLiveChat
|
2021-01-10 04:11:42 +01:00
|
|
|
},
|
|
|
|
setHideActiveSubscriptions (state, hideActiveSubscriptions) {
|
|
|
|
state.hideActiveSubscriptions = hideActiveSubscriptions
|
2020-02-16 19:30:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
state,
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations
|
|
|
|
}
|