diff --git a/src/renderer/components/ft-profile-all-channels-list/ft-profile-all-channels-list.js b/src/renderer/components/ft-profile-all-channels-list/ft-profile-all-channels-list.js index fdd750c7..13eb84fa 100644 --- a/src/renderer/components/ft-profile-all-channels-list/ft-profile-all-channels-list.js +++ b/src/renderer/components/ft-profile-all-channels-list/ft-profile-all-channels-list.js @@ -35,11 +35,14 @@ export default Vue.extend({ selectedText: function () { const localeText = this.$t('Profile.$ selected') return localeText.replace('$', this.selectedLength) + }, + primaryProfile: function () { + return JSON.parse(JSON.stringify(this.profileList[0])) } }, watch: { profile: function () { - this.channels = [].concat(this.profileList[0].subscriptions).sort((a, b) => { + this.channels = [].concat(this.primaryProfile.subscriptions).sort((a, b) => { const nameA = a.name.toLowerCase() const nameB = b.name.toLowerCase() if (nameA < nameB) { diff --git a/src/renderer/components/ft-profile-edit/ft-profile-edit.js b/src/renderer/components/ft-profile-edit/ft-profile-edit.js index 814f4c8c..aa985419 100644 --- a/src/renderer/components/ft-profile-edit/ft-profile-edit.js +++ b/src/renderer/components/ft-profile-edit/ft-profile-edit.js @@ -46,6 +46,9 @@ export default Vue.extend({ profileInitial: function () { return this.profileName.slice(0, 1).toUpperCase() }, + profileList: function () { + return this.$store.getters.getProfileList + }, activeProfile: function () { return this.$store.getters.getActiveProfile }, @@ -72,7 +75,6 @@ export default Vue.extend({ this.profileName = this.profile.name this.profileBgColor = this.profile.bgColor this.profileTextColor = this.profile.textColor - this.profileSubscriptions = this.profile.subscriptions }, methods: { openDeletePrompt: function () { @@ -98,7 +100,7 @@ export default Vue.extend({ name: this.profileName, bgColor: this.profileBgColor, textColor: this.profileTextColor, - subscriptions: this.profileSubscriptions + subscriptions: this.profile.subscriptions } if (!this.isNew) { @@ -143,8 +145,8 @@ export default Vue.extend({ message: this.$t('Profile.Your default profile has been changed to your primary profile') }) } - if (this.activeProfile._id === this.profileId) { - this.updateActiveProfile('allChannels') + if (this.profileList[this.activeProfile]._id === this.profileId) { + this.updateActiveProfile(0) } this.$router.push({ path: '/settings/profile/' diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 23b7b149..ef110b32 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -257,11 +257,6 @@ export default Vue.extend({ this.player.on('ready', function () { v.$emit('ready') - if (this.captionList.length > 0) { - this.player.caption({ - data: this.captionList - }) - } }) this.player.on('ended', function () { diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 7a247b6c..c07c1ae7 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -127,6 +127,7 @@ export default Vue.extend({ this.firstLoad = true this.activeFormat = this.defaultVideoFormat this.videoStoryboardSrc = '' + this.captionSourceList = [] this.checkIfPlaylist() @@ -498,9 +499,11 @@ export default Vue.extend({ console.log(historyIndex) if (historyIndex !== -1 && !this.isLive) { - console.log(this.historyCache[historyIndex]) const watchProgress = this.historyCache[historyIndex].watchProgress - this.$refs.videoPlayer.player.currentTime(watchProgress) + + if (watchProgress < (this.videoLengthSeconds - 10)) { + this.$refs.videoPlayer.player.currentTime(watchProgress) + } } if (this.rememberHistory && historyIndex !== -1) {