From 15c02baf80b1d04d41f87de006091dacc15cc6ff Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 14 Mar 2021 20:18:46 +0100 Subject: [PATCH 1/7] Started investigating default profile loading inconsistency --- src/renderer/App.js | 37 ++++++++++--------- .../watch-video-info/watch-video-info.js | 1 + src/renderer/store/modules/history.js | 2 +- src/renderer/store/modules/profile.js | 10 +++-- src/renderer/store/modules/settings.js | 1 + 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index c821fad6..7f97e842 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -85,26 +85,27 @@ export default Vue.extend({ } }, mounted: function () { - this.$store.dispatch('grabUserSettings') - this.$store.dispatch('grabHistory') - this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) - this.$store.dispatch('grabAllPlaylists') - this.$store.commit('setUsingElectron', useElectron) - this.checkThemeSettings() - this.checkLocale() + this.$store.dispatch('grabUserSettings').then(() => { + this.$store.dispatch('grabHistory') + this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) + this.$store.dispatch('grabAllPlaylists') + this.$store.commit('setUsingElectron', useElectron) + this.checkThemeSettings() + this.checkLocale() - if (useElectron) { - console.log('User is using Electron') - this.activateKeyboardShortcuts() - this.openAllLinksExternally() - this.enableOpenUrl() - this.setBoundsOnClose() - } + if (useElectron) { + console.log('User is using Electron') + this.activateKeyboardShortcuts() + this.openAllLinksExternally() + this.enableOpenUrl() + this.setBoundsOnClose() + } - setTimeout(() => { - this.checkForNewUpdates() - this.checkForNewBlogPosts() - }, 500) + setTimeout(() => { + this.checkForNewUpdates() + this.checkForNewBlogPosts() + }, 500) + }) }, methods: { checkLocale: function () { 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 0c35afb8..1471c231 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -263,6 +263,7 @@ export default Vue.extend({ const currentProfile = JSON.parse(JSON.stringify(this.profileList[this.activeProfile])) const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0])) + console.log("PRIMARY PROFILE:", primaryProfile) if (this.isSubscribed) { currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => { diff --git a/src/renderer/store/modules/history.js b/src/renderer/store/modules/history.js index 42088578..24841d16 100644 --- a/src/renderer/store/modules/history.js +++ b/src/renderer/store/modules/history.js @@ -13,7 +13,7 @@ if (window && window.process && window.process.type === 'renderer') { const remote = require('@electron/remote') dbLocation = remote.app.getPath('userData') - + console.log("DB", dbLocation) dbLocation = dbLocation + '/history.db' } else { dbLocation = 'history.db' diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index fe5b25fd..991bd53a 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -27,7 +27,7 @@ const profileDb = new Datastore({ const state = { profileList: [{ _id: 'allChannels', - name: 'All Channels', + name: 'Brudi Channels', bgColor: '#000000', textColor: '#FFFFFF', subscriptions: [] @@ -54,6 +54,7 @@ const actions = { } else { // We want the primary profile to always be first // So sort with that then sort alphabetically by profile name + console.log('PROFILE DB RESULTS', results) const profiles = results.sort((a, b) => { if (a._id === 'allChannels') { return -1 @@ -67,10 +68,13 @@ const actions = { }) if (state.profileList.length < profiles.length) { + console.log("STATE LIST LESS RTHAN PROFILES LENGTH") + console.log(profiles, state.profileList) + console.log("ROOTSTATE:SETTINGDEFATL", rootState.settings.defaultProfile) const profileIndex = profiles.findIndex((profile) => { return profile._id === rootState.settings.defaultProfile }) - + console.log("INDEX", profileIndex) if (profileIndex !== -1) { dispatch('updateActiveProfile', profileIndex) } @@ -103,7 +107,7 @@ const actions = { textColor: textColor, subscriptions: [] } - console.log(defaultProfile) + console.log('DIS DEFAULT', defaultProfile) profileDb.update({ _id: 'allChannels' }, defaultProfile, { upsert: true }, (err, numReplaced) => { if (!err) { dispatch('grabAllProfiles') diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index bb4d2d2d..aefb4809 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -280,6 +280,7 @@ const actions = { commit('setBackendFallback', result.value) break case 'defaultProfile': + console.log("IN SETTING DEFAULT:", result.value) commit('setDefaultProfile', result.value) break case 'checkForUpdates': From 24d12a435768f91ab2a6121f869919025b2053ad Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 14 Mar 2021 20:18:46 +0100 Subject: [PATCH 2/7] Started investigating default profile loading inconsistency --- src/renderer/App.js | 37 ++++++++++--------- .../watch-video-info/watch-video-info.js | 1 + src/renderer/store/modules/history.js | 2 +- src/renderer/store/modules/profile.js | 10 +++-- src/renderer/store/modules/settings.js | 1 + 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index c821fad6..7f97e842 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -85,26 +85,27 @@ export default Vue.extend({ } }, mounted: function () { - this.$store.dispatch('grabUserSettings') - this.$store.dispatch('grabHistory') - this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) - this.$store.dispatch('grabAllPlaylists') - this.$store.commit('setUsingElectron', useElectron) - this.checkThemeSettings() - this.checkLocale() + this.$store.dispatch('grabUserSettings').then(() => { + this.$store.dispatch('grabHistory') + this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) + this.$store.dispatch('grabAllPlaylists') + this.$store.commit('setUsingElectron', useElectron) + this.checkThemeSettings() + this.checkLocale() - if (useElectron) { - console.log('User is using Electron') - this.activateKeyboardShortcuts() - this.openAllLinksExternally() - this.enableOpenUrl() - this.setBoundsOnClose() - } + if (useElectron) { + console.log('User is using Electron') + this.activateKeyboardShortcuts() + this.openAllLinksExternally() + this.enableOpenUrl() + this.setBoundsOnClose() + } - setTimeout(() => { - this.checkForNewUpdates() - this.checkForNewBlogPosts() - }, 500) + setTimeout(() => { + this.checkForNewUpdates() + this.checkForNewBlogPosts() + }, 500) + }) }, methods: { checkLocale: function () { 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 0c35afb8..1471c231 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -263,6 +263,7 @@ export default Vue.extend({ const currentProfile = JSON.parse(JSON.stringify(this.profileList[this.activeProfile])) const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0])) + console.log("PRIMARY PROFILE:", primaryProfile) if (this.isSubscribed) { currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => { diff --git a/src/renderer/store/modules/history.js b/src/renderer/store/modules/history.js index 42088578..24841d16 100644 --- a/src/renderer/store/modules/history.js +++ b/src/renderer/store/modules/history.js @@ -13,7 +13,7 @@ if (window && window.process && window.process.type === 'renderer') { const remote = require('@electron/remote') dbLocation = remote.app.getPath('userData') - + console.log("DB", dbLocation) dbLocation = dbLocation + '/history.db' } else { dbLocation = 'history.db' diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index fe5b25fd..991bd53a 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -27,7 +27,7 @@ const profileDb = new Datastore({ const state = { profileList: [{ _id: 'allChannels', - name: 'All Channels', + name: 'Brudi Channels', bgColor: '#000000', textColor: '#FFFFFF', subscriptions: [] @@ -54,6 +54,7 @@ const actions = { } else { // We want the primary profile to always be first // So sort with that then sort alphabetically by profile name + console.log('PROFILE DB RESULTS', results) const profiles = results.sort((a, b) => { if (a._id === 'allChannels') { return -1 @@ -67,10 +68,13 @@ const actions = { }) if (state.profileList.length < profiles.length) { + console.log("STATE LIST LESS RTHAN PROFILES LENGTH") + console.log(profiles, state.profileList) + console.log("ROOTSTATE:SETTINGDEFATL", rootState.settings.defaultProfile) const profileIndex = profiles.findIndex((profile) => { return profile._id === rootState.settings.defaultProfile }) - + console.log("INDEX", profileIndex) if (profileIndex !== -1) { dispatch('updateActiveProfile', profileIndex) } @@ -103,7 +107,7 @@ const actions = { textColor: textColor, subscriptions: [] } - console.log(defaultProfile) + console.log('DIS DEFAULT', defaultProfile) profileDb.update({ _id: 'allChannels' }, defaultProfile, { upsert: true }, (err, numReplaced) => { if (!err) { dispatch('grabAllProfiles') diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index bb4d2d2d..aefb4809 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -280,6 +280,7 @@ const actions = { commit('setBackendFallback', result.value) break case 'defaultProfile': + console.log("IN SETTING DEFAULT:", result.value) commit('setDefaultProfile', result.value) break case 'checkForUpdates': From 4e11233f3e64d7ed27c9ef9bd21908cceb4386e4 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 26 Mar 2021 19:30:44 +0100 Subject: [PATCH 3/7] Verify check --- src/renderer/App.js | 3 +- src/renderer/store/modules/profile.js | 2 +- src/renderer/store/modules/settings.js | 298 +++++++++++++------------ src/renderer/store/modules/ytdl.js | 2 + 4 files changed, 156 insertions(+), 149 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 7f97e842..da30e444 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -85,7 +85,8 @@ export default Vue.extend({ } }, 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('grabAllProfiles', this.$t('Profile.All Channels')) this.$store.dispatch('grabAllPlaylists') diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index 991bd53a..b28b568b 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -27,7 +27,7 @@ const profileDb = new Datastore({ const state = { profileList: [{ _id: 'allChannels', - name: 'Brudi Channels', + name: 'All Channels', bgColor: '#000000', textColor: '#FFFFFF', subscriptions: [] diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index aefb4809..1c427b05 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -264,153 +264,157 @@ const getters = { const actions = { grabUserSettings ({ dispatch, commit, rootState }) { - settingsDb.find({}, (err, results) => { - if (!err) { - console.log(results) - results.forEach((result) => { - switch (result._id) { - case 'invidiousInstance': - if (result.value === '') { - dispatch('updateInvidiousInstance', 'https://invidious.snopyta.org') - } else { - commit('setInvidiousInstance', result.value) - } - break - case 'backendFallback': - commit('setBackendFallback', result.value) - break - case 'defaultProfile': - console.log("IN SETTING DEFAULT:", result.value) - commit('setDefaultProfile', result.value) - break - case 'checkForUpdates': - commit('setCheckForUpdates', result.value) - break - case 'checkForBlogPosts': - commit('setCheckForBlogPosts', result.value) - break - case 'enableSearchSuggestions': - commit('setEnableSearchSuggestions', result.value) - break - 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 - case 'barColor': - commit('setBarColor', result.value) - break - case 'uiScale': - webframe.setZoomFactor(parseInt(result.value) / 100) - commit('setUiScale', result.value) - break - case 'disableSmoothScrolling': - commit('setDisableSmoothScrolling', result.value) - break - case 'hideWatchedSubs': - commit('setHideWatchedSubs', result.value) - break - case 'useRssFeeds': - commit('setUseRssFeeds', result.value) - break - case 'rememberHistory': - commit('setRememberHistory', result.value) - break - case 'saveWatchedProgress': - commit('setSaveWatchedProgress', result.value) - break - 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 - 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 - case 'defaultTheatreMode': - commit('setDefaultTheatreMode', result.value) - break - case 'defaultInterval': - commit('setDefaultInterval', result.value) - break - 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 - 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 - case 'hidePlaylists': - commit('setHidePlaylists', result.value) - break - case 'hideLiveChat': - commit('setHideLiveChat', result.value) - break - case 'hideActiveSubscriptions': - commit('setHideActiveSubscriptions', result.value) - break - } - }) - } + return new Promise((resolve, reject) => { + settingsDb.find({}, (err, results) => { + if (!err) { + console.log(results) + results.forEach((result) => { + switch (result._id) { + case 'invidiousInstance': + if (result.value === '') { + dispatch('updateInvidiousInstance', 'https://invidious.snopyta.org') + } else { + commit('setInvidiousInstance', result.value) + } + break + case 'backendFallback': + commit('setBackendFallback', result.value) + break + case 'defaultProfile': + console.log('IN SETTING DEFAULT:', result.value) + commit('setDefaultProfile', result.value) + break + case 'checkForUpdates': + commit('setCheckForUpdates', result.value) + break + case 'checkForBlogPosts': + commit('setCheckForBlogPosts', result.value) + break + case 'enableSearchSuggestions': + commit('setEnableSearchSuggestions', result.value) + break + 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 + case 'barColor': + commit('setBarColor', result.value) + break + case 'uiScale': + webframe.setZoomFactor(parseInt(result.value) / 100) + commit('setUiScale', result.value) + break + case 'disableSmoothScrolling': + commit('setDisableSmoothScrolling', result.value) + break + case 'hideWatchedSubs': + commit('setHideWatchedSubs', result.value) + break + case 'useRssFeeds': + commit('setUseRssFeeds', result.value) + break + case 'rememberHistory': + commit('setRememberHistory', result.value) + break + case 'saveWatchedProgress': + commit('setSaveWatchedProgress', result.value) + break + 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 + 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 + case 'defaultTheatreMode': + commit('setDefaultTheatreMode', result.value) + break + case 'defaultInterval': + commit('setDefaultInterval', result.value) + break + 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 + 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 + case 'hidePlaylists': + commit('setHidePlaylists', result.value) + break + case 'hideLiveChat': + commit('setHideLiveChat', result.value) + break + case 'hideActiveSubscriptions': + commit('setHideActiveSubscriptions', result.value) + break + } + }) + resolve() + } + reject(err) + }) }) }, diff --git a/src/renderer/store/modules/ytdl.js b/src/renderer/store/modules/ytdl.js index 5d6bceb9..eefeb60a 100644 --- a/src/renderer/store/modules/ytdl.js +++ b/src/renderer/store/modules/ytdl.js @@ -252,6 +252,7 @@ const actions = { }, ytGetPlaylistInfo ({ rootState }, playlistId) { + console.log("PALYLIST INTOFOF") return new Promise((resolve, reject) => { console.log(playlistId) console.log('Getting playlist info please wait...') @@ -297,6 +298,7 @@ const actions = { limit: 'Infinity', requestOptions: { agent } }).then((result) => { + console.log("RESULT PLAYLIST", result) resolve(result) }).catch((err) => { reject(err) From 271a45e2b05c72f82430bd0ac003668da3687555 Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 27 Mar 2021 18:58:14 +0100 Subject: [PATCH 4/7] Cleanup --- src/renderer/App.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index da30e444..eca320ba 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -86,7 +86,6 @@ export default Vue.extend({ }, mounted: function () { this.$store.dispatch('grabUserSettings').then((result) => { - console.log('AFTER GRABBING', result) this.$store.dispatch('grabHistory') this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')) this.$store.dispatch('grabAllPlaylists') From 3cca33eac34f95663bc0c12d2b648860c73b8b7d Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 27 Mar 2021 19:01:05 +0100 Subject: [PATCH 5/7] More cleanup --- src/renderer/components/watch-video-info/watch-video-info.js | 1 - src/renderer/store/modules/history.js | 1 - src/renderer/store/modules/profile.js | 4 ---- src/renderer/store/modules/ytdl.js | 2 -- 4 files changed, 8 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 1471c231..0c35afb8 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -263,7 +263,6 @@ export default Vue.extend({ const currentProfile = JSON.parse(JSON.stringify(this.profileList[this.activeProfile])) const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0])) - console.log("PRIMARY PROFILE:", primaryProfile) if (this.isSubscribed) { currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => { diff --git a/src/renderer/store/modules/history.js b/src/renderer/store/modules/history.js index 24841d16..3869c0c5 100644 --- a/src/renderer/store/modules/history.js +++ b/src/renderer/store/modules/history.js @@ -13,7 +13,6 @@ if (window && window.process && window.process.type === 'renderer') { const remote = require('@electron/remote') dbLocation = remote.app.getPath('userData') - console.log("DB", dbLocation) dbLocation = dbLocation + '/history.db' } else { dbLocation = 'history.db' diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index b28b568b..59ba16a4 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -54,7 +54,6 @@ const actions = { } else { // We want the primary profile to always be first // So sort with that then sort alphabetically by profile name - console.log('PROFILE DB RESULTS', results) const profiles = results.sort((a, b) => { if (a._id === 'allChannels') { return -1 @@ -68,13 +67,10 @@ const actions = { }) if (state.profileList.length < profiles.length) { - console.log("STATE LIST LESS RTHAN PROFILES LENGTH") console.log(profiles, state.profileList) - console.log("ROOTSTATE:SETTINGDEFATL", rootState.settings.defaultProfile) const profileIndex = profiles.findIndex((profile) => { return profile._id === rootState.settings.defaultProfile }) - console.log("INDEX", profileIndex) if (profileIndex !== -1) { dispatch('updateActiveProfile', profileIndex) } diff --git a/src/renderer/store/modules/ytdl.js b/src/renderer/store/modules/ytdl.js index eefeb60a..5d6bceb9 100644 --- a/src/renderer/store/modules/ytdl.js +++ b/src/renderer/store/modules/ytdl.js @@ -252,7 +252,6 @@ const actions = { }, ytGetPlaylistInfo ({ rootState }, playlistId) { - console.log("PALYLIST INTOFOF") return new Promise((resolve, reject) => { console.log(playlistId) console.log('Getting playlist info please wait...') @@ -298,7 +297,6 @@ const actions = { limit: 'Infinity', requestOptions: { agent } }).then((result) => { - console.log("RESULT PLAYLIST", result) resolve(result) }).catch((err) => { reject(err) From dcef4261a72dca4dea77b485efb17dc7314dcabc Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 27 Mar 2021 19:02:53 +0100 Subject: [PATCH 6/7] Final adjustments --- src/renderer/store/modules/profile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index 59ba16a4..8509b3a6 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -71,6 +71,7 @@ const actions = { const profileIndex = profiles.findIndex((profile) => { return profile._id === rootState.settings.defaultProfile }) + if (profileIndex !== -1) { dispatch('updateActiveProfile', profileIndex) } @@ -103,7 +104,7 @@ const actions = { textColor: textColor, subscriptions: [] } - console.log('DIS DEFAULT', defaultProfile) + profileDb.update({ _id: 'allChannels' }, defaultProfile, { upsert: true }, (err, numReplaced) => { if (!err) { dispatch('grabAllProfiles') From a27fc9215ccd0fa84522f334f778a54edb55ba5b Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 27 Mar 2021 19:03:57 +0100 Subject: [PATCH 7/7] Unnecessary print removed --- src/renderer/store/modules/profile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/store/modules/profile.js b/src/renderer/store/modules/profile.js index 8509b3a6..d934aedd 100644 --- a/src/renderer/store/modules/profile.js +++ b/src/renderer/store/modules/profile.js @@ -67,7 +67,6 @@ const actions = { }) if (state.profileList.length < profiles.length) { - console.log(profiles, state.profileList) const profileIndex = profiles.findIndex((profile) => { return profile._id === rootState.settings.defaultProfile })