From bdcb57f9c74b2ff7f352494118a4d4d20b58f8df Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 12 May 2024 18:04:28 +0600 Subject: [PATCH] tiktok: use highest quality when h265 is allowed --- src/modules/processing/services/tiktok.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/processing/services/tiktok.js b/src/modules/processing/services/tiktok.js index 159cfd87..b81d57d9 100644 --- a/src/modules/processing/services/tiktok.js +++ b/src/modules/processing/services/tiktok.js @@ -48,8 +48,12 @@ export default async function(obj) { images = detail.image_post_info?.images; let playAddr = detail.video.play_addr_h264; - if ((obj.h265 || !playAddr) && detail.video.play_addr) - playAddr = detail.video.play_addr; + if (obj.h265) { + playAddr = detail.video.bit_rate[0].play_addr + } + if (!playAddr && detail.video.play_addr) { + playAddr = detail.video.play_addr + } if (!obj.isAudioOnly && !images) { video = playAddr.url_list[0];