25 Commits

Author SHA1 Message Date
478f5928d4 Fix dashboard settings panel closing on auto-refresh
Replace full innerHTML re-render with incremental DOM updates:
- renderedDisks map tracks what's already in the DOM
- On refresh: only update diskProgress_KEY and diskBtns_KEY elements
- Full card re-render only on first appearance or state/disk_id change
- If an edited disk disconnects: toast error, panel removed cleanly
- openPanels Set persists panel open state across partial updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.9
2026-05-21 22:03:58 +03:00
839ff494a4 Switch dashboard to watcher-based multi-disk view, fix transcoding FPS display
- dashboard.html: remove standalone "Mounted Disk" input panel; show all disks
  from GET /api/disks (watcher), auto-refresh every 5s
- detect.go: use avg_frame_rate when r_frame_rate is unrealistic (>120 fps or 0),
  fixes MJPEG/mjpeg showing 90000fps
- transcoder.go: parse fps= from ffmpeg progress output and expose in Progress struct
- copier.go: update task message with real-time encoding fps (@ 45.3 fps),
  clear speed_bps/eta during transcoding to avoid showing stale copy speed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.8
2026-05-21 21:51:39 +03:00
2bad23da3a Add configurable shuffle depth for copy order
ShuffleDepth in DiskProfile controls how files are selected:
  -1 = no shuffle (preserve source order)
   0 = all files in random order
   N = group files by folder at depth N from /media, shuffle groups,
       copy entire group before moving to next

Exposed in disk profile UI as a select with level descriptions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.7
2026-05-21 21:30:55 +03:00
0a17d11bd1 Revert to Docker-only source paths, fix config validation, improve transcoding info
- handlers_sources.go: revert to relative paths rooted at /media (remove standalone absolute-path mode)
- settings.html: remove manual path input, restore auto-loading source tree from /media
- config.go: remove filesystem existence checks from Validate() — paths may be temporarily unavailable
- transcoder.go: always specify fps in ffmpeg args when MaxFPS is set, preserving source fps if lower than limit
- copier.go: include source codec/format and target codec/format in transcoding task message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 21:28:28 +03:00
e885e49647 Show disk profile panel via Settings button
Profile panel is now hidden by default; a gear Settings button in
the disk card toggles it open/closed. Reduces visual clutter for
the common case when no profile changes are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.6
2026-05-21 21:09:52 +03:00
70d301f78f Remove native folder picker, use text input instead
Native OS dialog (zenity/AppleScript/PowerShell) fails on Linux with
"native folder picker is not supported on this platform". Replaced:
- dashboard: removed the "+" button, users type mount path manually
- settings: replaced "Add source folder" native dialog with inline
  text input field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 21:08:00 +03:00
9fd02fb5bf Add per-disk profiles with video transcoding support
Each disk stores .jukebox/profile.json with copy parameters (dest
folder, overwrite mode, file select, reserve space, auto-copy) and
optional transcoding limits for the target player (codec, resolution,
bitrate, FPS, audio channels, output format).

On copy, video files are probed with ffprobe; if they exceed the
profile limits they are transcoded via ffmpeg (-threads 0 for full
CPU usage), otherwise copied as-is. Scale filter never upscales.

New: internal/disk/profile.go, internal/transcoder/{detect,transcoder}.go
API: GET/PUT /api/disks/profile?mount_path=
UI: disk profile panel in dashboard for known disks
Dockerfile: adds ffmpeg to the runtime image

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.5
2026-05-21 20:52:46 +03:00
6953c151fe Add configurable allowed file types 2026-04-24 16:36:48 +03:00
50246ada85 Add standalone desktop workflow 2026-04-24 11:54:33 +03:00
75c6b928ae Tighten disk safety checks v1.4 2026-04-24 07:18:17 +03:00
b8eabee393 Store unfinished tasks on disks 2026-04-24 07:10:26 +03:00
0afc1d761b Fix empty disk mount detection 2026-04-23 22:58:07 +03:00
e7917b41b5 Improve disk UI and build performance 2026-04-23 22:51:36 +03:00
31bac2b5d8 Add multi-disk copy workflow 2026-04-23 22:24:32 +03:00
5b3cb9e393 copier: прогресс по байтам, скорость и ETA
- Прогрессбар по скопированным байтам (doneBytes / totalBytes)
- SpeedBPS и ETASec добавлены в Task
- Dashboard показывает скорость (МБ/с) и ETA справа от прогрессбара

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.3
2026-04-23 22:00:14 +03:00
7c5736b935 copier: rsync, случайный порядок, папка назначения, права 777
- rsync --partial --append-verify для возобновления передачи
- --no-perms --chmod=ugo=rwx — права 777 на диске
- Структура: <mount>/<dest_folder>/<rel path from /media>, default media
- Shuffle файлов перед копированием
- Диск заполняется пока есть место, файлы которые не влезают пропускаются
- Прогресс по количеству обработанных файлов
- rsync добавлен в Dockerfile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.2
2026-04-23 21:57:57 +03:00
8f36d4e824 copier: rsync с возобновлением, папка назначения, права 777
- Заменить ручное копирование на rsync --partial --append-verify
- Структура на диске: <mount>/<dest_folder>/<rel path from /media>
- dest_folder настраивается (default: media)
- Права на диске: --no-perms --chmod=ugo=rwx
- rsync добавлен в Dockerfile
- Режим "удалить": удаляет только dest_folder, а не весь диск

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:56:26 +03:00
f2a7505378 ops: merge build and push into single build-image.sh
Если указан image — собирает мультиарч и пушит.
Если image пустой — локальная сборка без пуша.
push-image.sh удалён.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.1
2026-04-23 21:48:52 +03:00
7b68c66725 ops: simplify to single Image prompt instead of registry+owner
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:47:35 +03:00
0df89bdff0 ops: fix interactive prompts (printf to stderr, no subshell)
printf шёл в stdout внутри $(...), поэтому prompt не выводился
и read висел. Теперь prompt идёт в stderr напрямую.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:46:07 +03:00
83d6ad5134 ops: remove hardcoded registry and owner from scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:43:32 +03:00
2355d32766 ops: add registry prefix to build-image, add push-image script
build-image.sh теперь тегирует как git.mchus.pro/reanimator/jukebox-maker.
push-image.sh собирает мультиарч образ и пушит в Gitea registry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:41:14 +03:00
28ca583073 Fix Dockerfile: bump builder to golang:1.25-alpine
go.mod requires go 1.25.0 (generated by local go 1.26).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:35:16 +03:00
29f3ad9576 Add jukebox_maker web app v1.0
Go web application for filling USB drives with media files.
Runs in Docker on Unraid with /media, /mnt/usb, /config volumes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.0
2026-04-23 21:33:43 +03:00
eb3f84ea31 Initial commit 2026-04-23 20:02:43 +03:00