feat: Audiobookshelf integration — browse, stream, chapters, sleep timer

- src/abs.js: full ABS API client + player engine
  - Login/token auth, library browsing, search
  - Playback session API (multi-file book support via startOffset)
  - Progress sync to ABS every 30s and on pause
  - Chapter navigation (prev/next/seek-to), ±10s / ±30s skip
  - Speed control (0.75–2×), sleep timer with countdown
- index.html: sidebar nav, audiobooks/detail pages, full-screen player overlay,
  ABS settings section (URL + credentials + library picker)
- state.js: abs + absPlayer state objects
- views.js: navigate() handles 'audiobooks' and 'abs-book-detail'
- styles.css: book grid, detail page, player overlay, pickers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-03 14:35:00 +02:00
1 parent 719d4d9afd
commit c17b7ea11a
7 files changed
+948

No files matched your search

+20
View File
@@ -45,4 +45,24 @@ export const S = {
// Artist images cache
artistImgCache: {},
// Audiobookshelf
abs: {
url: '', user: '', token: null, userId: null,
currentLibraryId: null,
},
absPlayer: {
open: false,
item: null,
_sessionId: null,
audioTracks: [],
trackIdx: 0,
chapters: [],
chapterIdx: -1,
playing: false,
currentTime: 0,
duration: 0,
speed: 1.0,
sleepRemaining: null,
},
};