Skip to content

Commit 641cfdd

Browse files
committed
Merge branch 'development'
2 parents a665c6a + 42a5302 commit 641cfdd

File tree

6 files changed

+62
-11
lines changed

6 files changed

+62
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "freetube",
33
"productName": "FreeTube",
44
"description": "A private YouTube client",
5-
"version": "0.23.0",
5+
"version": "0.23.1",
66
"license": "AGPL-3.0-or-later",
77
"main": "./dist/main.js",
88
"private": true,

src/renderer/components/CommentSection/CommentSection.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ const nextPageToken = shallowRef(null)
363363
// we need to react to new replies and showReplies being toggled
364364
const commentData = ref([])
365365
366+
/** @type {import('youtubei.js').YT.Comments | undefined} */
367+
let localCommentsInstance
368+
366369
/** @type {import('vue').ComputedRef<'local' | 'invidious'>} */
367370
const backendPreference = computed(() => {
368371
return store.getters.getBackendPreference
@@ -538,8 +541,13 @@ async function getCommentDataLocal(more = false) {
538541
let comments
539542
if (more) {
540543
comments = await nextPageToken.value.getContinuation()
544+
} else if (localCommentsInstance) {
545+
comments = await localCommentsInstance.applySort(sortNewest.value ? 'NEWEST_FIRST' : 'TOP_COMMENTS')
546+
localCommentsInstance = comments
541547
} else {
542-
comments = await getLocalComments(props.id, sortNewest.value)
548+
comments = await getLocalComments(props.id)
549+
sortNewest.value = comments.header?.sort_menu?.sub_menu_items?.[1].selected ?? false
550+
localCommentsInstance = comments
543551
}
544552
545553
const parsedComments = comments.contents
@@ -575,6 +583,7 @@ async function getCommentDataLocal(more = false) {
575583
nextPageToken.value = null
576584
isLoading.value = false
577585
showComments.value = true
586+
localCommentsInstance = undefined
578587
return
579588
}
580589
// endregion No comment detection
@@ -585,6 +594,7 @@ async function getCommentDataLocal(more = false) {
585594
copyToClipboard(err)
586595
})
587596
if (backendFallback.value && backendPreference.value === 'local') {
597+
localCommentsInstance = undefined
588598
showToast(t('Falling back to Invidious API'))
589599
getCommentDataInvidious()
590600
} else {

src/renderer/helpers/api/local.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,10 @@ export async function getLocalVideoInfo(id) {
291291

292292
/**
293293
* @param {string} id
294-
* @param {boolean | undefined} sortByNewest
295294
*/
296-
export async function getLocalComments(id, sortByNewest = false) {
295+
export async function getLocalComments(id) {
297296
const innertube = await createInnertube()
298-
return innertube.getComments(id, sortByNewest ? 'NEWEST_FIRST' : 'TOP_COMMENTS')
297+
return innertube.getComments(id)
299298
}
300299

301300
// I know `type & type` is typescript syntax and not valid jsdoc but I couldn't get @extends or @augments to work

src/renderer/views/Watch/Watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export default defineComponent({
413413
// extract localised title first and fall back to the not localised one
414414
this.videoTitle = result.primary_info?.title.text ?? result.basic_info.title
415415
this.videoViewCount = result.basic_info.view_count ?? (result.primary_info.view_count ? extractNumberFromString(result.primary_info.view_count.text) : null)
416-
this.license = result.secondary_info.metadata.rows.find(element => element.title.text === 'License')?.contents[0].text
416+
this.license = result.secondary_info.metadata.rows.find(element => element.title?.text === 'License')?.contents[0]?.text
417417

418418
this.channelId = result.basic_info.channel_id ?? result.secondary_info.owner?.author.id
419419
this.channelName = result.basic_info.author ?? result.secondary_info.owner?.author.name

static/locales/es.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ User Playlists:
185185
This playlist has a video with a duration error: Esta lista de reproducción
186186
contiene al menos un vídeo sin duración, se ordenará como si su duración fuera
187187
cero.
188+
Video has been removed. Click here to undo.: El video ha sido eliminado. Clickea
189+
aquí para cancelar.
188190
Search for Videos: Buscar vídeos
189191
Are you sure you want to delete this playlist? This cannot be undone: ¿Estás seguro
190192
de que quieres borrar esta lista de reproducción? Esto no se puede deshacer.
@@ -321,6 +323,7 @@ Settings:
321323
Solarized Dark: Solarized oscuro
322324
Gruvbox Dark: Gruvbox oscuro
323325
Gruvbox Light: Gruvbox claro
326+
Catppuccin Frappe: Frappe Capuchino
324327
Main Color Theme:
325328
Main Color Theme: 'Color principal'
326329
Red: 'Rojo'
@@ -441,9 +444,14 @@ Settings:
441444
Skip by Scrolling Over Video Player: Omitir al desplazarse sobre el reproductor
442445
de vídeo
443446
Autoplay Interruption Timer: Temporizador de interrupción de reproducción automática
447+
Default Viewing Mode:
448+
Theater: Teatro
449+
Default Viewing Mode: Vista predeterminada
450+
External Player: Reproductor externo ({nombreReproductorExterno})
451+
Full Screen: Pantalla Completa
444452
Privacy Settings:
445453
Privacy Settings: 'Privacidad'
446-
Remember History: 'Recordar historial'
454+
Remember History: 'Guardar Historial'
447455
Save Watched Progress: 'Guardar progreso reproducido'
448456
Clear Search Cache: 'Borrar cache de búsqueda'
449457
Are you sure you want to clear out your search cache?: '¿Seguro que quieres borrar
@@ -462,6 +470,12 @@ Settings:
462470
Remove All Playlists: Eliminar todas las listas de reproducción
463471
Are you sure you want to remove all your playlists?: ¿Estás seguro de que quieres
464472
eliminar todas tus listas de reproducción?
473+
Remember Search History: Guardar Historial de Búsquedas
474+
Are you sure you want to clear out your search history and cache?: Está seguro
475+
de que quiere borrar su historial de búsqueda y cache?
476+
Search history and cache have been cleared: El historial de búsquedas y el cache
477+
han sido borrados
478+
Clear Search History and Cache: Borrar Historial de Búsquedas y Cache
465479
Subscription Settings:
466480
Subscription Settings: 'Suscripción'
467481
Hide Videos on Watch: 'Ocultar vídeos vistos'
@@ -918,6 +932,8 @@ Video:
918932
Theatre Mode: Modo cine
919933
Exit Theatre Mode: Salir del modo cine
920934
Full Window: Pantalla completa
935+
Autoplay is off: La reproducción automática está desactivada
936+
Autoplay is on: La reproducción automática está activada
921937
IP block: YouTube ha bloqueado tu dirección IP para ver vídeos. Por favor, intenta
922938
cambiar a otra VPN o proxy.
923939
MembersOnly: Los videos solo para miembros no se pueden ver con FreeTube ya que
@@ -930,6 +946,10 @@ Video:
930946
Show Original Details: Mostrar detalles originales
931947
Show Modified Details: Mostrar detalles modificados
932948
#& Playlists
949+
DRMProtected: Los videos restringidos con DRM no pueden reproducirse en FreeTube,
950+
dado que requieren componentes propietarias de fuente cerrada. Si desea ver este
951+
video, por favor véalo en la página oficial de YouTube con un buscador que tenga
952+
DRM habilitado.
933953
Playlist:
934954
#& About
935955
View Full Playlist: 'Ver la lista de reproducción completa'
@@ -949,6 +969,8 @@ Playlist:
949969
VideoTitleDescending: Título (Z-A)
950970
VideoDurationAscending: Duración (primero la más corta)
951971
VideoDurationDescending: Duración (la más larga primero)
972+
PublishedNewest: Presentar primero los últimos publicados
973+
PublishedOldest: Presentar primero los primeramente publicados
952974
Change Format:
953975
Change Media Formats: 'Cambiar formato de vídeo'
954976
Use Dash Formats: 'Utilizar formatos DASH'
@@ -1127,6 +1149,7 @@ Default Invidious instance has been set to {instance}: La instancia de Invidious
11271149
ha sido establecida como {instance}
11281150
Search Bar:
11291151
Clear Input: Borrar entrada
1152+
Remove: Eliminar
11301153
External link opening has been disabled in the general settings: Se ha desactivado
11311154
la apertura de enlaces externos en la configuración general
11321155
Are you sure you want to open this link?: ¿Estás seguro/a de que quieres abrir este
@@ -1211,3 +1234,5 @@ Autoplay Interruption Timer: Reproducción automática cancelada debido a {autop
12111234
Description:
12121235
Expand Description: '...más'
12131236
Collapse Description: Mostrar menos
1237+
KeyboardShortcutPrompt:
1238+
New Window: Crear una nueva ventana

static/locales/pt-BR.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ User Playlists:
199199
This playlist has a video with a duration error: Esta playlist contém pelo menos
200200
um vídeo que não tem duração, ela será classificada como se sua duração fosse
201201
zero.
202+
Video has been removed. Click here to undo.: O vídeo foi removido. Clique aqui
203+
para desfazer.
202204
Search for Videos: Pesquisar vídeos
203205
AddVideoPrompt:
204206
Toast:
@@ -392,11 +394,11 @@ Settings:
392394
Hide FreeTube Header Logo: Ocultar logotipo FreeTube na barra superior
393395
Player Settings:
394396
Player Settings: 'Player'
395-
Play Next Video: 'Reproduzir próximo vídeo'
397+
Play Next Video: 'Reprodução automática de vídeos recomendados'
396398
Turn on Subtitles by Default: 'Ativar legendas por padrão'
397-
Autoplay Videos: 'Reprodução automática de vídeos'
399+
Autoplay Videos: 'Iniciar reprodução dos vídeos automaticamente'
398400
Proxy Videos Through Invidious: 'Usar o Invidious como proxy'
399-
Autoplay Playlists: 'Reprodução automática das playlists'
401+
Autoplay Playlists: 'Reprodução automática dos vídeos da playlist'
400402
Enable Theatre Mode by Default: 'Habilitar "Modo Teatro" por padrão'
401403
Default Volume: 'Volume padrão'
402404
Default Playback Rate: 'Velocidade de reprodução'
@@ -445,6 +447,12 @@ Settings:
445447
para o modo paisagem
446448
Skip by Scrolling Over Video Player: Pular vídeo ao rolar sobre o player
447449
Autoplay Interruption Timer: Temporizador de interrupção para reprodução automática
450+
Default Viewing Mode:
451+
Theater: Teatro
452+
Default Viewing Mode: Modo de visualização padrão
453+
Full Screen: Tela cheia
454+
Picture in Picture: Picture in Picture (PiP)
455+
External Player: Player externo ({externalPlayerName})
448456
Subscription Settings:
449457
Subscription Settings: 'Inscrições'
450458
Hide Videos on Watch: 'Ocultar vídeos após assisti-los'
@@ -465,7 +473,7 @@ Settings:
465473
limpar o cache de buscas?
466474
Clear Search Cache: Limpar cache de buscas
467475
Save Watched Progress: Habilitar histórico de exibição
468-
Remember History: Lembrar histórico
476+
Remember History: Lembrar histórico de exibição
469477
Privacy Settings: Privacidade
470478
Are you sure you want to remove all subscriptions and profiles? This cannot be undone.: Tem
471479
certeza de que deseja remover todas as inscrições e perfis? Isto não pode ser
@@ -477,6 +485,12 @@ Settings:
477485
Are you sure you want to remove all your playlists?: Tem certeza de que deseja
478486
remover todas as suas playlists?
479487
Remove All Playlists: Remover todas as playlists
488+
Remember Search History: Lembrar histórico de buscas
489+
Clear Search History and Cache: Limpar histórico de pesquisa e o cache
490+
Search history and cache have been cleared: O histórico de pesquisa e o cache
491+
foram removidos
492+
Are you sure you want to clear out your search history and cache?: Tem certeza
493+
de que deseja limpar o histórico de pesquisa e o cache?
480494
Data Settings:
481495
Subscriptions have been successfully exported: Inscrições foram exportadas com
482496
sucesso
@@ -872,6 +886,8 @@ Video:
872886
TranslatedCaptionTemplate: '{language} (traduzido do "{originalLanguage}")'
873887
Show Stats: Mostrar estatísticas
874888
Exit Full Window: Sair do preenchimento de janela
889+
Autoplay is off: A reprodução automática está desativada
890+
Autoplay is on: A reprodução automática está ativada
875891
IP block: O YouTube bloqueou seu endereço IP para assistir a vídeos. Tente mudar
876892
para uma VPN ou proxy diferente.
877893
Unlisted: Não listado
@@ -1273,3 +1289,4 @@ KeyboardShortcutPrompt:
12731289
Reset Zoom: Redefinir o nível de zoom / Escala da Interface do Usuário
12741290
Next Chapter: Próximo capítulo
12751291
Skip by Tenths: Pular vídeo por porcentagem (3 pulos até 30% da duração)
1292+
shortcutLabelSeparator:

0 commit comments

Comments
 (0)