discstation 0.1.0 → 0.1.1
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/install-macos.sh +7 -0
- package/install-windows.ps1 +7 -2
- package/install.sh +5 -0
- package/package.json +2 -1
- package/requirements-optional.txt +14 -0
- package/requirements.txt +1 -16
package/install-macos.sh
CHANGED
|
@@ -37,6 +37,13 @@ if [[ -f "$ROOT_DIR/requirements.txt" ]]; then
|
|
|
37
37
|
else
|
|
38
38
|
"$VENV_DIR/bin/python" -m pip install pyserial mutagen requests yt-dlp
|
|
39
39
|
fi
|
|
40
|
+
# Optional metadata deps — best effort. python-libdiscid (a C extension) is
|
|
41
|
+
# Linux-only in requirements-optional.txt; on macOS install the pure-Python
|
|
42
|
+
# bits and let brew's libdiscid cover disc IDs via the CLI tools.
|
|
43
|
+
if [[ -f "$ROOT_DIR/requirements-optional.txt" ]]; then
|
|
44
|
+
"$VENV_DIR/bin/python" -m pip install musicbrainzngs tmdbsimple \
|
|
45
|
+
|| printf 'Optional metadata deps skipped (host still works).\n'
|
|
46
|
+
fi
|
|
40
47
|
|
|
41
48
|
DISC_DEVICE="${DISC_DEVICE:-}"
|
|
42
49
|
DISC_PORT="${DISC_PORT:-$(ls /dev/cu.usbserial-* /dev/cu.usbmodem-* 2>/dev/null | head -1)}"
|
package/install-windows.ps1
CHANGED
|
@@ -12,11 +12,16 @@ New-Item -ItemType Directory -Force -Path $App, $Venv | Out-Null
|
|
|
12
12
|
Copy-Item -Recurse -Force (Join-Path $Root "src\*") $App
|
|
13
13
|
py -3 -m venv $Venv
|
|
14
14
|
& (Join-Path $Venv "Scripts\python.exe") -m pip install --upgrade pip
|
|
15
|
+
$Py = Join-Path $Venv "Scripts\python.exe"
|
|
15
16
|
$Req = Join-Path $Root "requirements.txt"
|
|
16
17
|
if (Test-Path $Req) {
|
|
17
|
-
&
|
|
18
|
+
& $Py -m pip install -r $Req
|
|
18
19
|
} else {
|
|
19
|
-
&
|
|
20
|
+
& $Py -m pip install pyserial mutagen requests yt-dlp
|
|
21
|
+
}
|
|
22
|
+
# Optional metadata deps — best effort, never fatal.
|
|
23
|
+
try { & $Py -m pip install musicbrainzngs tmdbsimple } catch {
|
|
24
|
+
Write-Host "Optional metadata deps skipped (host still works)."
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
Write-Host "DiscStation host files installed at $App"
|
package/install.sh
CHANGED
|
@@ -36,6 +36,11 @@ if [[ -f "$ROOT_DIR/requirements.txt" ]]; then
|
|
|
36
36
|
else
|
|
37
37
|
"$VENV_DIR/bin/python" -m pip install pyserial mutagen requests yt-dlp
|
|
38
38
|
fi
|
|
39
|
+
# Optional metadata/detection deps — best effort, never fatal.
|
|
40
|
+
if [[ -f "$ROOT_DIR/requirements-optional.txt" ]]; then
|
|
41
|
+
"$VENV_DIR/bin/python" -m pip install -r "$ROOT_DIR/requirements-optional.txt" \
|
|
42
|
+
|| printf 'Optional metadata deps skipped (host still works).\n'
|
|
43
|
+
fi
|
|
39
44
|
|
|
40
45
|
if [[ ! -f "$CONFIG_DIR/server.crt" || ! -f "$CONFIG_DIR/server.key" ]]; then
|
|
41
46
|
openssl req -x509 -newkey rsa:2048 -nodes -days 3650 \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discstation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "DiscStation optical-media appliance host — one cross-OS installer",
|
|
5
5
|
"bin": {
|
|
6
6
|
"discstation-setup": "scripts/setup.mjs"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"install-macos.sh",
|
|
28
28
|
"install-windows.ps1",
|
|
29
29
|
"requirements.txt",
|
|
30
|
+
"requirements-optional.txt",
|
|
30
31
|
"discstation.env.example",
|
|
31
32
|
"README.md",
|
|
32
33
|
"LICENSE"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Optional — richer disc detection + metadata. The host runs fine without any
|
|
2
|
+
# of these (it falls back to subprocess parsing / degraded metadata).
|
|
3
|
+
# Installed best-effort: a build failure here is NOT fatal.
|
|
4
|
+
#
|
|
5
|
+
# On Debian/Ubuntu prefer the apt packages (see install.sh):
|
|
6
|
+
# python3-pyudev python3-libdiscid python3-musicbrainzngs
|
|
7
|
+
#
|
|
8
|
+
# python-libdiscid is a C extension and needs the libdiscid dev headers +
|
|
9
|
+
# a compiler; on macOS/Windows it often won't build and is simply skipped.
|
|
10
|
+
|
|
11
|
+
pyudev>=0.24 ; sys_platform == "linux"
|
|
12
|
+
python-libdiscid>=2.0 ; sys_platform == "linux"
|
|
13
|
+
musicbrainzngs>=0.7.1
|
|
14
|
+
tmdbsimple>=2.9
|
package/requirements.txt
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
# DiscStation
|
|
2
|
-
#
|
|
3
|
-
# On Debian/Ubuntu, prefer the system packages (see install.sh):
|
|
4
|
-
# python3-serial python3-mutagen python3-requests python3-pyudev
|
|
5
|
-
# python3-libdiscid python3-musicbrainzngs
|
|
6
|
-
# The pip names below are for venv / macOS / Windows installs.
|
|
7
|
-
|
|
1
|
+
# Core DiscStation host dependencies — must install.
|
|
8
2
|
pyserial>=3.5
|
|
9
3
|
mutagen>=1.45
|
|
10
4
|
requests>=2.28
|
|
11
5
|
yt-dlp>=2024.1.1
|
|
12
|
-
|
|
13
|
-
# Disc detection / metadata (all optional at runtime: the code degrades to the
|
|
14
|
-
# previous subprocess-based paths if an import fails).
|
|
15
|
-
pyudev>=0.24 ; sys_platform == "linux"
|
|
16
|
-
python-libdiscid>=2.0 ; sys_platform != "win32"
|
|
17
|
-
musicbrainzngs>=0.7.1
|
|
18
|
-
|
|
19
|
-
# Video metadata (TMDb). Needs DISCSTATION_TMDB_API_KEY to do anything.
|
|
20
|
-
tmdbsimple>=2.9
|