Add depreciation warning system, begin depreciation of session_data.hasCap()

This commit is contained in:
zefie
2025-08-13 00:45:04 -04:00
parent f87f4c2eb6
commit 005bd377a2
12 changed files with 83 additions and 16 deletions

View File

@@ -57,7 +57,7 @@ To write an e-mail message, follow these steps:
<spacer type=vertical height=20>
First, if you're not already in Mail, choose <b>Mail</b> from `;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "Web Home"
else
data += "Home"
@@ -66,7 +66,7 @@ data += ` or press the <b>Mail</b> key on your keyboard.
<td width=10>
<td width=267 valign=top>
<table align=right cellpadding=0 cellspacing=0 background="`;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "wtv-guide:/images/home-plus.jpg"
else
data += "wtv-guide:/images/home-classic.jpg"

View File

@@ -65,7 +65,7 @@ Here's an example of an e-mail address:
<td width=10>
<td width=267 valign=top>
<table align=right cellpadding=0 cellspacing=0 background="`;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "wtv-guide:/images/help/mail/sendmail-plus.jpg"
else
data += "wtv-guide:/images/help/mail/sendmail-classic.jpg"

View File

@@ -64,7 +64,7 @@ mailbox, they'll see it first.
<td width=10>
<td width=267 valign=top>
<table align=right cellpadding=0 cellspacing=0 background="`;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "wtv-guide:/images/help/mail/sendmail-plus.jpg"
else
data += "wtv-guide:/images/help/mail/sendmail-classic.jpg"

View File

@@ -61,7 +61,7 @@ type in the message itself.
<td width=10>
<td width=267 valign=top>
<table align=right cellpadding=0 cellspacing=0 background="`;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "wtv-guide:/images/help/mail/sendmail-plus.jpg"
else
data += "wtv-guide:/images/help/mail/sendmail-classic.jpg"

View File

@@ -61,7 +61,7 @@ message will be sent.
<td width=10>
<td width=267 valign=top>
<table align=right cellpadding=0 cellspacing=0 background="`;
if (session_data.hasCap("client-has-tv-experience"))
if (session_data.capabilities.get("client-has-tv-experience"))
data += "wtv-guide:/images/help/mail/sendmail-plus.jpg"
else
data += "wtv-guide:/images/help/mail/sendmail-classic.jpg"

View File

@@ -361,7 +361,7 @@ document.theForm.submit();
</SCRIPT>
<input type=file device=video name=photoBlockPhoto src="cache:snapshot.jpg" invisible disabled=true>
`
if (session_data.hasCap("client-can-do-av-capture")) {
if (session_data.capabilities.get("client-can-do-av-capture")) {
data += `<tr>
<td height=32>
<img src=wtv-author:/ROMCache/pointer.gif align=absmiddle width=13 height=22 hspace=0>

View File

@@ -413,7 +413,7 @@ document.theForm.submit();
</SCRIPT>
<input type=file device=video name=photoBlockPhoto src="cache:snapshot.jpg" invisible disabled=true>
`
if (session_data.hasCap("client-can-do-av-capture")) {
if (session_data.capabilities.get("client-can-do-av-capture")) {
data += `<tr>
<td height=32>
<img src=wtv-author:/ROMCache/pointer.gif align=absmiddle width=13 height=22 hspace=0>

View File

@@ -1,5 +1,5 @@
const minisrv_service_file = true;
const canDoMuzac = session_data.hasCap('client-can-do-muzac');
const canDoMuzac = session_data.capabilities.get('client-can-do-muzac');
headers = `200 OK
Connection: Keep-Alive

View File

@@ -1265,7 +1265,7 @@ class WTVBGMusic {
if (setDefaults === true) {
// set up defaults
if (this.session_data.hasCap("client-can-do-rmf")) {
if (this.session_data.capabilities.get("client-can-do-rmf")) {
// rmf
music_obj.enableCategories = ["1", "2", "3", "7", "12", "13", "15", "16"];
music_obj.enableSongs = [
@@ -1318,7 +1318,7 @@ class WTVBGMusic {
getSong(songid) {
let musiclist;
if (this.session_data.hasCap("client-can-do-rmf")) {
if (this.session_data.capabilities.get("client-can-do-rmf")) {
// use rmf list
musiclist = this.musiclist_rmf;
} else {
@@ -1343,7 +1343,7 @@ class WTVBGMusic {
getCategorySongList(category) {
let musiclist;
if (this.session_data.hasCap("client-can-do-rmf")) {
if (this.session_data.capabilities.get("client-can-do-rmf")) {
// use rmf list
musiclist = this.musiclist_rmf;
} else {

View File

@@ -101,20 +101,20 @@ class WTVGuide {
const romtype = this.session_data.get("wtv-client-rom-type");
let boxname = "";
if (romtype == "US-WEBSTAR-disk-0MB-16MB-softmodem-CPU5230" || romtype == "US-DTV-disk-0MB-32MB-softmodem-CPU5230") boxname = "satellite receiver"
else if (this.session_data.hasCap("client-has-tv-experience")) boxname = "WebTV Plus receiver";
else if (this.session_data.capabilities.get("client-has-tv-experience")) boxname = "WebTV Plus receiver";
else boxname = "WebTV Internet terminal";
definition = definition.replace(/\<boxname\>/g, boxname);
}
// replaces <boxname_plus> with either "WebTV" or "WebTV Plus" depending on user box type
while (definition.indexOf("<boxname_plus>") >= 0) {
let boxname = "WebTV";
if (this.session_data.hasCap("client-has-tv-experience")) boxname += " Plus";
if (this.session_data.capabilities.get("client-has-tv-experience")) boxname += " Plus";
definition = definition.replace(/\<boxname\_plus\>/g, boxname);
}
// replaces <webhome> with either "Home" or "Web Home" depending on user box type
while (definition.indexOf("<webhome>") >= 0) {
let homename = "Home";
if (this.session_data.hasCap("client-has-tv-experience")) homename = "Web " + homename;
if (this.session_data.capabilities.get("client-has-tv-experience")) homename = "Web " + homename;
definition = definition.replace(/\<webhome\>/g, homename);
}
template_args = {
@@ -127,7 +127,7 @@ class WTVGuide {
// glossary letter word index
template =this.wtvshared.getTemplate("wtv-guide", "templates/glossary_word_index.js", true);
let isPlusBox = false;
if (this.session_data.hasCap("client-has-tv-experience")) isPlusBox = true;
if (this.session_data.capabilities.get("client-has-tv-experience")) isPlusBox = true;
const worddb = [];
Object.keys(glossary[subtopic.toUpperCase()]).forEach(function (k) {
if (glossary[subtopic.toUpperCase()][k].plusonly && !isPlusBox) return;