mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-04-24 15:07:31 -05:00
fix(spr): remove redundant if/else block
we can just use the STOPPED value for the PL
This commit is contained in:
parent
6489084385
commit
78e87da468
|
|
@ -183,10 +183,6 @@ if (!config.spr.enabled) {
|
|||
disabledFeatures.spr = true;
|
||||
}
|
||||
|
||||
if (config.spr.enabled) {
|
||||
disabledFeatures.spr = false;
|
||||
}
|
||||
|
||||
if (disabledFeatures.s3) {
|
||||
if (!config.cdn.disk_path) {
|
||||
errors.push('s3 file storage is disabled and no CDN disk path was set. Set the PN_BOSS_CONFIG_CDN_DISK_PATH environment variable');
|
||||
|
|
|
|||
|
|
@ -40,110 +40,60 @@ function get3DSPolicyList(countryCode: string, majorVersion: string): { PolicyLi
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!disabledFeatures.spr) {
|
||||
return {
|
||||
PolicyList: {
|
||||
MajorVersion: Number(majorVersion),
|
||||
MinorVersion: 0,
|
||||
ListId: 1891,
|
||||
DefaultStop: false,
|
||||
ForceVersionUp: false,
|
||||
UpdateTime: moment().utc().format('YYYY-MM-DDTHH:MM:SS+0000'),
|
||||
Priority: [
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'basho0',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bc00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bd00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000be00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'pl',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '0004013000003400',
|
||||
TaskId: 'sprelay',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
PolicyList: {
|
||||
MajorVersion: Number(majorVersion),
|
||||
MinorVersion: 0,
|
||||
ListId: 1891,
|
||||
DefaultStop: false,
|
||||
ForceVersionUp: false,
|
||||
UpdateTime: moment().utc().format('YYYY-MM-DDTHH:MM:SS+0000'),
|
||||
Priority: [
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'basho0',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bc00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bd00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000be00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'pl',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
PolicyList: {
|
||||
MajorVersion: Number(majorVersion),
|
||||
MinorVersion: 0,
|
||||
ListId: 1891,
|
||||
DefaultStop: false,
|
||||
ForceVersionUp: false,
|
||||
UpdateTime: moment().utc().format('YYYY-MM-DDTHH:MM:SS+0000'),
|
||||
Priority: [
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'basho0',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bc00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000bd00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '000400300000be00',
|
||||
TaskId: 'OlvNotf',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '0004003000008f02',
|
||||
TaskId: 'pl',
|
||||
Level: 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
},
|
||||
{
|
||||
TitleId: '0004013000003400',
|
||||
TaskId: 'sprelay',
|
||||
Level: disabledFeatures.spr ? 'STOPPED' : 'HIGH',
|
||||
Persistent: true, // TODO - What's this?
|
||||
Revive: true // TODO - What's this?
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getWiiUPolicyList(countryCode: string, majorVersion: string): { PolicyList: PolicyList } | null {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user