Jan Svabenik jan
  • Присоединился Sep 20, 2020
Загрузка тепловой карты…

jan создал(а) репозиторий jan/hamradio-setup

3 недель назад

jan выполнил(а) push в master в jan/roadamp

  • a55b5a56ea style(ui): enlarge volume +/- buttons (18->30px) and volume %% (11->14px)

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 151d977566 feat(ui): show total track length on progress bar instead of remaining Right-hand time on the playback bar now displays the full track length (e.g. 1:00:00) rather than the countdown (-49:39). Updated the progress-bar click-to-seek handler to read total directly from that label instead of deriving it from current + remaining. The canvas remaining-time display mode is untouched. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 5210a030b6 style(ui): bump seek button font-size 14px -> 19px for readability

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • b4c816b0de fix(ui): center button text via text-align + line-height (drop flex on buttons) text-align:center had no effect because display:flex makes the button text an anonymous flex item, centered only by justify-content -- which is the exact property broken for <button> on iOS 9. Removed flexbox from .btn entirely and switched to text-align (horizontal) + per-variant line-height (vertical). Single-line only, but reliable on every browser including iOS 9. Also bumped legacy symbol sizes per feedback: <</>> 30px, ■/► 40px, vol/mut 18px, PL 20px. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 4d06fd4608 fix(ui): iOS 9 button text centering + working play glyph Two iPad 2 issues from screenshot: 1. Button text was left-aligned. On iOS 9 a <button> with display:flex ignores justify-content:center. Added text-align:center to .btn as a fallback (harmless when flex works). 2. Play symbol rendered as broken-glyph tofu. ▶ (U+25B6) gets emoji presentation which fails on iOS 9. Switched legacy play to ► (U+25BA), a text-presentation pointer in the same Geometric Shapes block as the ■ stop glyph that already renders fine. Canvas PLAY label now uses SYM.play too. Modern browsers unaffected (still ▶ emoji, flex centering). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 2c3ab34498 fix(ui): move legacySym() out of if-block -- function decl in block illegal in strict mode In ECMAScript 5 strict mode, function declarations inside blocks (if/for/while) are a syntax error. Since app.js uses 'use strict', the legacySym function defined inside the if(isLegacyIOS) block could prevent the entire script from parsing, killing connect() on all browsers. Moved legacySym() to module scope. The if-block now only contains the call sites, which is valid everywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • a1a2819845 fix(ui): size legacy iOS 9 symbols to fill ~3/4 of button height Two-char symbols (<< >>) get 26px bold, single-char (■ ▶) get 36px bold. letter-spacing: 2px spreads the chars slightly for better visual weight. Mute button (vol/mut) gets 16px bold to stay readable in its 48px container. Flex centering already guaranteed by .btn layout -- no extra work needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • dfa6a34093 fix(ui): iOS 9 emoji fallback -- use ASCII symbols where glyphs are missing Media-control emoji (U+23EE U+23F8 U+23F9 U+23ED) and 🔊 🔇 📋 🚫 are absent from the iOS 9 system font and render as empty boxes on iPad 2. Added isLegacyIOS detection (iOS <= 9 via UA) and a SYM symbol table that picks between emoji (modern) and plain-text fallbacks for iOS 9: prev=<< pause=|| stop=■ next=>> volOn=vol volOff=mut playlist=PL skip=✕ Static buttons replaced at boot; dynamic updates (play/pause, mute) use SYM throughout. Modern browsers completely unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • f04baf1c9c fix(ui): NodeList.forEach not available on iOS 9 (Safari < 10) NodeList.prototype.forEach was added in Safari 10 / iOS 10. On iOS 9 it throws 'TypeError: forEach is not a function' at init time, before connect() is called — leaving the app stuck on 'Nicht verbunden' despite the async/await fix. Added qsa(selector, root?) helper that wraps querySelectorAll in Array.prototype.slice.call() to produce a real Array, then replaced all three call sites: - document.querySelectorAll('.btn-seek').forEach - starEls (stored NodeList).forEach x2 - playlistList.querySelectorAll('li').forEach Array.prototype.forEach has been safe since iOS 4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • c3d10037ea fix(ui): remove iOS 9 syntax errors — app was completely dead on iPad 2 async/await, catch{} without binding, and ?? are all syntax errors in Safari 9 (iOS 9). A single syntax error prevents the entire script from parsing, so connect() never ran — explaining 'nicht verbunden'. Removed / replaced every incompatible construct: - async/await → .then()/.catch() Promise chains - catch {} → catch(_e) {} (optional catch binding is ES2019) - ?? → explicit != null ternary (nullish coalescing is ES2020) - padStart() → pad2() helper (String.prototype.padStart is ES2017, not available in iOS < 10) - scrollIntoView({block,behavior}) → scrollIntoView(true) (options object not supported in iOS 9, boolean form works everywhere) Template literals, arrow functions, const/let, forEach, classList, dataset, Promise, WebSocket, Canvas, performance.now() and requestAnimationFrame are all fine in iOS 9. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • b501197177 feat(ui): progressive enhancement for iOS 9 / iPad 2 compatibility CSS: - #seek-row and #controls-row: flexbox base (flex: 1 on children, margin-left gaps) + CSS Grid enhancement via @supports (display: grid) - #playlist-overlay: replaced inset: 0 with explicit top/right/bottom/left (inset shorthand not available before iOS 14.5) - All flex-gap usages: adjacent-sibling margin fallbacks as the base; gap values restored via a single @supports (gap: 1px) block at the end (flex gap not available before iOS 14.5 / Safari 14.1) - Added -webkit- prefixes for user-select, flex, transition, transform throughout to be safe on older WebKit JS: - Added apiFetch() wrapper: uses native fetch() when available (iOS 10.3+), falls back to a minimal XMLHttpRequest shim for iOS 9 and older. Matches the exact subset of the fetch API the app uses: .json(), method, headers, body. - Replaced all four fetch() call sites with apiFetch() Result: layout and all API calls (rating, killist, playlist) work on iOS 9 / iPad 2. Modern browsers get the exact same behaviour as before via the @supports enhancements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • d373db1510 feat(rating): in-place POPM patching, fall back to rewrite only when needed The previous Set() always did a full tag+audio rewrite, even for changing a single byte. That triggered the FILE_SHARE_DELETE rename dance and required streaming kilobytes through a temp file just to flip a rating. New strategy (tryPatchPOPM in popm.go): - Existing POPM frame: seek + 1 byte write. Done. - No POPM, padding available: write a fresh ~33-byte POPM frame into the existing zero-padding. Tag size unchanged, audio offset unchanged, no rename, works while Winamp holds the file open. - Anything weird (no ID3 tag, header flags set, unknown version, padding too small, malformed frame, POPM with frame flags): refuse with errPatchRefused; Set() falls back to the existing rewrite path. Safety invariants enforced before every write: - Strict bounds: write region must lie inside [10, 10+tagSize). - Padding region must be verified all-zero. - Only ID3v2.3 and v2.4 with zero header flags accepted. - POPM frame must have zero frame flags (rejects compression / encryption / data-length indicator that would shift the rating offset). - All frame sizes are validated against tag bounds before use. Tests (popm_test.go): patch existing POPM for both v2.3 and v2.4, insert into padding, no-op when stars=0 and no frame, walk past TIT2 to find POPM, plus seven refusal cases (no ID3, unsync flag, unknown version, small padding, POPM with flags, invalid frame ID, oversized frame size). Also: integration test that Set() preserves file size when padding is available, proving the patch path is taken. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 7c017e2766 fix(rating): preserve audio data on Set(); add unit tests The previous implementation used tag.WriteTo() which only emits the ID3 tag (~311 bytes), leaving audio data behind. Files were truncated to just the tag on every rating write. New strategy: 1. Parse the 10-byte ID3v2 header to find the audio start offset. 2. Encode the new tag into an in-memory buffer via WriteTo. 3. Write tag + original audio into a temp file. 4. Try atomic os.Rename (works when Winamp does not hold the file). 5. Fall back to direct O_WRONLY|O_TRUNC write (works while Winamp plays, because Winamp opens with FILE_SHARE_WRITE on Windows). Tests cover: POPM<->stars mapping, id3v2AudioStart, full round-trip (1-5 stars + unrate) with audio-integrity check, and error cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 8ffad2d0ab fix: rating write — avoid rename, overwrite file in-place bogem/id3v2 Save() renames a temp file over the original, which Windows denies when Winamp holds the file open (no FILE_SHARE_DELETE). Fix: - Use tag.WriteTo(&buf) to encode tag+audio into memory while the read handle is still open - Close the read handle - Reopen the original file with O_WRONLY|O_TRUNC and write the buffer Winamp opens MP3s with FILE_SHARE_WRITE so the in-place overwrite succeeds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • f3db212096 feat: ID3 star rating (POPM) — display and set via tap Backend: - winamp.GetCurrentFile() reads file path via IPC_GETPLAYLISTFILE (211) + ReadProcessMemory, same pattern as playlist titles - internal/rating: Get/Set POPM frame via bogem/id3v2 - Email: rating@winamp.com (Winamp standard) - Byte scale: 0/1/64/128/196/255 = 0-5 stars - Compatible with Windows Explorer and Winamp - GET /api/rating -> {stars: N} - POST /api/rating {stars: N} -> writes POPM, returns {stars: N} Frontend: - 5 stars in track-info, gold when lit - Fetched automatically on track change - Tap to rate; tap same star again to remove rating - Optimistic update with revert on error Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • af624bbd77 fix: classic spectrum — fixed gradient, no hue flicker Replace per-frame hsl(val*120) with a static createLinearGradient (green->yellow->red, bottom to top) shared across all bars. Colour is now position-based, not amplitude-based, so it never flickers. Peak decay slightly slower (0.008/frame) for smoother hold. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • d8ebc1b8c0 feat: click canvas to cycle viz / elapsed / remaining Three modes on canvas click: viz -> spectrum analyser (default) actual -> hh:mm:ss elapsed in white, ELAPSED label remaining -> -hh:mm:ss countdown in accent red, REMAINING label Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • cdd170408a feat: show remaining time as countdown (-m:ss) Time display now shows elapsed / -remaining instead of elapsed / total, matching the Delphi original (reversetime mode). Progress-bar click seek derives total from current + remaining to stay correct. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

1 месяц назад

jan выполнил(а) push в master в jan/roadamp

  • 52e3df4099 docs: rewrite README — fix port (8889), remove mojibake, add feature list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • 813e38f193 fix: atomic killist save via temp file + rename os.Create truncates the target immediately; a failed write or flush leaves the file empty/corrupt. Write to a temp file in the same directory, flush, close, then os.Rename — the rename is atomic on Windows (same volume). Also check WriteString return values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • f6ee493629 fix: bust PWA cache on each release build sw.js uses __BUILDVER__ token; build.ps1 replaces it with the git version before go build (which embeds the patched file), then restores the template via the finally block. Installed PWA clients receive new assets after every release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • 45ab86425f fix: playlist title encoding via MultiByteToWideChar Winamp IPC_GETPLAYLISTTITLE returns ANSI (char*) strings in its process memory. Blindly casting bytes to string garbles umlauts and other non-ASCII chars. Fix: decode via MultiByteToWideChar(CP_ACP) → UTF-16 → Go string, using the same code page Windows uses for the title. Also check ReadProcessMemory return value — failures now return empty string instead of garbage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • f1007d4540 fix: resume — save on stop-while-playing, restore to correct track - Extract saveResumeState helper: saves when playing OR paused (not just paused). Both WS and REST stop handlers now call it. - restoreResume now jumps to saved PlaylistPos before seeking, so the correct track is loaded even when playlist order differs. - Title validation: if the loaded title does not match the window title after jumping, abort restore and delete stale resume file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • Сравнить 7 коммитов »

1 месяц назад