From c48254e98891ac06bc8919fced8f84334477bce6 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Sat, 18 Feb 2023 10:43:12 +0100 Subject: [PATCH] fiter xiaomi and oneplus 6 --- clear_data.sh | 12 +++++++++++- src/appointment.js | 10 ++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/clear_data.sh b/clear_data.sh index 7194a78..2691889 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -275,4 +275,14 @@ adb -s emulator-5562 shell am start -n com.android.chrome/com.google.android.app #18 adb -s emulator-5558 shell pm clear com.android.chrome adb -s emulator-5558 shell am set-debug-app --persistent com.android.chrome -adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main \ No newline at end of file +adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#18 +adb -s 192.168.0.37:5555 shell pm clear com.android.chrome +adb -s 192.168.0.37:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.0.37:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#18 +adb -s 192.168.0.27:5555 shell pm clear com.android.chrome +adb -s 192.168.0.27:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.0.27:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main \ No newline at end of file diff --git a/src/appointment.js b/src/appointment.js index 14e32bf..0b902b1 100644 --- a/src/appointment.js +++ b/src/appointment.js @@ -10,6 +10,7 @@ const SEVEN_DAYS_IN_S = 3600 * 24 * 7; const THIRTY_DAYS_IN_S = 3600 * 24 * 30; let excelUtil = new ExcelUtil(); let collectionName = formatDate(new Date()) +device_to_excludes = ["47e7e36b", "e30eb015"] async function filterAlreadyBookedContacts(contactList) { let alreadyBookedContacts = await mongoManager.getAllSuccessfulItemsForDay(collectionName); @@ -166,11 +167,12 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT alert("未找到连接的设备"); return } - let segmentNumber = listWithoutBlackContact.length / devices.length; - console.log("connected device number:" + devices.length) + let filteredDeviceList = devices.filter(device => !device_to_excludes.includes(device.serial())) + let segmentNumber = listWithoutBlackContact.length / filteredDeviceList.length; + console.log("connected device number:" + filteredDeviceList.length) console.log("segmentNumber:" + segmentNumber) - for (let i = 0; i < devices.length; i++) { - startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep); + for (let i = 0; i < filteredDeviceList.length; i++) { + startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), filteredDeviceList[i], selectedStore, audioAnalyse, alertBeep); } }) })