Skip to content

Commit

Permalink
Add:Chapter editor lookup chapters and apply titles only #991
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Sep 29, 2022
1 parent 3a7639f commit 1a4833f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions client/pages/audiobook/_id/chapters.vue
Expand Up @@ -142,8 +142,11 @@
<p class="pl-2">Chapter start is after the end of your audiobook</p>
</div>
</div>
<div class="flex pt-2">
<ui-btn small color="primary" @click="applyChapterNamesOnly">Apply Names Only</ui-btn>
<div class="flex items-center pt-2">
<ui-btn small color="primary" class="mr-1" @click="applyChapterNamesOnly">Map Chapter Titles</ui-btn>
<ui-tooltip text="Map chapter titles to your existing audiobook chapters without adjusting timestamps" direction="top">
<span class="material-icons-outlined">info</span>
</ui-tooltip>
<div class="flex-grow" />
<ui-btn small color="success" @click="applyChapterData">Apply Chapters</ui-btn>
</div>
Expand Down Expand Up @@ -389,7 +392,16 @@ export default {
this.$toast.error('Failed to update chapters')
})
},
applyChapterNamesOnly() {},
applyChapterNamesOnly() {
this.newChapters.forEach((chapter, index) => {
if (this.chapterData.chapters[index]) {
chapter.title = this.chapterData.chapters[index].title
}
})
this.showFindChaptersModal = false
this.chapterData = null
},
applyChapterData() {
var index = 0
this.newChapters = this.chapterData.chapters
Expand Down

0 comments on commit 1a4833f

Please sign in to comment.