plexsonic 0.1.0

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/.env.example ADDED
@@ -0,0 +1,16 @@
1
+ PORT=3127
2
+ BIND_HOST=127.0.0.1
3
+ # Optional public URL override for callback generation.
4
+ # Leave empty to derive from incoming request headers.
5
+ BASE_URL=
6
+ SQLITE_PATH=./data/app.db
7
+ SESSION_SECRET=change-this-session-secret-before-production
8
+ # 32-byte key in hex or base64 for Plex token encryption.
9
+ TOKEN_ENC_KEY=
10
+ PLEX_PRODUCT=Plexsonic Bridge
11
+ # Stable client identifier recommended for Plex PIN flow.
12
+ PLEX_CLIENT_IDENTIFIER=
13
+ LICENSE_EMAIL=
14
+ PLEX_INSECURE_TLS=0
15
+ LOG_LEVEL=warn
16
+ LOG_REQUESTS=0
package/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Copyright 2026 Yukino Song, SudoMaker Ltd.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright JS Foundation and other contributors, http://js.foundation
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,192 @@
1
+ # Plexsonic
2
+
3
+ Plexsonic is a local bridge that exposes a Plex music library through Subsonic/OpenSubsonic-compatible endpoints.
4
+
5
+ It provides:
6
+ - Local account signup/login
7
+ - Plex account linking via Plex PIN
8
+ - Plex server and music library selection
9
+ - Subsonic-compatible `/rest/*.view` API for clients
10
+ - Web test page for manual API checks
11
+ - Playback/scrobble/rating/playlist actions mapped to Plex
12
+
13
+ To support this project, please subscribe to my [Patreon](https://www.patreon.com/ClassicOldSong).
14
+
15
+ [![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3DClassicOldsong%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/ClassicOldsong)
16
+
17
+ ## Requirements
18
+
19
+ - Node.js 18+ (Node 20 recommended)
20
+ - `pnpm`
21
+ - A reachable Plex Media Server with a music library
22
+ - A Plex account with access to that server
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ pnpm install
28
+ cp .env.example .env
29
+ ```
30
+
31
+ ### Global CLI install
32
+
33
+ Install globally from this repo:
34
+
35
+ ```bash
36
+ pnpm add -g .
37
+ ```
38
+
39
+ Then run:
40
+
41
+ ```bash
42
+ plexsonic
43
+ ```
44
+
45
+ ## Configuration
46
+
47
+ Edit `.env`:
48
+
49
+ ```env
50
+ PORT=3127
51
+ BIND_HOST=127.0.0.1
52
+ BASE_URL=
53
+ SQLITE_PATH=./data/app.db
54
+ SESSION_SECRET=replace-with-a-long-random-secret
55
+ TOKEN_ENC_KEY=
56
+ PLEX_PRODUCT=Plexsonic Bridge
57
+ PLEX_CLIENT_IDENTIFIER=
58
+ LICENSE_EMAIL=
59
+ PLEX_INSECURE_TLS=0
60
+ LOG_LEVEL=warn
61
+ LOG_REQUESTS=0
62
+ ```
63
+
64
+ ### Important env vars
65
+
66
+ - `PORT`: HTTP port (default `3127`).
67
+ - `BIND_HOST`: listen interface (`127.0.0.1` local only, `0.0.0.0` for LAN).
68
+ - `BASE_URL`: optional public URL override used for callback generation. If empty, origin is derived from request headers.
69
+ - `SESSION_SECRET`: cookie/session signing secret. Keep stable across restarts.
70
+ - `TOKEN_ENC_KEY`: optional but recommended 32-byte key (hex or base64) used to encrypt stored Plex tokens.
71
+ - `LOG_LEVEL`: logger level (`trace`, `debug`, `info`, `warn`, `error`, `fatal`).
72
+ - `LOG_REQUESTS`: set to `1` to enable incoming request logs. Very verbose, and can expose your login credeitial. (`0` by default).
73
+
74
+ Generate secrets (examples):
75
+
76
+ ```bash
77
+ # SESSION_SECRET
78
+ openssl rand -hex 32
79
+
80
+ # TOKEN_ENC_KEY (hex)
81
+ openssl rand -hex 32
82
+ ```
83
+
84
+ ## Run
85
+
86
+ ```bash
87
+ pnpm start
88
+ ```
89
+
90
+ Or, if installed globally:
91
+
92
+ ```bash
93
+ plexsonic
94
+ ```
95
+
96
+ Dev mode:
97
+
98
+ ```bash
99
+ pnpm dev
100
+ ```
101
+
102
+ ## Docker
103
+
104
+ Build and run with Compose:
105
+
106
+ ```bash
107
+ docker compose up -d --build
108
+ ```
109
+
110
+ Notes:
111
+ - Compose maps `3127:3127`.
112
+ - `./data` is mounted to `/app/data` for SQLite persistence.
113
+ - `docker-compose.yml` uses `${VAR:-default}` interpolation.
114
+ - You should change at least:
115
+ - `SESSION_SECRET`
116
+ - `TOKEN_ENC_KEY` (recommended)
117
+ - `BASE_URL` only if auto-detected origin is wrong in your proxy/network setup
118
+
119
+ Override via CLI (without editing compose):
120
+
121
+ ```bash
122
+ SESSION_SECRET='replace-me' \
123
+ TOKEN_ENC_KEY='your-32-byte-key' \
124
+ BASE_URL='http://192.168.1.50:3127' \
125
+ docker compose up -d --build
126
+ ```
127
+
128
+ Or with an env file:
129
+
130
+ ```bash
131
+ docker compose --env-file .env up -d --build
132
+ ```
133
+
134
+ Stop:
135
+
136
+ ```bash
137
+ docker compose down
138
+ ```
139
+
140
+ Health check:
141
+
142
+ ```bash
143
+ curl http://127.0.0.1:3127/health
144
+ ```
145
+
146
+ ## Web Setup Flow
147
+
148
+ 1. Open `http://127.0.0.1:3127/signup`
149
+ 2. Create a local Plexsonic account
150
+ 3. Link Plex (`/link/plex`) and complete PIN auth
151
+ 4. Select Plex server
152
+ 5. Select music library
153
+ 6. Open `/test` to run quick API checks
154
+
155
+ ## Using From Subsonic/OpenSubsonic Clients
156
+
157
+ Use:
158
+ - Server URL: `http://<host>:3127`
159
+ - Username/password: your local Plexsonic account
160
+
161
+ ### Endpoint suffix compatibility
162
+
163
+ Both endpoint styles are accepted:
164
+ - `/rest/getArtists.view`
165
+ - `/rest/getArtists`
166
+
167
+ ## Expose to LAN
168
+
169
+ Set:
170
+
171
+ ```env
172
+ BIND_HOST=0.0.0.0
173
+ # Optional when auto-detection is not correct:
174
+ # BASE_URL=http://<your-lan-ip>:3127
175
+ ```
176
+
177
+ Then:
178
+ - Open firewall inbound TCP `3127`
179
+ - Keep it LAN-only (do not expose directly to the internet)
180
+
181
+ If you run behind a reverse proxy, forward `X-Forwarded-Proto` and `X-Forwarded-Host` so Plex PIN callbacks use the correct public origin.
182
+
183
+ Without HTTPS, credentials travel unencrypted on your network.
184
+
185
+ ## Notes
186
+
187
+ - This project currently targets practical client compatibility over strict parity with any single server implementation.
188
+ - Some Subsonic features may be partially implemented or client-dependent.
189
+
190
+ ## License
191
+
192
+ Apache-2.0
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ /* Copyright Yukino Song, SudoMaker Ltd.
3
+ *
4
+ * Licensed to the Apache Software Foundation (ASF) under one
5
+ * or more contributor license agreements. See the NOTICE file
6
+ * distributed with this work for additional information
7
+ * regarding copyright ownership. The ASF licenses this file
8
+ * to you under the Apache License, Version 2.0 (the
9
+ * "License"); you may not use this file except in compliance
10
+ * with the License. You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing,
15
+ * software distributed under the License is distributed on an
16
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ * KIND, either express or implied. See the License for the
18
+ * specific language governing permissions and limitations
19
+ * under the License.
20
+ */
21
+
22
+ import '../src/index.js';
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "plexsonic",
3
+ "version": "0.1.0",
4
+ "description": "PlexMusic to OpenSubsonic bridge",
5
+ "main": "./src/index.js",
6
+ "bin": {
7
+ "plexsonic": "./bin/plexsonic.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "src/",
12
+ "README.md",
13
+ "LICENSE",
14
+ ".env.example"
15
+ ],
16
+ "type": "module",
17
+ "scripts": {
18
+ "dev": "node --watch src/index.js",
19
+ "start": "node src/index.js"
20
+ },
21
+ "dependencies": {
22
+ "@fastify/cookie": "^11.0.2",
23
+ "@fastify/formbody": "^8.0.2",
24
+ "@fastify/session": "^11.1.0",
25
+ "argon2": "^0.41.1",
26
+ "better-sqlite3": "^11.7.2",
27
+ "dotenv": "^16.6.1",
28
+ "fastify": "^5.1.0",
29
+ "pino-pretty": "^13.1.3"
30
+ },
31
+ "pnpm": {
32
+ "onlyBuiltDependencies": [
33
+ "argon2",
34
+ "better-sqlite3"
35
+ ]
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/ClassicOldSong/Plexsonic.git"
40
+ },
41
+ "author": "Yukino Song <yukino@sudomaker.com>",
42
+ "license": "Apache-2.0",
43
+ "bugs": "https://github.com/ClassicOldSong/Plexsonic/issues",
44
+ "homepage": "https://github.com/ClassicOldSong/Plexsonic"
45
+ }
package/src/config.js ADDED
@@ -0,0 +1,96 @@
1
+ /* Copyright Yukino Song, SudoMaker Ltd.
2
+ *
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+ import 'dotenv/config';
22
+ import { createHash } from 'node:crypto';
23
+ import path from 'node:path';
24
+
25
+ const DEFAULT_PORT = 3127;
26
+ const DEFAULT_HOST = '127.0.0.1';
27
+ const DEFAULT_PLEX_PRODUCT = 'Plexsonic Bridge';
28
+ const DEFAULT_SESSION_SECRET = 'dev-session-secret-change-me-before-production-plexsonic';
29
+ const DEFAULT_LOG_LEVEL = 'warn';
30
+ const DEFAULT_LOG_REQUESTS = false;
31
+
32
+ function parsePort(rawPort) {
33
+ const value = Number.parseInt(rawPort ?? `${DEFAULT_PORT}`, 10);
34
+ if (!Number.isInteger(value) || value < 1 || value > 65535) {
35
+ throw new Error(`Invalid PORT: ${rawPort}`);
36
+ }
37
+ return value;
38
+ }
39
+
40
+ function deriveClientIdentifier(seed) {
41
+ return createHash('sha256').update(seed).digest('hex').slice(0, 32);
42
+ }
43
+
44
+ function normalizeSessionSecret(rawSecret) {
45
+ const secret = rawSecret || DEFAULT_SESSION_SECRET;
46
+ if (secret.length >= 32) {
47
+ return secret;
48
+ }
49
+ return createHash('sha256').update(secret).digest('hex');
50
+ }
51
+
52
+ function parseBoolean(value, fallback = false) {
53
+ if (value == null || value === '') {
54
+ return fallback;
55
+ }
56
+ const normalized = String(value).trim().toLowerCase();
57
+ return ['1', 'true', 'yes', 'on'].includes(normalized);
58
+ }
59
+
60
+ function normalizeOptionalBaseUrl(rawBaseUrl) {
61
+ const value = String(rawBaseUrl || '').trim();
62
+ if (!value) {
63
+ return null;
64
+ }
65
+ try {
66
+ const parsed = new URL(value);
67
+ const normalizedPath = parsed.pathname.replace(/\/+$/, '');
68
+ const pathname = normalizedPath && normalizedPath !== '/' ? normalizedPath : '';
69
+ return `${parsed.protocol}//${parsed.host}${pathname}`;
70
+ } catch {
71
+ throw new Error(`Invalid BASE_URL: ${rawBaseUrl}`);
72
+ }
73
+ }
74
+
75
+ export function loadConfig(env = process.env) {
76
+ const port = parsePort(env.PORT);
77
+ const bindHost = env.BIND_HOST || DEFAULT_HOST;
78
+ const baseUrl = normalizeOptionalBaseUrl(env.BASE_URL);
79
+ const sqlitePath = env.SQLITE_PATH || './data/app.db';
80
+
81
+ return {
82
+ bindHost,
83
+ baseUrl,
84
+ port,
85
+ sqlitePath,
86
+ sessionSecret: normalizeSessionSecret(env.SESSION_SECRET),
87
+ tokenEncKey: env.TOKEN_ENC_KEY || null,
88
+ plexInsecureTls: env.PLEX_INSECURE_TLS === '1',
89
+ plexProduct: env.PLEX_PRODUCT || DEFAULT_PLEX_PRODUCT,
90
+ plexClientIdentifier:
91
+ env.PLEX_CLIENT_IDENTIFIER || deriveClientIdentifier(path.resolve(sqlitePath)),
92
+ licenseEmail: env.LICENSE_EMAIL || '',
93
+ logLevel: env.LOG_LEVEL || DEFAULT_LOG_LEVEL,
94
+ logRequests: parseBoolean(env.LOG_REQUESTS, DEFAULT_LOG_REQUESTS),
95
+ };
96
+ }