Skip to content

Commit

Permalink
Merge pull request #197 from Bible-Translation-Tools/mm-orature-chapters
Browse files Browse the repository at this point in the history
Fix orature book and chapter links
  • Loading branch information
mXaln authored May 17, 2024
2 parents 17680cd + 7b42ebc commit f379bed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class FetchBookViewData(
var url: String? = null
for (priority in priorityList) {
val fileAccessRequest = when (productExtension) {
ProductFileExtension.ORATURE -> return "javascript:void(0)"
ProductFileExtension.ORATURE -> return "#"
ProductFileExtension.BTTR -> getBTTRFileAccessRequest(bookSlug, priority)
ProductFileExtension.MP3 -> getMp3FileAccessRequest(bookSlug, priority)
else -> return ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,18 @@ class FetchChapterViewData(
for (priority in priorityList) {
val fileAccessRequest = when (productExtension) {
ProductFileExtension.BTTR -> getBTTRFileAccessRequest(chapterNumber, priority)
ProductFileExtension.MP3 -> getMp3FileAccessRequest(chapterNumber, priority)
ProductFileExtension.MP3, ProductFileExtension.ORATURE -> {
getMp3FileAccessRequest(chapterNumber, priority)
}
else -> return listOf()
}

val chapterFile = storage.getChapterFile(fileAccessRequest)
if (chapterFile != null) {
url = formatChapterDownloadUrl(chapterFile)
url = when (productExtension) {
ProductFileExtension.ORATURE -> "#"
else -> formatChapterDownloadUrl(chapterFile)
}
break
}
}
Expand Down

0 comments on commit f379bed

Please sign in to comment.