discstation 0.1.20 → 0.1.21
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/arduino/c6/DiscStation_C6.ino +7 -1
- package/arduino/v1/DiscStation.ino +4 -1
- package/install-windows.ps1 +29 -6
- package/package.json +1 -1
- package/src/discstation.py +409 -83
- package/src/discstation_burn.py +96 -18
- package/src/discstation_host.py +47 -16
- package/src/static/app.js +72 -0
- package/src/static/index.html +37 -3
- package/src/static/style.css +38 -0
- package/src/win/burn-audio.ps1 +18 -3
- package/src/win/burn-data.ps1 +21 -9
- package/src/win/burn-image.ps1 +17 -13
- package/src/win/disc-info.ps1 +13 -8
- package/src/win/play-audio-cd.ps1 +94 -0
|
@@ -510,7 +510,13 @@ void parseMessage(String msg) {
|
|
|
510
510
|
line1 = msg.substring(7);
|
|
511
511
|
line2 = "";
|
|
512
512
|
line3 = "";
|
|
513
|
-
progressPercent
|
|
513
|
+
// Don't reset progressPercent here - a STATUS: label change (e.g.
|
|
514
|
+
// "Copying files..." -> "Converting...") is often immediately
|
|
515
|
+
// followed by a fresh PROGRESS: for the same ongoing operation.
|
|
516
|
+
// Wiping it every time flipped the bar to the indeterminate dots
|
|
517
|
+
// and back on every single label update, flickering between the
|
|
518
|
+
// two. DONE:/CANCELLED:/ERROR:/NO_DISC: still reset it below - those
|
|
519
|
+
// really are the end of an operation.
|
|
514
520
|
drawStatus();
|
|
515
521
|
|
|
516
522
|
} else if (msg.startsWith("PROGRESS:")) {
|
|
@@ -535,7 +535,10 @@ void parseMessage(String msg) {
|
|
|
535
535
|
line1 = msg.substring(7);
|
|
536
536
|
line2 = "";
|
|
537
537
|
line3 = "";
|
|
538
|
-
progressPercent
|
|
538
|
+
// Don't reset progressPercent here - see arduino/c6/DiscStation_C6.ino's
|
|
539
|
+
// matching comment: STATUS: label changes mid-operation are usually
|
|
540
|
+
// immediately followed by a fresh PROGRESS:, so wiping it every time
|
|
541
|
+
// flickered the bar to the indeterminate dots and back.
|
|
539
542
|
drawStatus();
|
|
540
543
|
|
|
541
544
|
} else if (msg.startsWith("PROGRESS:")) {
|
package/install-windows.ps1
CHANGED
|
@@ -64,13 +64,32 @@ if ($winget -and -not $IsWin7) {
|
|
|
64
64
|
catch { Write-Host " yt-dlp fetch skipped" }
|
|
65
65
|
}
|
|
66
66
|
if (-not (Have "ffmpeg")) { Get-Zip "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip" $tools | Out-Null }
|
|
67
|
-
if (-not (Have "mpv")) {
|
|
67
|
+
if (-not (Have "mpv")) {
|
|
68
|
+
# The SourceForge "latest" mpv build is a .7z (Expand-Archive can't
|
|
69
|
+
# open it); mpv's own first-party CI release ships plain .zip builds.
|
|
70
|
+
try {
|
|
71
|
+
$mpvRelease = Invoke-RestMethod "https://api.github.com/repos/mpv-player/mpv/releases/tags/git-release" -UseBasicParsing -TimeoutSec 25
|
|
72
|
+
$mpvAsset = $mpvRelease.assets | Where-Object { $_.name -match "x86_64-w64-mingw32\.zip$" } | Select-Object -First 1
|
|
73
|
+
if ($mpvAsset) { Get-Zip $mpvAsset.browser_download_url (Join-Path $tools "mpv") | Out-Null }
|
|
74
|
+
} catch { Write-Host " mpv fetch skipped" }
|
|
75
|
+
}
|
|
76
|
+
if (-not (Have "HandBrakeCLI")) {
|
|
77
|
+
try {
|
|
78
|
+
$hbRelease = Invoke-RestMethod "https://api.github.com/repos/HandBrake/HandBrake/releases/latest" -UseBasicParsing -TimeoutSec 25
|
|
79
|
+
$hbAsset = $hbRelease.assets | Where-Object { $_.name -match "^HandBrakeCLI-.*-win-x86_64\.zip$" } | Select-Object -First 1
|
|
80
|
+
if ($hbAsset) { Get-Zip $hbAsset.browser_download_url (Join-Path $tools "handbrake") | Out-Null }
|
|
81
|
+
} catch { Write-Host " HandBrakeCLI fetch skipped" }
|
|
82
|
+
}
|
|
83
|
+
# dvdauthor + spumux (DVD-Video authoring/subtitles) have no winget package;
|
|
84
|
+
# this VideoHelp-hosted plain .zip (no rar/unrar needed) is the only
|
|
85
|
+
# reliable direct-download source found.
|
|
86
|
+
if (-not (Have "dvdauthor")) { Get-Zip "https://download.videohelp.com/gfd/edcounter.php?file=download/dvdauthor_winbin.zip" (Join-Path $tools "dvdauthor") | Out-Null }
|
|
68
87
|
if (Test-Path $tools) {
|
|
69
88
|
$env:Path = $env:Path + ";" + $tools + ";" +
|
|
70
89
|
((Get-ChildItem $tools -Recurse -Filter "ffmpeg.exe" -ErrorAction SilentlyContinue | Select-Object -First 1).DirectoryName)
|
|
71
90
|
}
|
|
72
91
|
Write-Host "xorriso and HandBrakeCLI have no simple direct-download URL - install manually if you need"
|
|
73
|
-
Write-Host "video-DVD
|
|
92
|
+
Write-Host "video-DVD ISO packaging / DVD ripping (see the plan's Windows setup notes)."
|
|
74
93
|
} else {
|
|
75
94
|
Write-Host "winget unavailable (Windows 7). ISO + data + audio burn work via IMAPI2."
|
|
76
95
|
Write-Host "For rip/play/video-DVD install manually: xorriso, HandBrakeCLI 1.5.1, ffmpeg, mpv, yt-dlp."
|
|
@@ -126,14 +145,18 @@ try {
|
|
|
126
145
|
$action = New-ScheduledTaskAction -Execute $pyw -Argument "`"$target`"" -WorkingDirectory $App
|
|
127
146
|
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME
|
|
128
147
|
$set = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
|
|
129
|
-
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
148
|
+
# Interactive: attaches to the logged-in desktop session, same
|
|
149
|
+
# lifecycle as `systemctl --user`/launchd LaunchAgents on the other
|
|
150
|
+
# two platforms - required so PLAY's mpv window actually renders
|
|
151
|
+
# somewhere visible (S4U runs headlessly with no session to render
|
|
152
|
+
# into, which silently made every mpv window invisible). Trade-off,
|
|
153
|
+
# same one Linux/macOS already accept: won't start until someone is
|
|
154
|
+
# logged into the desktop.
|
|
132
155
|
# RunLevel Limited (standard, non-elevated): nothing here needs admin -
|
|
133
156
|
# IMAPI2 burning, WMI reads, and binding ports >1024 all work as a normal
|
|
134
157
|
# user, and elevation is what put "Administrator" on the flashing console
|
|
135
158
|
# windows this used to spawn.
|
|
136
|
-
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType
|
|
159
|
+
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType Interactive -RunLevel Limited
|
|
137
160
|
Register-ScheduledTask -TaskName "DiscStation" -Action $action -Trigger $trigger -Settings $set -Principal $principal -Force | Out-Null
|
|
138
161
|
Start-ScheduledTask -TaskName "DiscStation"
|
|
139
162
|
} else {
|