Skip to content

best way to save what you love

tiktok: fix error when user prefers h265 and downloads photo slideshow

dumbmoron03fda93f969d
diff --git a/src/modules/processing/services/tiktok.js b/src/modules/processing/services/tiktok.js
index 0984ec04..33e7aef3 100644
--- a/src/modules/processing/services/tiktok.js
+++ b/src/modules/processing/services/tiktok.js
@@ -57,7 +57,7 @@ export default async function(obj) {
let playAddr = detail.video.playAddr;
if (obj.h265) {
- const h265PlayAddr = detail.video.bitrateInfo.find(b => b.CodecType.includes("h265"))?.PlayAddr.UrlList[0]
+ const h265PlayAddr = detail?.video?.bitrateInfo?.find(b => b.CodecType.includes("h265"))?.PlayAddr.UrlList[0]
playAddr = h265PlayAddr || playAddr
}