YT: save decipher actions only after successful deciphering

This commit is contained in:
Rafał Dzięgiel
2021-03-15 13:14:41 +01:00
parent 5b6141ee8c
commit 8c307dc90f

View File

@@ -129,7 +129,10 @@ var YouTubeClient = GObject.registerClass({
break; break;
} }
actions = YTDL.sig.extractActions(pBody); actions = YTDL.sig.extractActions(pBody);
this._createCacheFileAsync(ytId, actions); if(actions) {
debug('deciphered');
this._createCacheFileAsync(ytId, actions);
}
} }
if(!actions || !actions.length) { if(!actions || !actions.length) {
debug(new Error('could not extract decipher actions')); debug(new Error('could not extract decipher actions'));