mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-14 13:40:03 +01:00
Fix various profile issues and allow videos to repeat if save progress is finished
This commit is contained in:
parent
f7f118f761
commit
ff5d2f9b86
@ -35,11 +35,14 @@ export default Vue.extend({
|
|||||||
selectedText: function () {
|
selectedText: function () {
|
||||||
const localeText = this.$t('Profile.$ selected')
|
const localeText = this.$t('Profile.$ selected')
|
||||||
return localeText.replace('$', this.selectedLength)
|
return localeText.replace('$', this.selectedLength)
|
||||||
|
},
|
||||||
|
primaryProfile: function () {
|
||||||
|
return JSON.parse(JSON.stringify(this.profileList[0]))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
profile: function () {
|
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 nameA = a.name.toLowerCase()
|
||||||
const nameB = b.name.toLowerCase()
|
const nameB = b.name.toLowerCase()
|
||||||
if (nameA < nameB) {
|
if (nameA < nameB) {
|
||||||
|
@ -46,6 +46,9 @@ export default Vue.extend({
|
|||||||
profileInitial: function () {
|
profileInitial: function () {
|
||||||
return this.profileName.slice(0, 1).toUpperCase()
|
return this.profileName.slice(0, 1).toUpperCase()
|
||||||
},
|
},
|
||||||
|
profileList: function () {
|
||||||
|
return this.$store.getters.getProfileList
|
||||||
|
},
|
||||||
activeProfile: function () {
|
activeProfile: function () {
|
||||||
return this.$store.getters.getActiveProfile
|
return this.$store.getters.getActiveProfile
|
||||||
},
|
},
|
||||||
@ -72,7 +75,6 @@ export default Vue.extend({
|
|||||||
this.profileName = this.profile.name
|
this.profileName = this.profile.name
|
||||||
this.profileBgColor = this.profile.bgColor
|
this.profileBgColor = this.profile.bgColor
|
||||||
this.profileTextColor = this.profile.textColor
|
this.profileTextColor = this.profile.textColor
|
||||||
this.profileSubscriptions = this.profile.subscriptions
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openDeletePrompt: function () {
|
openDeletePrompt: function () {
|
||||||
@ -98,7 +100,7 @@ export default Vue.extend({
|
|||||||
name: this.profileName,
|
name: this.profileName,
|
||||||
bgColor: this.profileBgColor,
|
bgColor: this.profileBgColor,
|
||||||
textColor: this.profileTextColor,
|
textColor: this.profileTextColor,
|
||||||
subscriptions: this.profileSubscriptions
|
subscriptions: this.profile.subscriptions
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isNew) {
|
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')
|
message: this.$t('Profile.Your default profile has been changed to your primary profile')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.activeProfile._id === this.profileId) {
|
if (this.profileList[this.activeProfile]._id === this.profileId) {
|
||||||
this.updateActiveProfile('allChannels')
|
this.updateActiveProfile(0)
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/settings/profile/'
|
path: '/settings/profile/'
|
||||||
|
@ -257,11 +257,6 @@ export default Vue.extend({
|
|||||||
|
|
||||||
this.player.on('ready', function () {
|
this.player.on('ready', function () {
|
||||||
v.$emit('ready')
|
v.$emit('ready')
|
||||||
if (this.captionList.length > 0) {
|
|
||||||
this.player.caption({
|
|
||||||
data: this.captionList
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
this.player.on('ended', function () {
|
this.player.on('ended', function () {
|
||||||
|
@ -127,6 +127,7 @@ export default Vue.extend({
|
|||||||
this.firstLoad = true
|
this.firstLoad = true
|
||||||
this.activeFormat = this.defaultVideoFormat
|
this.activeFormat = this.defaultVideoFormat
|
||||||
this.videoStoryboardSrc = ''
|
this.videoStoryboardSrc = ''
|
||||||
|
this.captionSourceList = []
|
||||||
|
|
||||||
this.checkIfPlaylist()
|
this.checkIfPlaylist()
|
||||||
|
|
||||||
@ -498,9 +499,11 @@ export default Vue.extend({
|
|||||||
console.log(historyIndex)
|
console.log(historyIndex)
|
||||||
|
|
||||||
if (historyIndex !== -1 && !this.isLive) {
|
if (historyIndex !== -1 && !this.isLive) {
|
||||||
console.log(this.historyCache[historyIndex])
|
|
||||||
const watchProgress = this.historyCache[historyIndex].watchProgress
|
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) {
|
if (this.rememberHistory && historyIndex !== -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user