Commit graph

28 commits

Author SHA1 Message Date
marwin
e5dc58d84f Replace focus station sidebar with compact radio player sidebar
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 15s
The 📻 button now opens a sidebar with the currently playing station/track,
play/stop + volume control, and the saved stations list. The old focus
station configuration UI (presets, custom URL input, save-to-server) and
the auto-play-on-book-open behavior are removed.

Closes #6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 14:22:07 +02:00
marwin
e9c5b8058b Centralize remaining magic numbers in settings.py
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 15s
- HIGHLIGHTS_MAX_BYTES, BOOKMARKS_MAX_BYTES: books size limits now in settings
- PODCAST_INBOX_PAGE_SIZE: shared between podcasts/views.py and app.js via DIORA_CONFIG
- VOLUME_DEFAULT: radio stream player default volume
- ITUNES_TIMEOUT: unified iTunes API timeout (was 5s vs 6s inconsistency)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 21:10:14 +02:00
marwin
0a6ba6feac Inject upload size limits from settings into frontend via DIORA_CONFIG
All checks were successful
Build and push Docker image / build (push) Successful in 14s
Test / test (push) Successful in 15s
Backend settings are now the single source of truth for EBOOK_MAX_BYTES
and BG_MAX_BYTES. A new context processor exposes them to all templates,
and base.html injects them as window.DIORA_CONFIG so app.js reads from
there instead of hardcoded values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 21:05:51 +02:00
marwin
f040a45325 Open HTTP streams in raw new tab instead of custom HTTPS player
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 14s
The custom /radio/stream-player/ page is served over HTTPS, so the browser
still applies mixed-content restrictions and upgrades http:// audio to https://,
which fails for streams without TLS support.

Fix: window.open(url, '_blank') navigates the tab directly to the HTTP URL.
The tab itself is then HTTP, bypassing mixed-content restrictions entirely.
Browser plays the stream natively with its built-in audio player.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 10:48:28 +01:00
marwin
9e08079dec Fix stream player autoplay: handle blocked play() promise
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 17s
window.open() doesn't transfer the user gesture to the new tab, so autoplay
is blocked. Previously play().catch(()=>{}) swallowed the error silently while
setting playing=true, leaving the UI in a broken state.

Now: if play() rejects, reset state and show "Click Play to start". The user's
click on the Play button IS a user gesture, so it succeeds on the second attempt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 10:39:43 +01:00
marwin
85776390f6 Open HTTP streams in minimal standalone player tab
All checks were successful
Build and push Docker image / build (push) Successful in 14s
Test / test (push) Successful in 16s
Instead of trying a HTTPS upgrade (which fails for IP-based streams):
- playStation() detects http:// URL on https:// page, opens /radio/stream-player/
  with url, name, vol as query params, then returns — main stream is already
  stopped by the stopPlayback(false) call at the top of playStation()
- New view stream_player renders a standalone minimal player page
- Template: auto-plays on load, correct volume from URL param, volume changes
  synced back to localStorage so main window picks it up next time,
  live track metadata via SSE, tab title updates on track change,
  close-tab button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:50:12 +01:00
Marwin Schulz
a314643588 Fix JS crash: serialize saved_stations/featured_stations to proper JSON
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 15s
Python booleans (True/False) in saved_stations (is_favorite field) and
history (scrobbled field) were being rendered literally into JS via
|safe, causing 'True is not defined' ReferenceError that broke all JS
including book loading.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 12:58:38 +01:00
Marwin Schulz
4f413c673e Add 'Refresh all' button to podcast toolbar
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 15s
Shows live progress counter (↻ 3/42) while fetching feeds sequentially,
then reloads the current view when done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:18:38 +01:00
Marwin Schulz
fe4e1b5250 Move inbox 'Load more' button to bottom of list
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 14s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:13:47 +01:00
Marwin Schulz
afcbe087bb Replace 'recently refreshed' sort with 'most recent episode' in feed list
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 15s
Annotates feed queryset with Max(episodes__pub_date) so feeds are sorted
by when their latest episode was published, not when the feed was last fetched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:07:01 +01:00
Marwin Schulz
92801c9bbf Add podcast enhancements: AntennaPod parity features + inbox management
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 16s
- Auto-play next episode from queue when current episode ends
- Sleep timer (N minutes or end-of-episode) with countdown in button
- In-feed episode filter (client-side search)
- Auto-queue new episodes per feed (Q toggle, inserts at top of queue)
- More playback speeds: 1¾× and 2½× added
- Progress bars + structured meta line in all episode list views (feed, inbox, queue)
- Queue drag-and-drop reorder
- Feed list search filter and sort options (A–Z, Z–A, recently added/refreshed)
- DB migration: PodcastFeed.auto_queue, EpisodeProgress.dismissed
- Inbox: dismiss episodes without marking played, checkboxes for multi-select,
  bulk actions (add to queue, mark played, download, dismiss), load-more pagination
- Refresh button in single feed view header
- Hourly background refresh of all subscribed feeds
- Full Media Session API for radio and podcast: Windows taskbar thumbnail buttons
  (play/pause/stop/next/seek) now work correctly for both modes
- Playing an episode auto-adds it to the queue if not already there

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 08:55:11 +01:00
marwin
2fad4a726c Fix Books tab: auto-generate encryption key, remove password prompt
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 16s
- getOrCreateEncKey() now generates a random AES-GCM-256 key if none
  found in localStorage, instead of throwing an error
- Removed enc-key-prompt div from player.html entirely
- Simplified initBookDropZone() — removed prompt show/hide logic
- book-upload-area always visible, no longer hidden behind prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 22:16:22 +01:00
marwin
5ce9cec581 Show enc-key-prompt by default, hide only when key exists via JS
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 16s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:57:41 +01:00
marwin
e1b18f392e Show build time in bottom-right corner
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 16s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:35:41 +01:00
marwin
b9c5f835f4 Add password prompt in Books tab to derive encryption key on-device
All checks were successful
Build and push Docker image / build (push) Successful in 14s
Test / test (push) Successful in 16s
Bypasses unreliable login-form interception; user enters password once
per device to derive the same PBKDF2 key cross-device.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:29:51 +01:00
marwin
31578db1bc Fix window.USER_ID not being set (const doesn't create window property)
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 16s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:04:51 +01:00
marwin
d5db882e30 Default radio tab to Saved instead of Search
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 15s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:43:23 +01:00
Marwin Schulz
2bd83f6315 Add podcast feature with feed management, Docker cron, and ebook reader assets
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 13s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 13:39:59 +01:00
Marwin Schulz
6d391587c8 Add ebook reader features: highlights, bookmarks, search, settings, PDF paginated mode
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 11s
- Backend: EBookHighlights and EBookBookmarks models with encrypted blob storage;
  GET/POST views with size guards (700 KB / 100 KB); migration applied
- Reader header: search, settings, bookmark add/list buttons
- Font & layout settings panel (font size, line height, max width, themes for EPUB;
  zoom, invert, paginated for PDF); persisted in localStorage
- Bookmarks: encrypted per-book blob, toast on add, sidebar with jump/delete
- Full-text search: EPUB TreeWalker mark injection, PDF span search; Ctrl+F / F3;
  arrow key cycling; highlights re-applied on search clear
- PDF paginated mode: single-page view, tap-zone / swipe / arrow key navigation,
  smart zoom (text bounding box → scale+translate canvas), auto-enable on mobile
- Progress tracking fixes: save before hiding overlay (was always writing 100%),
  wait for EPUB images to load before restoring scroll, PDF paginated uses page
  fraction, sendBeacon cache for unload/visibilitychange reliability
- PDF text layer disabled pending overlay rendering fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 13:08:42 +01:00
marwin
6c1d95ea90 Show featured stations in search tab empty state
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 13s
2026-03-16 21:16:28 +01:00
marwin
35d979a06a Fix volume slider, add 0-255 number input
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 13s
2026-03-16 21:07:12 +01:00
marwin
3761b13649 Add Django admin, FeaturedStation model, crmfrsh is superuser
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 13s
2026-03-16 21:01:51 +01:00
marwin
945da36c95 Add AMAZON_AFFILIATE_ENABLED flag, disabled by default
All checks were successful
Build and push Docker image / build (push) Successful in 11s
Test / test (push) Successful in 12s
2026-03-16 20:47:02 +01:00
marwin
0f4a7e96d3 Fix #1 hide play btn, fix #2 dnd-dark fullscreen, close #3
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 14s
2026-03-16 20:38:08 +01:00
marwin
978b6fa24b Store background images in DB, persist SQLite via volume
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 14s
2026-03-16 20:24:20 +01:00
marwin
5c8c57f04f Replace focus button icon with ⊙
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 13s
2026-03-16 20:18:39 +01:00
marwin
bf2f01c4c6 Add history delete button and Truckers FM station
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 13s
2026-03-16 20:16:30 +01:00
marwin
8c3eec4ca1 Initial commit 2026-03-16 19:19:22 +01:00