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 92ed8bcf..452564ad 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -237,6 +237,11 @@ export default Vue.extend({ return '' } + if (this.sourceList[this.sourceList.length - 1].qualityLabel === this.$t('Video.Audio.Low')) { + this.selectedDefaultQuality = this.sourceList[0].qualityLabel + return + } + let defaultQuality = this.defaultQuality if (defaultQuality === 'auto') { diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 86c12a26..d1f142fd 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -319,16 +319,30 @@ export default Vue.extend({ this.audioSourceList = result.player_response.streamingData.adaptiveFormats.filter((format) => { return format.mimeType.includes('audio') - }).map((format) => { + }).sort((a, b) => { + return a.bitrate - b.bitrate + }).map((format, index) => { + const label = (x) => { + switch (x) { + case 0: + return this.$t('Video.Audio.Low') + case 1: + return this.$t('Video.Audio.Medium') + case 2: + return this.$t('Video.Audio.High') + case 3: + return this.$t('Video.Audio.Best') + default: + return format.bitrate + } + } return { url: format.url, type: format.mimeType, label: 'Audio', - qualityLabel: format.bitrate + qualityLabel: label(index) } - }).sort((a, b) => { - return a.qualityLabel - b.qualityLabel - }) + }).reverse() if (this.activeFormat === 'audio') { this.activeSourceList = this.audioSourceList diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 7e2619fe..2352b82b 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -393,6 +393,11 @@ Video: 'Live Chat is currently not supported with the Invidious API. A direct connection to YouTube is required.': Live Chat is currently not supported with the Invidious API. A direct connection to YouTube is required. + Audio: + Low: Low + Medium: Medium + High: High + Best: Best Published: Jan: Jan Feb: Feb