Skip to content

Commit 7388ee1

Browse files
committed
feat(controller): use fixContract to update entitlements
1 parent 9bc54f5 commit 7388ee1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

components/controller.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,29 @@ export class Controller {
682682
(brick) =>
683683
!brick.includes("override_constantjeff.brick"),
684684
)
685+
686+
break
687+
}
688+
case "h3": {
689+
if (!contract.Metadata.Entitlements) break
690+
691+
const locations =
692+
this.configManager.getConfig<PeacockLocationsData>(
693+
"LocationsData",
694+
false,
695+
)
696+
697+
// Entitlements changed in 3.230.1, thanks IOI
698+
contract.Metadata.Entitlements =
699+
contract.Metadata.Entitlements.map((ent) => {
700+
const ents =
701+
locations.children[contract.Metadata.Location]
702+
?.Properties.Entitlements
703+
704+
return ent.endsWith("LEGACY_STANDARD") && ents?.length
705+
? ents[0]
706+
: ent
707+
})
685708
}
686709
}
687710

0 commit comments

Comments
 (0)