diff --git a/.gitignore b/.gitignore index b71641b..4453835 100644 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,8 @@ logs .fleet .idea -# Media sources (originaux, pas servis par l'appli) -media/ +# Sources originales (PDF, JPG — pas servies par l'appli) +sources/ # Local env files .env diff --git a/app/components/book/BookPlayer.vue b/app/components/book/BookPlayer.vue index f652877..1a27f5a 100644 --- a/app/components/book/BookPlayer.vue +++ b/app/components/book/BookPlayer.vue @@ -34,22 +34,11 @@ >
- - + @@ -172,7 +161,7 @@ const showSommaire = ref(false) const isTurning = ref(false) // ── Reading mode ── -const readingMode = ref<'paginated' | 'scroll'>('paginated') +const readingMode = ref<'paginated' | 'scroll'>('scroll') const isScrollMode = computed(() => readingMode.value === 'scroll') const scrollPercent = ref(0) @@ -448,7 +437,7 @@ watch(isOpen, async (open) => { } }) -// ── Sync: when song changes in player, navigate to matching chapter ── +// ── Sync: when song changes in player, navigate to matching chapter (display only, no loadAndPlay) ── watch(() => playerStore.currentSong, (song) => { if (!song || !isOpen.value) return if (_skipSongWatch) { @@ -459,8 +448,11 @@ watch(() => playerStore.currentSong, (song) => { if (!slug) return const idx = chapters.findIndex(ch => ch.slug === slug) if (idx !== -1 && idx !== chapterIdx.value) { + // Only update the displayed chapter — do NOT call goToChapter/loadAndPlay + // to avoid retriggering this watcher and causing song skips chapterIdx.value = idx currentPage.value = 0 + showSommaire.value = false if (isScrollMode.value && viewportEl.value) { viewportEl.value.scrollTop = 0 }