Skip to content

Commit

Permalink
Merge branch 'development' into feature/playlist-search-videos-in-one…
Browse files Browse the repository at this point in the history
…-user-playlist-2

* development:
  Translated using Weblate (Basque)
  Prevent layout shifts when thumbnails load in the chapter selector (FreeTubeApp#4713)
  Bump electron-builder from 24.9.1 to 24.12.0 (FreeTubeApp#4718)
  Bump sass-loader from 14.1.0 to 14.1.1 (FreeTubeApp#4719)
  Bump sass from 1.71.0 to 1.71.1 (FreeTubeApp#4716)
  Bump the eslint group with 2 updates (FreeTubeApp#4715)
  Support opening video timestamps in a new window (FreeTubeApp#4687)
  Translated using Weblate (Basque)
  Bump webpack-dev-server from 4.15.1 to 5.0.2 (FreeTubeApp#4695)
  Translated using Weblate (Japanese)
  Translated using Weblate (Czech)
  Translated using Weblate (Lithuanian)
  Translated using Weblate (Japanese)
  Translated using Weblate (Vietnamese)
  Bump youtubei.js to 9.1.0 for watch page fix (FreeTubeApp#4707)
  Translated using Weblate (Vietnamese)
  Translated using Weblate (Vietnamese)
  Translated using Weblate (Portuguese (Brazil))
  • Loading branch information
PikachuEXE committed Feb 27, 2024
2 parents 70793ca + c0e3454 commit 37d0f5c
Show file tree
Hide file tree
Showing 13 changed files with 732 additions and 380 deletions.
4 changes: 2 additions & 2 deletions _scripts/dev-runner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
process.env.NODE_ENV = 'development'

const open = require('open')
const electron = require('electron')
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server')
Expand Down Expand Up @@ -161,7 +160,8 @@ function startWeb (callback) {
if (!web) {
startRenderer(startMain)
} else {
startWeb(({ port }) => {
startWeb(async ({ port }) => {
const open = (await import('open')).default
open(`http://localhost:${port}`)
})
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"vue-observe-visibility": "^1.0.0",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"youtubei.js": "^9.0.2"
"youtubei.js": "^9.1.0"
},
"devDependencies": {
"@babel/core": "^7.23.9",
Expand All @@ -90,8 +90,8 @@
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"electron": "^28.2.3",
"electron-builder": "^24.9.1",
"eslint": "^8.56.0",
"electron-builder": "^24.12.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -100,7 +100,7 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-vue": "^9.21.1",
"eslint-plugin-vue": "^9.22.0",
"eslint-plugin-vuejs-accessibility": "^2.2.1",
"eslint-plugin-yml": "^1.12.2",
"html-webpack-plugin": "^5.6.0",
Expand All @@ -113,8 +113,8 @@
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"rimraf": "^5.0.5",
"sass": "^1.71.0",
"sass-loader": "^14.1.0",
"sass": "^1.71.1",
"sass-loader": "^14.1.1",
"stylelint": "^16.2.1",
"stylelint-config-sass-guidelines": "^11.0.0",
"stylelint-config-standard": "^36.0.0",
Expand All @@ -126,7 +126,7 @@
"vue-loader": "^15.10.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-dev-server": "^5.0.2",
"webpack-watch-external-files-plugin": "^3.0.0",
"yaml-eslint-parser": "^1.2.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,29 @@ export default defineComponent({
}
},
methods: {
catchTimestampClick: function(event) {
const match = event.detail.match(/(\d+):(\d+):?(\d+)?/)
if (match[3] !== undefined) { // HH:MM:SS
const seconds = 3600 * Number(match[1]) + 60 * Number(match[2]) + Number(match[3])
this.$emit('timestamp-event', seconds)
} else { // MM:SS
const seconds = 60 * Number(match[1]) + Number(match[2])
this.$emit('timestamp-event', seconds)
}
catchTimestampClick: function (event) {
this.$emit('timestamp-event', event.detail)
},
detectTimestamps: function (input) {
return input.replaceAll(/(\d+(:\d+)+)/g, '<a href="#" onclick="this.dispatchEvent(new CustomEvent(\'timestamp-clicked\',{bubbles:true, detail:\'$1\'}))">$1</a>')
const videoId = this.$route.params.id

return input.replaceAll(/(?:(\d+):)?(\d+):(\d+)/g, (timestamp, hours, minutes, seconds) => {
let time = 60 * Number(minutes) + Number(seconds)

if (hours) {
time += 3600 * Number(hours)
}

const url = this.$router.resolve({
path: `/watch/${videoId}`,
query: {
timestamp: time
}
}).href

// Adding the URL lets the user open the video in a new window at this timestamp
return `<a href="${url}" onclick="event.preventDefault();this.dispatchEvent(new CustomEvent('timestamp-clicked',{bubbles:true,detail:${time}}));window.scrollTo(0,0)">${timestamp}</a>`
})
}
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
.chapterThumbnail {
grid-area: thumbnail;
inline-size: 130px;
block-size: auto;
margin: 3px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@
@keydown.space.stop.prevent="changeChapter(index)"
@keydown.enter.stop.prevent="changeChapter(index)"
>
<!-- Setting the aspect ratio avoids layout shifts when the images load -->
<img
v-if="!compact"
alt=""
aria-hidden="true"
class="chapterThumbnail"
loading="lazy"
:src="chapter.thumbnail"
:src="chapter.thumbnail.url"
:style="{ aspectRatio: chapter.thumbnail.width / chapter.thumbnail.height }"
>
<div class="chapterTimestamp">
{{ chapter.timestamp }}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export default defineComponent({
timestamp: formatDurationAsTimestamp(start),
startSeconds: start,
endSeconds: 0,
thumbnail: chapter.thumbnail[0].url
thumbnail: chapter.thumbnail[0]
})
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion static/locales/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Settings:
General Settings:
General Settings: 'Obecné nastavení'
Check for Updates: 'Kontrolovat aktualizace'
Check for Latest Blog Posts: 'Kontrolovat nejnovější příspěvky blogů'
Check for Latest Blog Posts: 'Kontrolovat nejnovější příspěvky na blogu'
Fallback to Non-Preferred Backend on Failure: 'Při chybě přepnout na nepreferovaný
backend'
Enable Search Suggestions: 'Zapnout návrhy vyhledávání'
Expand Down
39 changes: 39 additions & 0 deletions static/locales/eu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ Forward: 'Aurrera'
Global:
Videos: 'Bideoak'

Counts:
Subscriber Count: 1.harpideduna| {count} harpidedun
Watching Count: 1. ikuslea | {count} ikusle
Channel Count: 1. kanala ! {count} kanal
Video Count: 1. bideoa | {count} bideo
View Count: 1. ikustaldia | {count} ikustaldi
Live: Zuzenekoa
Shorts: Laburrak
Input Tags:
Length Requirement: Etiketak {zenbaki} karaktere izan behar ditu gutxienez
Community: Komunitatea
Version {versionNumber} is now available! Click for more details: '{versionNumber}
bertsioa erabilgarri! Klikatu azalpen gehiagorako'
Download From Site: 'Webgunetik jaitsi'
Expand Down Expand Up @@ -90,6 +101,14 @@ Subscriptions:
Refresh Subscriptions: 'Harpidetzak freskatu'
Load More Videos: 'Bideo gehiago kargatu'
Error Channels: Akatsak dituzten kateak
Disabled Automatic Fetching: Harpidetza-bilaketa automatikoa desgaitu duzu. Freskatu
harpidetzak hemen ikusteko.
Empty Channels: Harpidetutako kanalek ez dute bideorik.
Empty Posts: Harpidetutako kanalek ez dute argitalpenik.
Load More Posts: Kargatu mezu gehiago
Subscriptions Tabs: Harpidetzen fitxak
All Subscription Tabs Hidden: Harpidetza fitxa guztiak ezkutatuta daude. Hemen edukia
ikusteko, erakutsi fitxa batzuk "{azpisection}" ataleko "{settingsSection}"-ean.
More: 'Gehiago'
Trending:
Trending: 'Joerak'
Expand All @@ -111,6 +130,24 @@ User Playlists:
Search bar placeholder: Bilatu Erreprodukzio-zerrendan
Empty Search Message: Erreprodukzio-zerrenda honetan ez dago zure bilaketarekin
bat datorren bideorik
Remove Watched Videos: Kendu ikusitako bideoak
You have no playlists. Click on the create new playlist button to create a new one.: Ez
duzu erreprodukzio-zerrendarik. Egin klik sortu erreprodukzio-zerrenda berria
botoian berri bat sortzeko.
This playlist currently has no videos.: Erreprodukzio-zerrenda honek ez du bideorik.
Create New Playlist: Sortu erreprodukzio zerrenda berria
Add to Playlist: Gehitu erreprodukzio zerrendara
Add to Favorites: Gehitu {playlistName}-ra
Remove from Favorites: Kendu {playlistName}tik
Move Video Up: Mugitu bideoa gora
Move Video Down: Mugitu bideoa behera
Remove from Playlist: Kendu erreprodukzio zerrendatik
Playlist Name: Erreprodukzio zerrendaren izena
Playlist Description: Erreprodukzio-zerrendaren deskribapena
Save Changes: Gorde aldaketak
Cancel: Utzi
Edit Playlist Info: Editatu erreprodukzio zerrendaren informazioa
Copy Playlist: Kopiatu Erreprodukzio zerrenda
History:
# On History Page
History: 'Historikoa'
Expand Down Expand Up @@ -828,3 +865,5 @@ Channels:
Count: '{number} kanal aurkitu dira.'
Empty: Zure kanalen zerrenda hutsik da.
Preferences: Hobespenak
Go to page: Joan {page}-ra
Close Banner: Itxi iragarkia
14 changes: 10 additions & 4 deletions static/locales/ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ User Playlists:
このページは、完全に動作する動画リストではありません。保存またはお気に入りと設定した動画のみが表示されます。操作が完了すると、現在ここにあるすべての動画は「お気に入り」の動画リストに移動します。
Search bar placeholder: 動画リスト内の検索
Empty Search Message: この再生リストに、検索に一致する動画はありません
This playlist currently has no videos.: 存在、この再生リストには動画があっていません。
Create New Playlist: 新規再生リストを作られる
Sort By:
NameAscending: A-Z
History:
# On History Page
History: '履歴'
Expand Down Expand Up @@ -276,7 +280,7 @@ Settings:
Folder Button: フォルダーの選択
Enter Fullscreen on Display Rotate: 横画面時にフルスクリーンにする
Skip by Scrolling Over Video Player: 動画プレーヤーでスクロールしてスキップ可能にする
Allow DASH AV1 formats: DASH AV1形式を許可する
Allow DASH AV1 formats: DASH AV1形式を許可
Comment Auto Load:
Comment Auto Load: コメント自動読み込み
Subscription Settings:
Expand Down Expand Up @@ -850,7 +854,7 @@ The playlist has been reversed: 再生リストを逆順にしました
A new blog is now available, {blogTitle}. Click to view more: '新着ブログ公開、{blogTitle}。クリックしてブログを読む'
Download From Site: サイトからダウンロード
Version {versionNumber} is now available! Click for more details: 最新バージョン {versionNumber}
配信中! 詳細はクリックして確認してください
配信中!詳細はクリックして確認してください
This video is unavailable because of missing formats. This can happen due to country unavailability.: この動画は、動画形式の情報が利用できないため再生できません。再生が許可されていない国で発生します。
Tooltips:
Subscription Settings:
Expand All @@ -866,8 +870,8 @@ Tooltips:
Scroll Playback Rate Over Video Player: カーソルが動画上にあるとき、Ctrl キー(Mac では Command キー)を押したまま、マウスホイールを前後にスクロールして再生速度を調整します。Control
キー(Mac では Command キー)を押したままマウスを左クリックすると、すぐにデフォルトの再生速度(設定を変更していない場合は 1 x)に戻ります。
Skip by Scrolling Over Video Player: スクロール ホイールを使用して、ビデオ、MPV スタイルをスキップします。
Allow DASH AV1 formats: DASH H.264形式よりDASH AV1形式の方がきれいに見える可能性があるけど、再生には必要な電力がより多い。全ての動画でDASH
AV1を利用できないため、プレイヤーはDASH H.264形式に自動変更する場合があります
Allow DASH AV1 formats: DASH H.264形式よりもDASH AV1形式の方がきれいに見える可能性がありますが、再生にはより多くの処理能力が必要となります。DASH
AV1形式を使用できない場合、プレイヤーはDASH H.264形式を自動で使用します
General Settings:
Invidious Instance: FreeTube が使用する Invidious API の接続先サーバーです。
Preferred API Backend: FreeTube が youtube からデータを取得する方法を選択します。「内部 API」とはアプリから取得する方法です。「Invidious
Expand Down Expand Up @@ -941,3 +945,5 @@ Hashtag:
This hashtag does not currently have any videos: このハッシュタグには現在動画がありません
Playlist will pause when current video is finished: 現在のビデオが終了すると、プレイリストは停止します
Playlist will not pause when current video is finished: 現在のビデオが終了しても、プレイリストは停止しません
Close Banner: バナーを閉じる
Go to page: '{page}に行く'
2 changes: 2 additions & 0 deletions static/locales/lt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Global:
Counts:
Subscriber Count: 1 prenumeruoti | {count} prenumeratorių
Channel Count: 1 kanalas | {count} kanalai
Video Count: 1 vaizdo įrašas | {count} vaizdo įrašai
Version {versionNumber} is now available! Click for more details: 'Versija {versionNumber}
jau prieinama! Spustelėkite, jei norite gauti daugiau informacijos'
Download From Site: 'Atsisiųsti iš svetainės'
Expand Down Expand Up @@ -904,3 +905,4 @@ Clipboard:
be saugaus ryšio
Preferences: Nuostatos
Go to page: Eiti į {page}
Close Banner: Uždaryti baneris
14 changes: 9 additions & 5 deletions static/locales/pt-BR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ Video:
Pause on Current Video: Pausar no vídeo atual
Unhide Channel: Mostrar Canal
Hide Channel: Ocultar o canal
More Options: Mais Opções
Videos:
#& Sort By
Sort By:
Expand Down Expand Up @@ -1075,11 +1076,10 @@ Tooltips:
áudio são para transmissões sem vídeo.
Proxy Videos Through Invidious: Conectar-se-á ao Invidious para obter vídeos em
vez de fazer uma conexão direta com o YouTube. Ignora a preferência da API.
Force Local Backend for Legacy Formats: Só funciona quando a API do Invidious
é predefinida. Quando ativada, a API local será executada e usará os formatos
antigos retornados por ela em vez dos retornados pelo Invidious. É útil quando
os vídeos retornados pelo Invidious não são reproduzidos devido a restrições
de país.
Force Local Backend for Legacy Formats: Funciona apenas quando a API do Invidious
é o padrão. Quando ativada, a API Local será executada e usará os formatos herdados
retornados por ela, em vez dos retornados pelo Invidious. Ajuda quando os vídeos
retornados pelo Invidious não são reproduzidos devido a restrições do país.
Scroll Playback Rate Over Video Player: Com o cursor sobre o vídeo, pressione
e segure a tecla Control (tecla Command no Mac) e role a roda do mouse para
frente ou para trás para controlar a taxa de reprodução. Pressione e segure
Expand Down Expand Up @@ -1205,3 +1205,7 @@ Channel Unhidden: '{channel} removido do filtro do canal'
Trimmed input must be at least N characters long: A entrada cortada deve ter pelo
menos 1 caractere | A entrada cortada precisa ter pelo menos {length} caracteres
Tag already exists: A tag "{tagName}" já existe
Close Banner: Fechar Banner
Age Restricted:
This channel is age restricted: Este canal tem restrição de idade
This video is age restricted: Este vídeo tem restrição de idade
Loading

0 comments on commit 37d0f5c

Please sign in to comment.