From d1ddbb06485ea260d2d3df581f12208ce80d00d1 Mon Sep 17 00:00:00 2001 From: aandrew-me Date: Wed, 12 Nov 2025 22:36:38 +0300 Subject: [PATCH] Fixed formatting of formats --- src/renderer.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/renderer.js b/src/renderer.js index 70464d1..b887605 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -620,6 +620,7 @@ class YtDownloaderApp { * @param {string} url The video URL. */ async getInfo(url) { + this._loadSettings(); this._defaultVideoToggle(); this._resetUIForNewLink(); this.state.videoInfo.url = url; @@ -1169,21 +1170,26 @@ class YtDownloaderApp { const quality = `${format.height || "???"}p${ format.fps === 60 ? "60" : "" }`; - const vcodec = showMoreFormats - ? format.vcodec?.split(".")[0] || "" - : ""; const hasAudio = format.acodec !== "none" ? " 🔊" : ""; const col1 = quality.padEnd(videoQualityPadding + 1, NBSP); const col2 = format.ext.padEnd(extPadding, NBSP); - const col3 = vcodec.padEnd(vcodecPadding, NBSP); const col4 = displaySize.padEnd(filesizePadding, NBSP); + let optionText; + if (showMoreFormats) { + const vcodec = format.vcodec?.split(".")[0] || ""; + const col3 = vcodec.padEnd(vcodecPadding, NBSP); + optionText = `${col1} | ${col2} | ${col3} | ${col4}${hasAudio}`; + } else { + optionText = `${col1} | ${col2} | ${col4}${hasAudio}`; + } + const option = ``; + }>${optionText}`; videoSelect.innerHTML += option; } else if (