diff --git a/README.md b/README.md index dacea47..2ad6a98 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ ALL_AUTHORS - All authors in the list of authors separated by ',' SERIES_NAME - The series name, if it exists SERIES_NUM - The books respective series number, if it exists BOOK_TITLE - The book title +BOOK_SIBTITLE - The book subtitle, if it exists ISBN - The ISBN of the book FIRST_NARRATOR - The first narrator in the list of narrators ALL_NARRATORS - All narrators in the list of narrators separated by ',' diff --git a/server/app/src/main/kotlin/com/vishnurajeevan/libroabs/graph/AppComponent.kt b/server/app/src/main/kotlin/com/vishnurajeevan/libroabs/graph/AppComponent.kt index 8f8c31d..1914aa4 100644 --- a/server/app/src/main/kotlin/com/vishnurajeevan/libroabs/graph/AppComponent.kt +++ b/server/app/src/main/kotlin/com/vishnurajeevan/libroabs/graph/AppComponent.kt @@ -77,4 +77,4 @@ abstract class AppComponent( } } -} \ No newline at end of file +} diff --git a/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/libro/Book.kt b/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/libro/Book.kt index 408f8c0..6134d4f 100644 --- a/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/libro/Book.kt +++ b/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/libro/Book.kt @@ -14,6 +14,7 @@ data class Book( val publication_date: Instant, val description: String, val genres: List, + val subtitle: String? = null, val series: String? = null, val series_num: Int? = null ) diff --git a/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/server/PathTokens.kt b/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/server/PathTokens.kt index 4142088..c64b565 100644 --- a/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/server/PathTokens.kt +++ b/server/models/src/main/kotlin/com/vishnurajeevan/libroabs/models/server/PathTokens.kt @@ -17,6 +17,7 @@ enum class PathTokens { PUBLICATION_MONTH, PUBLICATION_DAY, SERIES_NUM, + BOOK_SUBTITLE, } fun PathTokens.convert(book: Book): String { @@ -32,6 +33,7 @@ fun PathTokens.convert(book: Book): String { PathTokens.PUBLICATION_MONTH -> book.publication_date.toLocalDateTime(TimeZone.UTC).month.number.toString() PathTokens.PUBLICATION_DAY -> book.publication_date.toLocalDateTime(TimeZone.UTC).dayOfMonth.toString() PathTokens.SERIES_NUM -> book.series_num?.toString() ?: "" + PathTokens.BOOK_SUBTITLE -> book.subtitle ?: "" } }