retold-remote 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retold-remote",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Retold Remote - NAS media browser with gallery views and keyboard navigation",
5
5
  "main": "source/Pict-RetoldRemote-Bundle.js",
6
6
  "bin": {
@@ -2158,18 +2158,31 @@ function setupRetoldRemoteServer(pOptions, fCallback)
2158
2158
  // If Ultravisor URL is configured, connect as a beacon
2159
2159
  if (pOptions.UltravisorURL)
2160
2160
  {
2161
- let tmpContentAPIBase = tmpFable.settings.ContentAPIURL || ('http://localhost:' + tmpPort);
2162
- let tmpContentBaseURL = tmpContentAPIBase + '/content/';
2161
+ // Discover bind addresses from network interfaces
2162
+ let tmpBindAddresses = [];
2163
+ let tmpNetworkInterfaces = require('os').networkInterfaces();
2164
+ for (let tmpIfName of Object.keys(tmpNetworkInterfaces))
2165
+ {
2166
+ for (let tmpIf of tmpNetworkInterfaces[tmpIfName])
2167
+ {
2168
+ if (!tmpIf.internal && tmpIf.family === 'IPv4')
2169
+ {
2170
+ tmpBindAddresses.push({ IP: tmpIf.address, Port: tmpPort, Protocol: 'http' });
2171
+ }
2172
+ }
2173
+ }
2174
+ // Always include loopback as a fallback
2175
+ tmpBindAddresses.push({ IP: '127.0.0.1', Port: tmpPort, Protocol: 'http' });
2163
2176
 
2164
2177
  tmpBeacon.connectBeacon(
2165
2178
  {
2166
2179
  ServerURL: pOptions.UltravisorURL,
2167
2180
  Name: 'retold-remote',
2168
2181
  ContentPath: tmpContentPath,
2169
- ContentBaseURL: tmpContentBaseURL,
2182
+ ContentBaseURL: '/content/',
2170
2183
  CacheRoot: tmpCacheRoot,
2171
2184
  StagingPath: tmpCacheRoot || process.cwd(),
2172
- BindAddresses: [{ IP: '127.0.0.1', Port: tmpPort, Protocol: 'http' }]
2185
+ BindAddresses: tmpBindAddresses
2173
2186
  },
2174
2187
  (pBeaconError) =>
2175
2188
  {