Skip to content

Commit

Permalink
Using port 1888
Browse files Browse the repository at this point in the history
  • Loading branch information
qujeee committed Jun 1, 2024
1 parent 70fcfbb commit 5e3f2ad
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
Binary file modified cinema-home/images/welcome-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions cinema-home/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ app.whenReady().then(() => {
});

try {
server.listen(80, () => {
console.log('Server running on port 80');
server.listen(1888, () => {
console.log('Server running on port 1888');
}).on('error', function(err) { console.log(err)});;
} catch (error) {
console.error(error);
}
powerSaveBlocker.start('prevent-display-sleep');
createWindow();
powerSaveBlocker.start('prevent-display-sleep');
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
});
Expand Down
4 changes: 2 additions & 2 deletions cinema-home/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions cinema-home/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cinema-home",
"version": "1.0.2",
"version": "1.0.3",
"main": "index.mjs",
"scripts": {
"start": "electron-forge start",
Expand All @@ -14,19 +14,25 @@
"appId": "com.qujeee.cinema-home",
"productName": "Cinema Home",
"mac": {
"target": ["dmg"],
"target": [
"dmg"
],
"publish": [
"github"
]
},
"win": {
"target": ["nsis"],
"target": [
"nsis"
],
"publish": [
"github"
]
},
"linux": {
"target": ["flatpak"],
"target": [
"flatpak"
],
"publish": [
"github"
]
Expand Down
8 changes: 6 additions & 2 deletions cinema-home/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ waitForDir().then((newDir) => {
console.log(error);
document.getElementById("main-image").style.visibility = 'hidden';
document.getElementById("break-image").style.visibility = 'hidden';
require('dns').lookup(require('os').hostname(), function (err, add, fam) {
document.getElementById("ip").innerText = 'Visit http://' + add.toString();
require('dns').lookup(require('os').hostname(), { family: 4 }, function (err, add, fam) {
if (err) {
console.error(err);
return;
}
document.getElementById("ip").innerText = 'Visit http://' + add.toString() + ':1888';
})

welcomeImage.style.visibility = 'visible';
Expand Down
2 changes: 1 addition & 1 deletion example/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sequence: # every time you start a movie this sequence will be played
HA: cinema_turn_off_lights
commercialAmmount: 3 # the amount of commercials that will be included in the commercial block
trailerAmount: 2 # the amount of trailers that will be inlcuded in the trailer block
trailerFetchScript: fetch_script.js #optional a Javascript script that will be called to fetch trailers (will run every 24 hours), for example: tmbd_fetch_trailers.js (make sure to run npm install axios ytdl-core when using this script)
trailerFetchScript: fetch_script.js #optional a Javascript script that will be called to fetch trailers (will run every 24 hours), for example: tmbd_fetch_trailers.js (you maybe have to run npm install axios ytdl-core before using this script)
autoBreak: true # will auto start an intermission mid movie
breakHAScript: cinema_lights_on #optional will be called when break starts
endHAScript: cinema_lights_on #optional will be called when sequence ends
Expand Down
2 changes: 1 addition & 1 deletion example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = {
```

The script needs to be placed in the same folder as the `config.yml`.
For the tmdb_fetch_trailers.js script to work you will need to run `npm install axios ytdl-core when using this script`
For the tmdb_fetch_trailers.js script to work you will maybe need to run `npm install axios ytdl-core` when using this script

## Starting Cinema Home

Expand Down
6 changes: 1 addition & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ With Cinema Home you can create a seamless cinema experience at home.
5. Enjoy!

<img src="web-ui.jpg" alt="The Cinema Home web-ui" width="340"/>
<br/>
<br/>

> You can exit Cinema Home by holding `ESC` for 5 seconds\
> Open DevTools by pressing `i`
> v1.0.0
> Open DevTools by pressing `i`

0 comments on commit 5e3f2ad

Please sign in to comment.