feat: add Hdhr.SlotsConnected and Hdhr:SlotsMax

add slot count to template and class
This commit is contained in:
2025-10-01 00:34:07 -07:00
parent 05f362153f
commit 865a2fd645
3 changed files with 12 additions and 5 deletions

View File

@@ -52,6 +52,8 @@ class Tuner
this.ModelNumber = `HDHR5-4US`; this.ModelNumber = `HDHR5-4US`;
this.FirmwareName = `hdhomerun5_atsc`; this.FirmwareName = `hdhomerun5_atsc`;
this.FirmwareVersion = `0.9.15.00-RC04`; this.FirmwareVersion = `0.9.15.00-RC04`;
this.SlotsConnected = 0;
this.SlotsMax = 10;
this.DeviceId = deviceId || Storage.Get( 'deviceId' ); this.DeviceId = deviceId || Storage.Get( 'deviceId' );
} }
@@ -193,7 +195,7 @@ class Tuner
const deviceId = await tuner.GetDeviceId( ); const deviceId = await tuner.GetDeviceId( );
*/ */
async GetDeviceId( ) GetDeviceId( )
{ {
Log.verbose( `func`, chalk.yellow( `[executed]` ), chalk.white( `📣` ), chalk.blueBright( `<name>` ), chalk.gray( `${ Utils.getFuncName( ) }` ) ); Log.verbose( `func`, chalk.yellow( `[executed]` ), chalk.white( `📣` ), chalk.blueBright( `<name>` ), chalk.gray( `${ Utils.getFuncName( ) }` ) );

View File

@@ -2488,7 +2488,11 @@ const serverHdHomeRun = http.createServer( ( req, resp ) =>
modelNumber: tunerInstance.ModelNumber, modelNumber: tunerInstance.ModelNumber,
firmwareName: tunerInstance.FirmwareName, firmwareName: tunerInstance.FirmwareName,
firmwareVersion: tunerInstance.FirmwareVersion, firmwareVersion: tunerInstance.FirmwareVersion,
slotsConnected: tunerInstance.SlotsConnected,
slotsMax: tunerInstance.SlotsMax,
deviceId: tunerInstance.GetDeviceId( ), deviceId: tunerInstance.GetDeviceId( ),
hdhrIp: `${ envIpContainer }`,
hdhrPort: `${ envHdhrPort }`,
healthTimer: envHealthTimer, healthTimer: envHealthTimer,
appRelease: envAppRelease, appRelease: envAppRelease,
@@ -2501,6 +2505,7 @@ const serverHdHomeRun = http.createServer( ( req, resp ) =>
appGitHashLong: envGitSHA1, appGitHashLong: envGitSHA1,
appUptimeShort: timeAgo.format( Date.now() - Math.round( process.uptime() ) * 1000, 'twitter' ), appUptimeShort: timeAgo.format( Date.now() - Math.round( process.uptime() ) * 1000, 'twitter' ),
appUptimeLong: timeAgo.format( Date.now() - process.uptime() * 1000, 'twitter' ), appUptimeLong: timeAgo.format( Date.now() - process.uptime() * 1000, 'twitter' ),
appUptimeFull: timeAgo.format( Date.now() - process.uptime() * 1000 ),
appStartup: Math.round( serverStartup ) / 1000, appStartup: Math.round( serverStartup ) / 1000,
serverOs: serverOs serverOs: serverOs
}, ( err, data ) => }, ( err, data ) =>

View File

@@ -101,28 +101,28 @@
<td class="file cell-file" style="color: #919191;font-weight: 400;"> <td class="file cell-file" style="color: #919191;font-weight: 400;">
TunerCount TunerCount
</td> </td>
<td class="link cell-link">0 / 10</td> <td class="link cell-link"><%= slotsConnected %> / <%= slotsMax %></td>
<td class="desc cell-desc">Number of connection slots to view IPTV</td> <td class="desc cell-desc">Number of connection slots to view IPTV</td>
</tr> </tr>
<tr> <tr>
<td class="file cell-file" style="color: #919191;font-weight: 400;"> <td class="file cell-file" style="color: #919191;font-weight: 400;">
BaseURL BaseURL
</td> </td>
<td class="link cell-link"><a href="0.0.0.0:6077" id="m3u-link" target="_blank">0.0.0.0:6077</a></td> <td class="link cell-link"><a href="https://<%= hdhrIp %>:<%= hdhrPort %>" id="m3u-link" target="_blank"><%= hdhrIp %>:<%= hdhrPort %></a></td>
<td class="desc cell-desc">Base URL where HDHomeRun is hosted</td> <td class="desc cell-desc">Base URL where HDHomeRun is hosted</td>
</tr> </tr>
<tr> <tr>
<td class="file cell-file" style="color: #919191;font-weight: 400;"> <td class="file cell-file" style="color: #919191;font-weight: 400;">
LineupURL LineupURL
</td> </td>
<td class="link cell-link"><a href="0.0.0.0:6077/lineup.jsom" id="m3u-link" target="_blank">0.0.0.0:6077/lineup.json</a></td> <td class="link cell-link"><a href="https://<%= hdhrIp %>:<%= hdhrPort %>/lineup.json" id="m3u-link" target="_blank"><%= hdhrIp %>:<%= hdhrPort %>/lineup.json</a></td>
<td class="desc cell-desc">URL to IPTV channel & guide lineups</td> <td class="desc cell-desc">URL to IPTV channel & guide lineups</td>
</tr> </tr>
<tr> <tr>
<td class="file cell-file" style="color: #919191;font-weight: 400;"> <td class="file cell-file" style="color: #919191;font-weight: 400;">
Uptime Uptime
</td> </td>
<td class="link cell-link">12 minutes, 23 seconds</td> <td class="link cell-link"><%= appUptimeFull %></td>
<td class="desc cell-desc">Duration that tuner has been online</td> <td class="desc cell-desc">Duration that tuner has been online</td>
</tr> </tr>
</tbody> </tbody>