diff --git a/src/renderer/components/subscription-settings/subscription-settings.js b/src/renderer/components/subscription-settings/subscription-settings.js index 2e56430a..510c42f5 100644 --- a/src/renderer/components/subscription-settings/subscription-settings.js +++ b/src/renderer/components/subscription-settings/subscription-settings.js @@ -2,14 +2,12 @@ import Vue from 'vue' import { mapActions } from 'vuex' import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue' import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' -import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' export default Vue.extend({ name: 'SubscriptionSettings', components: { 'ft-settings-section': FtSettingsSection, - 'ft-toggle-switch': FtToggleSwitch, - 'ft-flex-box': FtFlexBox + 'ft-toggle-switch': FtToggleSwitch }, data: function () { return { @@ -22,12 +20,16 @@ export default Vue.extend({ }, useRssFeeds: function () { return this.$store.getters.getUseRssFeeds + }, + fetchSubscriptionsAutomatically: function () { + return this.$store.getters.getFetchSubscriptionsAutomatically } }, methods: { ...mapActions([ 'updateHideWatchedSubs', - 'updateUseRssFeeds' + 'updateUseRssFeeds', + 'updateFetchSubscriptionsAutomatically' ]) } }) diff --git a/src/renderer/components/subscription-settings/subscription-settings.vue b/src/renderer/components/subscription-settings/subscription-settings.vue index 5a0289e0..ad6269f8 100644 --- a/src/renderer/components/subscription-settings/subscription-settings.vue +++ b/src/renderer/components/subscription-settings/subscription-settings.vue @@ -2,19 +2,32 @@ - - - - + + + + + + + + + diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index f34665a9..ddbb2f8c 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -269,7 +269,8 @@ const state = { screenshotQuality: 95, screenshotAskPath: false, screenshotFolderPath: '', - screenshotFilenamePattern: '%Y%M%D-%H%N%S' + screenshotFilenamePattern: '%Y%M%D-%H%N%S', + fetchSubscriptionsAutomatically: true } const stateWithSideEffects = { diff --git a/src/renderer/views/Subscriptions/Subscriptions.js b/src/renderer/views/Subscriptions/Subscriptions.js index c1dd5d5c..df35a0ed 100644 --- a/src/renderer/views/Subscriptions/Subscriptions.js +++ b/src/renderer/views/Subscriptions/Subscriptions.js @@ -28,7 +28,8 @@ export default Vue.extend({ isLoading: false, dataLimit: 100, videoList: [], - errorChannels: [] + errorChannels: [], + attemptedFetch: false } }, computed: { @@ -86,6 +87,9 @@ export default Vue.extend({ hideLiveStreams: function() { return this.$store.getters.getHideLiveStreams + }, + fetchSubscriptionsAutomatically: function() { + return this.$store.getters.getFetchSubscriptionsAutomatically } }, watch: { @@ -120,10 +124,12 @@ export default Vue.extend({ } this.isLoading = false - } else { + } else if (this.fetchSubscriptionsAutomatically) { setTimeout(async () => { this.getSubscriptions() }, 300) + } else { + this.isLoading = false } }, methods: { @@ -149,6 +155,7 @@ export default Vue.extend({ this.isLoading = true this.updateShowProgressBar(true) this.setProgressBarPercentage(0) + this.attemptedFetch = true let videoList = [] let channelCount = 0 @@ -230,8 +237,13 @@ export default Vue.extend({ } })) this.isLoading = false - } else { + } else if (this.fetchSubscriptionsAutomatically) { this.getSubscriptions() + } else if (this.activeProfile._id === this.profileSubscriptions.activeProfile) { + this.videoList = this.profileSubscriptions.videoList + } else { + this.videoList = [] + this.attemptedFetch = false } }, diff --git a/src/renderer/views/Subscriptions/Subscriptions.vue b/src/renderer/views/Subscriptions/Subscriptions.vue index 6262ef21..23529ade 100644 --- a/src/renderer/views/Subscriptions/Subscriptions.vue +++ b/src/renderer/views/Subscriptions/Subscriptions.vue @@ -28,9 +28,24 @@ - + {{ $t("Subscriptions['Your Subscription list is currently empty. Start adding subscriptions to see them here.']") }} + + {{ $t("Subscriptions.Disabled Automatic Fetching") }} + + + {{ $t("Subscriptions.Empty Channels") }} +
+
{{ $t("Subscriptions['Your Subscription list is currently empty. Start adding subscriptions to see them here.']") }}
+ {{ $t("Subscriptions.Disabled Automatic Fetching") }} +
+ {{ $t("Subscriptions.Empty Channels") }} +