Skip to content

Commit

Permalink
Added serialNumber to device info object and to reponse of `GetMode…
Browse files Browse the repository at this point in the history
…lDetails()`
  • Loading branch information
lvcabral committed Jan 18, 2025
1 parent 039d1ae commit 5aea711
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/api/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const deviceData: DeviceInfo = Object.assign(DefaultDeviceInfo, {
audioCodecs: audioCodecs(),
videoFormats: videoFormats(),
});
deviceData.serialNumber = getSerialNumber();

// App Data
const inputParams: Map<string, string> = new Map();
Expand Down
3 changes: 1 addition & 2 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
loadAppZip,
updateAppZip,
subscribePackage,
getSerialNumber,
mountExt,
setupDeepLink,
} from "../api/package";
Expand Down Expand Up @@ -265,7 +264,7 @@ async function runApp(payload: AppPayload) {
if (program.ecp && !workerReady) {
// Load ECP service as Worker
const workerPath = path.join(__dirname, "brs.ecp.js");
const workerData = { device: { ...payload.device, serialNumber: getSerialNumber() } };
const workerData = { device: payload.device };
ecpWorker = new Worker(workerPath, { workerData: workerData });
ecpWorker.on("message", (event: any) => {
if (typeof event === "object" && typeof event.ready === "boolean") {
Expand Down
3 changes: 2 additions & 1 deletion src/core/brsTypes/components/RoDeviceInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,13 @@ export class RoDeviceInfo extends BrsComponent implements BrsValue {
args: [],
returns: ValueKind.Object,
},
impl: (_: Interpreter) => {
impl: (interpreter: Interpreter) => {
return toAssociativeArray({
Manufacturer: "",
ModelNumber: this.deviceModel,
VendorName: "Roku",
VendorUSBName: "Roku",
SerialNumber: interpreter.deviceInfo?.get("serialNumber"),
});
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/core/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const DefaultDeviceInfo: DeviceInfo = {
developerId: "34c6fceca75e456f25e7e99531e2425c6c1de443", // As in Roku devices, segregates Registry data (can't have a dot)
friendlyName: "BrightScript Engine Library",
deviceModel: "8000X", // Roku TV (Midland)
firmwareVersion: "48F.04E12221A", // v14.0
firmwareVersion: "48F.14E07709A", // v14.1.4.7709
clientId: "6c5bf3a5-b2a5-4918-824d-7691d5c85364",
RIDA: "f51ac698-bc60-4409-aae3-8fc3abc025c4", // Unique identifier for advertisement tracking
countryCode: "US", // App Store Country
Expand Down

0 comments on commit 5aea711

Please sign in to comment.