MCPcopy Create free account
hub / github.com/DevLARLEY/PlayreadyProxy2 / removeSelectedPlayreadyDevice

Method removeSelectedPlayreadyDevice

utils.js:280–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278 }
279
280 static async removeSelectedPlayreadyDevice() {
281 const selected_device_name = await DeviceManager.getSelectedPlayreadyDevice();
282
283 const result = await AsyncLocalStorage.getStorage(['devices']);
284 const array = result.devices === undefined ? [] : result.devices;
285
286 const index = array.indexOf(selected_device_name);
287 if (index > -1) {
288 array.splice(index, 1);
289 }
290
291 await AsyncLocalStorage.setStorage({ devices: array });
292 await AsyncLocalStorage.removeStorage([selected_device_name]);
293 }
294
295 static async removeSelectedPlayreadyDeviceKey() {
296 await AsyncLocalStorage.removeStorage(["selected"]);

Callers 1

panel.jsFile · 0.80

Calls 4

getStorageMethod · 0.80
setStorageMethod · 0.80
removeStorageMethod · 0.80

Tested by

no test coverage detected