From 93eecf8ca014ac56879105126e5b5d27a9d9a15a Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Fri, 10 Apr 2020 11:28:55 +0200 Subject: [PATCH] Make sure delete cmd is digested --- src/services/netmd.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/netmd.ts b/src/services/netmd.ts index 2ff5c3c..b8a7ec4 100644 --- a/src/services/netmd.ts +++ b/src/services/netmd.ts @@ -1,7 +1,7 @@ import { openNewDevice, NetMDInterface, Disc, listContent, openPairedDevice, Wireformat, MDTrack, download } from 'netmd-js'; import { makeGetAsyncPacketIteratorOnWorkerThread } from 'netmd-js/dist/web-encrypt-worker'; import { Logger, ConsoleLogger, Level } from 'netmd-js/dist/logger'; -import { sanitizeTitle } from '../utils'; +import { sanitizeTitle, sleep } from '../utils'; const Worker = require('worker-loader!netmd-js/dist/web-encrypt-worker.js'); // eslint-disable-line import/no-webpack-loader-syntax @@ -98,6 +98,7 @@ export class NetMDUSBService implements NetMDService { async deleteTrack(index: number) { await this.netmdInterface!.eraseTrack(index); + await sleep(100); } async wipeDisc() {