Skip to content

Commit

Permalink
Merge pull request #122 from erikrichardlarson/more-updates
Browse files Browse the repository at this point in the history
Album updates
  • Loading branch information
erikrichardlarson authored Jan 15, 2024
2 parents 653bc55 + 285692e commit 90ab1b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion public/album_art.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

const setupWebSocket = (elements) => {
const socket = new WebSocket('ws://10.0.0.162:3000');
const socket = new WebSocket('ws://WEBSOCKET_IP:3000');

socket.addEventListener('message', (event) => {
const trackDetails = JSON.parse(event.data);
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ app.on("ready", async () => {
const destCssPath = join(userDataPath, 'tailwind.css');

try {
const localIP = getLocalIP();
let data = await fs.promises.readFile(sourceHtmlPath, 'utf8');
data = data.replace('WEBSOCKET_IP', localIP);
await fs.promises.writeFile(sourceHtmlPath, data, 'utf8');
await Promise.all([
copy(sourceCssPath, destCssPath),
copy(sourceHtmlPath, destHtmlPath),
]);
const localIP = getLocalIP();
let data = await fs.promises.readFile(destHtmlPath, 'utf8');
data = data.replace('WEBSOCKET_IP', localIP);
await fs.promises.writeFile(destHtmlPath, data, 'utf8');
} catch(err) {
console.error(`Error occurred during file copy: ${err}`);
}
Expand Down

0 comments on commit 90ab1b8

Please sign in to comment.