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