diff --git a/src/components/dialog/DialogAudioBible.vue b/src/components/dialog/DialogAudioBible.vue index 2c5267462..c0488e6b6 100644 --- a/src/components/dialog/DialogAudioBible.vue +++ b/src/components/dialog/DialogAudioBible.vue @@ -131,7 +131,7 @@ :color="!book.files ? '' : 'accent-200'" :disable="!book.files" no-caps - :text-color="!book.files ? 'accent-300' : 'black'" + :text-color="!book.files ? 'accent-400' : 'black'" unelevated @click="selectedBibleBook = book.booknum || 0" > diff --git a/src/helpers/jw-media.ts b/src/helpers/jw-media.ts index d09e47b86..9b4336417 100644 --- a/src/helpers/jw-media.ts +++ b/src/helpers/jw-media.ts @@ -1032,10 +1032,11 @@ export const getAudioBibleMedia = async (force = false) => { } if (backupNameNeeded.length) { - const { nwtDb } = await getStudyBible(); + const { nwtDb, nwtStyDb } = await getStudyBible(); - if (nwtDb) { - const bibleBooksSimpleQuery = ` + if (!(nwtStyDb || nwtDb)) return; + + const bibleBooksSimpleQuery = ` SELECT * FROM Document @@ -1043,21 +1044,19 @@ export const getAudioBibleMedia = async (force = false) => { Class = 1 `; - const bibleBookLocalNames = - window.electronApi.executeQuery( - nwtDb, - bibleBooksSimpleQuery, - ); - console.log('backupBooks', backupNameNeeded, bibleBookLocalNames); - for (const booknum of backupNameNeeded) { - const pubName = bibleBookLocalNames.find( - (item) => item.ChapterNumber === booknum, - )?.Title; - returnedItems[booknum - 1] = { - booknum, - pubName, - }; - } + const bibleBookLocalNames = + window.electronApi.executeQuery( + (nwtStyDb || nwtDb) as string, + bibleBooksSimpleQuery, + ); + for (const booknum of backupNameNeeded) { + const pubName = bibleBookLocalNames.find( + (item) => item.ChapterNumber === booknum, + )?.Title; + returnedItems[booknum - 1] = { + booknum, + pubName, + }; } } jwStore.jwBibleAudioFiles[lang] = {