Verify check

This commit is contained in:
Luca 2021-03-26 19:30:44 +01:00
parent 24af7a8631
commit 4e11233f3e
4 changed files with 156 additions and 149 deletions

View File

@ -85,7 +85,8 @@ export default Vue.extend({
} }
}, },
mounted: function () { mounted: function () {
this.$store.dispatch('grabUserSettings').then(() => { this.$store.dispatch('grabUserSettings').then((result) => {
console.log('AFTER GRABBING', result)
this.$store.dispatch('grabHistory') this.$store.dispatch('grabHistory')
this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels'))
this.$store.dispatch('grabAllPlaylists') this.$store.dispatch('grabAllPlaylists')

View File

@ -27,7 +27,7 @@ const profileDb = new Datastore({
const state = { const state = {
profileList: [{ profileList: [{
_id: 'allChannels', _id: 'allChannels',
name: 'Brudi Channels', name: 'All Channels',
bgColor: '#000000', bgColor: '#000000',
textColor: '#FFFFFF', textColor: '#FFFFFF',
subscriptions: [] subscriptions: []

View File

@ -264,6 +264,7 @@ const getters = {
const actions = { const actions = {
grabUserSettings ({ dispatch, commit, rootState }) { grabUserSettings ({ dispatch, commit, rootState }) {
return new Promise((resolve, reject) => {
settingsDb.find({}, (err, results) => { settingsDb.find({}, (err, results) => {
if (!err) { if (!err) {
console.log(results) console.log(results)
@ -280,7 +281,7 @@ const actions = {
commit('setBackendFallback', result.value) commit('setBackendFallback', result.value)
break break
case 'defaultProfile': case 'defaultProfile':
console.log("IN SETTING DEFAULT:", result.value) console.log('IN SETTING DEFAULT:', result.value)
commit('setDefaultProfile', result.value) commit('setDefaultProfile', result.value)
break break
case 'checkForUpdates': case 'checkForUpdates':
@ -410,7 +411,10 @@ const actions = {
break break
} }
}) })
resolve()
} }
reject(err)
})
}) })
}, },

View File

@ -252,6 +252,7 @@ const actions = {
}, },
ytGetPlaylistInfo ({ rootState }, playlistId) { ytGetPlaylistInfo ({ rootState }, playlistId) {
console.log("PALYLIST INTOFOF")
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(playlistId) console.log(playlistId)
console.log('Getting playlist info please wait...') console.log('Getting playlist info please wait...')
@ -297,6 +298,7 @@ const actions = {
limit: 'Infinity', limit: 'Infinity',
requestOptions: { agent } requestOptions: { agent }
}).then((result) => { }).then((result) => {
console.log("RESULT PLAYLIST", result)
resolve(result) resolve(result)
}).catch((err) => { }).catch((err) => {
reject(err) reject(err)