Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feature/subscription-cache
Browse files Browse the repository at this point in the history
* development: (21 commits)
  Fix playback of VOD/non-live videos with Invidious (FreeTubeApp#5654)
  Translated using Weblate (Bulgarian)
  Translated using Weblate (Japanese)
  Translated using Weblate (Bulgarian)
  Specify locale for strings that may differ from the chosen display locale (FreeTubeApp#5624)
  Added translation using Weblate (Afrikaans)
  Remove "Force Local Backend for Legacy Formats" setting (FreeTubeApp#5650)
  Change the hls manifest type to match the parser name shaka player registers (FreeTubeApp#5648)
  Fix incorrect/translated placeholders in locale files (FreeTubeApp#5628)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Turkish)
  Translated using Weblate (Czech)
  Translated using Weblate (Japanese)
  Translated using Weblate (French)
  Translated using Weblate (Japanese)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Chinese (Traditional Han script))
  Translated using Weblate (Polish)
  ...
PikachuEXE committed Sep 8, 2024
2 parents 07d796a + 42781ec commit 52a4367
Showing 64 changed files with 1,398 additions and 425 deletions.
1 change: 1 addition & 0 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
>
<span
class="changeLogText"
lang="en"
v-html="updateChangelog"
/>
<ft-flex-box>
Original file line number Diff line number Diff line change
@@ -289,7 +289,6 @@ export default defineComponent({
if (addedPlaylistIds.size === 1) {
message = this.$tc('User Playlists.AddVideoPrompt.Toast.{videoCount} video(s) added to 1 playlist', this.toBeAddedToPlaylistVideoCount, {
videoCount: this.toBeAddedToPlaylistVideoCount,
playlistCount: addedPlaylistIds.size,
})
} else {
message = this.$tc('User Playlists.AddVideoPrompt.Toast.{videoCount} video(s) added to {playlistCount} playlists', this.toBeAddedToPlaylistVideoCount, {
4 changes: 4 additions & 0 deletions src/renderer/components/ft-select/ft-select.js
Original file line number Diff line number Diff line change
@@ -47,6 +47,10 @@ export default defineComponent({
iconColor: {
type: String,
default: null
},
isLocaleSelector: {
type: Boolean,
default: false
}
},
emits: ['change'],
1 change: 1 addition & 0 deletions src/renderer/components/ft-select/ft-select.vue
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
v-for="(name, index) in selectNames"
:key="index"
:value="selectValues[index]"
:lang="isLocaleSelector && selectValues[index] !== 'system' ? selectValues[index].replace('_', '-') : null"
>
{{ name }}
</option>
5 changes: 0 additions & 5 deletions src/renderer/components/general-settings/general-settings.js
Original file line number Diff line number Diff line change
@@ -242,10 +242,6 @@ export default defineComponent({

handlePreferredApiBackend: function (backend) {
this.updateBackendPreference(backend)

if (backend === 'local') {
this.updateForceLocalBackendForLegacy(false)
}
},

handleThumbnailPreferenceChange: function (value) {
@@ -270,7 +266,6 @@ export default defineComponent({
'updateRegion',
'updateListType',
'updateThumbnailPreference',
'updateForceLocalBackendForLegacy',
'updateCurrentLocale',
'updateExternalLinkHandling',
'updateGeneralAutoLoadMorePaginatedItemsEnabled',
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@
:select-names="localeNames"
:select-values="localeOptions"
:icon="['fas', 'language']"
is-locale-selector
@change="updateCurrentLocale"
/>
<ft-select
5 changes: 0 additions & 5 deletions src/renderer/components/player-settings/player-settings.js
Original file line number Diff line number Diff line change
@@ -83,10 +83,6 @@ export default defineComponent({
return this.$store.getters.getEnableSubtitlesByDefault
},

forceLocalBackendForLegacy: function () {
return this.$store.getters.getForceLocalBackendForLegacy
},

proxyVideos: function () {
return this.$store.getters.getProxyVideos
},
@@ -284,7 +280,6 @@ export default defineComponent({
'updateAutoplayPlaylists',
'updatePlayNextVideo',
'updateEnableSubtitlesByDefault',
'updateForceLocalBackendForLegacy',
'updateProxyVideos',
'updateDefaultTheatreMode',
'updateDefaultSkipInterval',
8 changes: 0 additions & 8 deletions src/renderer/components/player-settings/player-settings.vue
Original file line number Diff line number Diff line change
@@ -4,14 +4,6 @@
>
<div class="switchColumnGrid">
<div class="switchColumn">
<ft-toggle-switch
:label="$t('Settings.Player Settings.Force Local Backend for Legacy Formats')"
:compact="true"
:disabled="backendPreference === 'local'"
:default-value="forceLocalBackendForLegacy"
:tooltip="$t('Tooltips.Player Settings.Force Local Backend for Legacy Formats')"
@change="updateForceLocalBackendForLegacy"
/>
<ft-toggle-switch
:label="$t('Settings.Player Settings.Proxy Videos Through Invidious')"
:compact="true"
1 change: 0 additions & 1 deletion src/renderer/store/modules/settings.js
Original file line number Diff line number Diff line change
@@ -193,7 +193,6 @@ const state = {
externalPlayerIgnoreDefaultArgs: false,
externalPlayerCustomArgs: '',
expandSideBar: false,
forceLocalBackendForLegacy: false,
hideActiveSubscriptions: false,
hideChannelCommunity: false,
hideChannelPlaylists: false,
2 changes: 1 addition & 1 deletion src/renderer/views/About/About.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export default defineComponent({
{
icon: ['fab', 'github'],
title: this.$t('About.Source code'),
content: `<a href="https://github.com/FreeTubeApp/FreeTube">GitHub: FreeTubeApp/FreeTube</a><br>${this.$t('About.Licensed under the')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.AGPLv3')}</a>`
content: `<a href="https://github.com/FreeTubeApp/FreeTube" lang="en">GitHub: FreeTubeApp/FreeTube</a><br>${this.$t('About.Licensed under the')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.AGPLv3')}</a>`
},
{
icon: ['fas', 'file-download'],
35 changes: 4 additions & 31 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ import {
} from '../../helpers/api/invidious'

const MANIFEST_TYPE_DASH = 'application/dash+xml'
const MANIFEST_TYPE_HLS = 'application/x-mpegURL'
const MANIFEST_TYPE_HLS = 'application/x-mpegurl'

export default defineComponent({
name: 'Watch',
@@ -164,9 +164,6 @@ export default defineComponent({
defaultVideoFormat: function () {
return this.$store.getters.getDefaultVideoFormat
},
forceLocalBackendForLegacy: function () {
return this.$store.getters.getForceLocalBackendForLegacy
},
thumbnailPreference: function () {
return this.$store.getters.getThumbnailPreference
},
@@ -836,19 +833,9 @@ export default defineComponent({
// which fixed the API returning incorrect height, width and fps information
const trustApiResponse = result.adaptiveFormats.some(stream => typeof stream.size === 'string')

if (process.env.SUPPORTS_LOCAL_API && this.forceLocalBackendForLegacy) {
const legacyFormats = await this.getLocalLegacyFormats()

if (legacyFormats !== null) {
this.legacyFormats = legacyFormats
} else {
this.legacyFormats = result.formatStreams.map(format => mapInvidiousLegacyFormat(format, trustApiResponse))
}
} else {
this.legacyFormats = result.formatStreams.map(format => mapInvidiousLegacyFormat(format, trustApiResponse))
}
this.legacyFormats = result.formatStreams.map(format => mapInvidiousLegacyFormat(format, trustApiResponse))

if (!process.env.SUPPORTS_LOCAL_API || (this.proxyVideos && !this.forceLocalBackendForLegacy)) {
if (!process.env.SUPPORTS_LOCAL_API || this.proxyVideos) {
this.legacyFormats.forEach(format => {
format.url = getProxyUrl(format.url)
})
@@ -1125,20 +1112,6 @@ export default defineComponent({
this.timestamp = isNaN(timestamp) || timestamp < 0 ? null : timestamp
},

getLocalLegacyFormats: async function () {
try {
const result = await getLocalVideoInfo(this.videoId)
return result.streaming_data.formats.map(mapLocalLegacyFormat)
} catch (err) {
const errorMessage = this.$t('Local API Error (Click to copy)')
showToast(`${errorMessage}: ${err}`, 10000, () => {
copyToClipboard(err)
})
console.error(err)
return null
}
},

handleFormatChange: function (format) {
switch (format) {
case 'dash':
@@ -1410,7 +1383,7 @@ export default defineComponent({
if (localFormat.has_audio) {
audioFormats.push(localFormat)

if (localFormat.is_dubbed || localFormat.is_descriptive || localFormat.is_drc || localFormat.is_secondary) {
if (localFormat.is_dubbed || localFormat.is_descriptive || localFormat.is_secondary) {
hasMultipleAudioTracks = true
}
}
Loading

0 comments on commit 52a4367

Please sign in to comment.