From 8c307dc90fcfe3ef9436e69ff06ab6b7fe59071e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 15 Mar 2021 13:14:41 +0100 Subject: [PATCH] YT: save decipher actions only after successful deciphering --- src/youtube.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/youtube.js b/src/youtube.js index 9753a8ed..13dc808e 100644 --- a/src/youtube.js +++ b/src/youtube.js @@ -129,7 +129,10 @@ var YouTubeClient = GObject.registerClass({ break; } actions = YTDL.sig.extractActions(pBody); - this._createCacheFileAsync(ytId, actions); + if(actions) { + debug('deciphered'); + this._createCacheFileAsync(ytId, actions); + } } if(!actions || !actions.length) { debug(new Error('could not extract decipher actions'));