Skip to content

Commit 3fae9f7

Browse files
authored
Merge pull request #509 from CyferShepard/unstable
Release V1.1.8
2 parents 42c5fa5 + 6734bb1 commit 3fae9f7

File tree

21 files changed

+9097
-5154
lines changed

21 files changed

+9097
-5154
lines changed

README.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,29 @@
2424

2525
## Environmental Variables
2626

27-
| Env | Default | Example | Description |
28-
|-------------------------------------|----------|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
29-
| POSTGRES_USER `REQUIRED` | `null` | `postgres` | Username that will be used in postgres database |
30-
| POSTGRES_PASSWORD `REQUIRED` | `null` | `postgres` | Password that will be used in postgres database |
31-
| POSTGRES_IP `REQUIRED` | `null` | `jellystat-db` or `192.168.0.5` | Hostname/IP of postgres instance |
32-
| POSTGRES_PORT `REQUIRED` | `null` | `5432` | Port Postgres is running on |
33-
| POSTGRES_SSL_ENABLED | `null` | `true` | Enable SSL connections to Postgres
34-
| POSTGRES_SSL_REJECT_UNAUTHORIZED | `null` | `false` | Verify Postgres SSL certificates when POSTGRES_SSL_ENABLED=true
35-
| JS_LISTEN_IP | `0.0.0.0`| `0.0.0.0` or `::` | Enable listening on specific IP or `::` for IPv6 |
36-
| JWT_SECRET `REQUIRED` | `null` | `my-secret-jwt-key` | JWT Key to be used to encrypt JWT tokens for authentication |
37-
| TZ `REQUIRED` | `null` | `Etc/UTC` | Server timezone (Can be found at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) |
38-
| JS_BASE_URL | `/` | `/` | Base url |
39-
| JS_USER | `null` | `User` | Master Override User in case username or password used during setup is forgotten (Both `JS_USER` and `JS_PASSWORD` required to work) |
40-
| JS_PASSWORD | `null` | `Password` | Master Override Password in case username or password used during setup is forgotten (Both `JS_USER` and `JS_PASSWORD` required to work) |
41-
| POSTGRES_DB | `jfstat` | `jfstat` | Name of postgres database |
42-
| REJECT_SELF_SIGNED_CERTIFICATES | `true` | `false` | Allow or deny self signed SSL certificates |
43-
| JS_GEOLITE_ACCOUNT_ID | `null` | `123456` | maxmind.com user id to be used for Geolocating IP Addresses (Can be found at https://www.maxmind.com/en/accounts/current/edit) |
44-
| JS_GEOLITE_LICENSE_KEY | `null` | `ASDWdaSdawe2sd186` | License key you need to generate on maxmind to use their services |
45-
| MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK | `1` | `10` | The minimum time (in seconds) to include a playback record, which can be used to exclude short playbacks |
46-
| IS_EMBY_API | `false` | `true` | Set to true if using Emby instead of Jellyfin |
27+
| Env | Default | Example | Description |
28+
| ----------------------------------- | --------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29+
| POSTGRES_USER `REQUIRED` | `null` | `postgres` | Username that will be used in postgres database |
30+
| POSTGRES_PASSWORD `REQUIRED` | `null` | `postgres` | Password that will be used in postgres database |
31+
| POSTGRES_IP `REQUIRED` | `null` | `jellystat-db` or `192.168.0.5` | Hostname/IP of postgres instance |
32+
| POSTGRES_PORT `REQUIRED` | `null` | `5432` | Port Postgres is running on |
33+
| POSTGRES_SSL_ENABLED | `null` | `true` | Enable SSL connections to Postgres |
34+
| POSTGRES_SSL_REJECT_UNAUTHORIZED | `null` | `false` | Verify Postgres SSL certificates when POSTGRES_SSL_ENABLED=true |
35+
| JS_LISTEN_IP | `0.0.0.0` | `0.0.0.0` or `::` | Enable listening on specific IP or `::` for IPv6 |
36+
| JWT_SECRET `REQUIRED` | `null` | `my-secret-jwt-key` | JWT Key to be used to encrypt JWT tokens for authentication |
37+
| TZ `REQUIRED` | `null` | `Etc/UTC` | Server timezone (Can be found at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) |
38+
| JS_BASE_URL | `/` | `/` | Base url |
39+
| JS_USER | `null` | `User` | Master Override User in case username or password used during setup is forgotten (Both `JS_USER` and `JS_PASSWORD` required to work) |
40+
| JS_PASSWORD | `null` | `Password` | Master Override Password in case username or password used during setup is forgotten (Both `JS_USER` and `JS_PASSWORD` required to work) |
41+
| POSTGRES_DB | `jfstat` | `jfstat` | Name of postgres database |
42+
| REJECT_SELF_SIGNED_CERTIFICATES | `true` | `false` | Allow or deny self signed SSL certificates |
43+
| JS_GEOLITE_ACCOUNT_ID | `null` | `123456` | maxmind.com user id to be used for Geolocating IP Addresses (Can be found at https://www.maxmind.com/en/accounts/current/edit) |
44+
| JS_GEOLITE_LICENSE_KEY | `null` | `ASDWdaSdawe2sd186` | License key you need to generate on maxmind to use their services |
45+
| MINIMUM_SECONDS_TO_INCLUDE_PLAYBACK | `1` | `10` | The minimum time (in seconds) to include a playback record, which can be used to exclude short playbacks |
46+
| IS_EMBY_API | `false` | `true` | Set to true if using Emby instead of Jellyfin |
47+
| JF_USE_WEBSOCKETS | `true` | `false` | Enables using Jellyfins websocket connection for session data (No effect on Emby) |
48+
| JS_USE_EXTERNAL_HOST | `false` | `true` | Prioritises using External host value for some internal communications and processes |
49+
| NEW_WATCH_EVENT_THRESHOLD_HOURS | 1 | 1-12 | This value sets the max time between watch sessions to determine if a watch is a new session or should be added onto the last session thats happened within this threshold. EG last watch within the last 1 hour. After 1 hour, a new session for the same item will be considered a new watch event. |
4750

4851
## Getting Started with Development
4952

@@ -91,4 +94,4 @@ Will set the environment variable `MYVAR` based on the contents of the `/run/sec
9194

9295
## API Documentation
9396

94-
To-do
97+
Swagger Documentation can be found at `/swagger` endpoint

backend/classes/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Config {
3030
IS_JELLYFIN: (process.env.IS_EMBY_API || "false").toLowerCase() === "false",
3131
};
3232
} catch (error) {
33+
console.log("Error fetching config:", error);
3334
return { error: "Config Details Not Found" };
3435
}
3536
}

backend/classes/emby-api.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,17 @@ class EmbyAPI {
218218
try {
219219
let url = `${this.config.JF_HOST}/Items?ParentId=${id}`;
220220

221-
let userid;
222-
if (!userid || userid == null) {
223-
await new configClass().getPreferedAdmin().then(async (adminid) => {
224-
if (!adminid || adminid == null) {
225-
userid = (await this.getAdmins())[0].Id;
226-
} else {
227-
userid = adminid;
228-
}
229-
});
230-
}
231-
url += `&userId=${userid}`;
221+
// let userid;
222+
// if (!userid || userid == null) {
223+
// await new configClass().getPreferedAdmin().then(async (adminid) => {
224+
// if (!adminid || adminid == null) {
225+
// userid = (await this.getAdmins())[0].Id;
226+
// } else {
227+
// userid = adminid;
228+
// }
229+
// });
230+
// }
231+
// url += `&userId=${userid}`;
232232

233233
if (itemid && itemid != null) {
234234
url += `&Ids=${itemid}`;

0 commit comments

Comments
 (0)