Another fix for dash formats
This commit is contained in:
parent
7d7581aa7d
commit
f9e549dd33
|
@ -115,6 +115,10 @@ export default Vue.extend({
|
||||||
selectedDefaultQuality: function () {
|
selectedDefaultQuality: function () {
|
||||||
let selectedQuality = null
|
let selectedQuality = null
|
||||||
|
|
||||||
|
if (this.sourceList.length === 0) {
|
||||||
|
return this.defaultQuality
|
||||||
|
}
|
||||||
|
|
||||||
const maxAvailableQuality = parseInt(this.sourceList[this.sourceList.length - 1].qualityLabel.replace(/p|k/, ''))
|
const maxAvailableQuality = parseInt(this.sourceList[this.sourceList.length - 1].qualityLabel.replace(/p|k/, ''))
|
||||||
|
|
||||||
switch (maxAvailableQuality) {
|
switch (maxAvailableQuality) {
|
||||||
|
@ -168,9 +172,12 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
this.activeSourceList.forEach((source) => {
|
this.activeSourceList.forEach((source) => {
|
||||||
|
console.log(source)
|
||||||
|
if (typeof (source.qualityLabel) !== 'undefined') {
|
||||||
if (this.determineDefaultQuality(source.qualityLabel)) {
|
if (this.determineDefaultQuality(source.qualityLabel)) {
|
||||||
selectedQuality = source.qualityLabel
|
selectedQuality = source.qualityLabel
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return selectedQuality
|
return selectedQuality
|
||||||
|
@ -264,6 +271,10 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
determineDefaultQuality: function (label) {
|
determineDefaultQuality: function (label) {
|
||||||
|
if (this.useDash) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if (label.includes('p')) {
|
if (label.includes('p')) {
|
||||||
const selectedQuality = parseInt(label.replace('p', ''))
|
const selectedQuality = parseInt(label.replace('p', ''))
|
||||||
return this.defaultQuality === selectedQuality
|
return this.defaultQuality === selectedQuality
|
||||||
|
|
Loading…
Reference in New Issue