Skip to content

Commit 53f0af8

Browse files
authored
Merge pull request #39 from Ipmake/dev
Update Version v1.1.0
2 parents 2961a34 + fec1749 commit 53f0af8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+8178
-5956
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ VOLUME /app/data
1616

1717
COPY frontend/build/ /app/www/
1818

19-
CMD ["node", "dist/index.js"]
19+
CMD ["npm", "start"]

README.md

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fixing Plex's old and simple UI.
88
*Click image for video*
99
[![Nevu1](assets/screenshot1.png)](https://www.youtube.com/watch?v=PuTOw3Wg9oY)
1010
![Nevu2](assets/screenshot2.png)
11-
11+
[More Screenshots](https://github.com/Ipmake/Nevu/tree/main/assets)
1212

1313
## Description
1414

@@ -22,14 +22,14 @@ Mind that this project is still in development and may be unstable.
2222

2323

2424
## Features
25-
- Modern UI
25+
- Modern, Netflix-like UI
2626
- Seamless Plex integration
27-
- Netflix-like UI
2827
- Play media
2928
- Browse libraries
3029
- Search for media
3130
- Watch Together (Nevu Sync)
3231
- Get Recommendations
32+
- Fully integrated Watchlist
3333
- Simple and easy to use
3434
- Pro-User features (like special shortcuts etc.)
3535

@@ -40,18 +40,45 @@ Mind that this project is still in development and may be unstable.
4040
The easiest way to run Nevu is to use Docker. You can use the following command to run Nevu in a Docker container:
4141

4242
```bash
43-
docker run --name nevu -p 3000:3000 -e PLEX_SERVER=http://your-plex-server:32400 ipmake/nevu
43+
docker volume create nevu_data
44+
docker run --name nevu -p 3000:3000 -v nevu_data:/data -e PLEX_SERVER=http://your-plex-server:32400 ipmake/nevu
4445
```
4546

46-
#### Environment Variables
47-
| Name | Type | Required | Description |
48-
|------------------------|------------|----------|-----------------------------------------------------------------------------|
49-
| PLEX_SERVER | string | Yes | The URL of the Plex server that the frontend will connect to |
50-
| PROXY_PLEX_SERVER | string | No | The URL of the Plex server to proxy requests to |
51-
| DISABLE_PROXY | true/false | No | If set to true, the proxy will be disabled and all requests go directly to the Plex server from the frontend (NOT RECOMMENDED) |
52-
| DISABLE_TLS_VERIFY | true/false | No | If set to true, the proxy will not check any https ssl certificates |
53-
| DISABLE_NEVU_SYNC | true/false | No | If set to true, Nevu sync (watch together) will be disabled |
54-
| DISABLE_REQUEST_LOGGING| true/false | No | If set to true, the server will not log any requests |
47+
### Docker Compose
48+
49+
Alternatively, you can use Docker Compose to run Nevu. Create a `docker-compose.yml` file with the following content:
50+
51+
```yaml
52+
services:
53+
nevu:
54+
image: ipmake/nevu
55+
container_name: nevu
56+
ports:
57+
- "3000:3000"
58+
volumes:
59+
- nevu_data:/data
60+
environment:
61+
- PLEX_SERVER=http://your-plex-server:32400
62+
63+
volumes:
64+
nevu_data:
65+
```
66+
67+
Then run:
68+
69+
```bash
70+
docker-compose up -d
71+
```
72+
73+
### Environment Variables
74+
| Name | Type | Required | Description |
75+
|--------------------------|------------|----------|-----------------------------------------------------------------------------|
76+
| `PLEX_SERVER` | string | Yes | The URL of the Plex server that the frontend will connect to |
77+
| `PROXY_PLEX_SERVER` | string | No | The URL of the Plex server to proxy requests to |
78+
| `DISABLE_PROXY` | true/false | No | If set to true, the proxy will be disabled and all requests go directly to the Plex server from the frontend (NOT RECOMMENDED) |
79+
| `DISABLE_TLS_VERIFY` | true/false | No | If set to true, the proxy will not check any https ssl certificates |
80+
| `DISABLE_NEVU_SYNC` | true/false | No | If set to true, Nevu sync (watch together) will be disabled |
81+
| `DISABLE_REQUEST_LOGGING`| true/false | No | If set to true, the server will not log any requests |
5582

5683

5784

@@ -70,4 +97,4 @@ npm start
7097
# Terminal 2
7198
cd backend
7299
PLEX_SERVER=http://plex-server:32400 npm start
73-
```
100+
```

assets/screenshot1.png

-1.27 MB
Loading

assets/screenshot2.png

801 KB
Loading

assets/screenshot3.png

161 KB
Loading

backend/src/index.ts

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,29 +155,54 @@ app.get('/config', (req, res) => {
155155
});
156156

157157
app.get('/user/options', async (req, res) => {
158-
if(!req.headers['X-Plex-Token']) return res.status(401).send('Unauthorized');
158+
if(!req.headers['x-plex-token']) return res.status(401).send('Unauthorized');
159159

160-
const user = await CheckPlexUser(req.headers['X-Plex-Token'] as string);
161-
if(!user) return res.status(401).send('Unauthorized');
160+
const user = await CheckPlexUser(req.headers['x-plex-token'] as string);
161+
if(!user) return res.status(401).send('Unauthorized user');
162162

163163
const options = await prisma.userOption.findMany({
164164
where: {
165165
userUid: user.uuid,
166166
}
167-
}).catch(() => {
167+
}).catch((err) => {
168168
res.status(500).send('Internal server error');
169+
console.log(err);
169170
return null;
170171
});
171172
if(!options) return;
172173

173174
res.send(options);
174175
});
175176

177+
app.get('/user/options/:key', async (req, res) => {
178+
if(!req.headers['x-plex-token']) return res.status(401).send('Unauthorized');
179+
180+
const user = await CheckPlexUser(req.headers['x-plex-token'] as string);
181+
if(!user) return res.status(401).send('Unauthorized user');
182+
183+
const { key } = req.params;
184+
if(!key) return res.status(400).send('Bad request');
185+
186+
const option = await prisma.userOption.findFirst({
187+
where: {
188+
userUid: user.uuid,
189+
key,
190+
}
191+
}).catch((err) => {
192+
res.status(500).send('Internal server error');
193+
console.log(err);
194+
return null;
195+
});
196+
if(!option) return res.status(404).send('Option not found');
197+
res.send(option);
198+
});
199+
200+
176201
app.post('/user/options', async (req, res) => {
177-
if(!req.headers['X-Plex-Token']) return res.status(401).send('Unauthorized');
202+
if(!req.headers['x-plex-token']) return res.status(401).send('Unauthorized');
178203

179-
const user = await CheckPlexUser(req.headers['X-Plex-Token'] as string);
180-
if(!user) return res.status(401).send('Unauthorized');
204+
const user = await CheckPlexUser(req.headers['x-plex-token'] as string);
205+
if(!user) return res.status(401).send('Unauthorized user');
181206

182207
const { key, value } = req.body;
183208

@@ -198,8 +223,9 @@ app.post('/user/options', async (req, res) => {
198223
key,
199224
value,
200225
}
201-
}).catch(() => {
226+
}).catch((err) => {
202227
res.status(500).send('Internal server error');
228+
console.log(err);
203229
return null;
204230
});
205231
if(!option) return;

0 commit comments

Comments
 (0)