Skip to content

Commit

Permalink
fix(metadata): recognize ComicInfo Day tag and "MA15+" rating
Browse files Browse the repository at this point in the history
These fields are used by comictagger.
  • Loading branch information
rouhannb authored and gotson committed Aug 3, 2020
1 parent 7025df9 commit 3ad438d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ComicInfoProvider(
override fun getBookMetadataFromBook(book: Book, media: Media): BookMetadataPatch? {
getComicInfo(book, media)?.let { comicInfo ->
val releaseDate = comicInfo.year?.let {
LocalDate.of(comicInfo.year!!, comicInfo.month ?: 1, 1)
LocalDate.of(comicInfo.year!!, comicInfo.month ?: 1, comicInfo.day ?: 1)
}

val authors = mutableListOf<Author>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum class AgeRating(val value: String, val ageRating: Int? = null) {
KIDS_TO_ADULTS("Kids to Adults", 6),
M("M", 17),
MA_15("MA 15+", 15),
MA_15_NOSPACE("MA15+", 15),
MATURE_17("Mature 17+", 17),
PG("PG", 8),
R_18("R18+", 18),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class ComicInfo {
@JsonProperty(value = "Month")
var month: Int? = null

@JsonProperty(value = "Day")
var day: Int? = null

@JsonProperty(value = "Writer")
var writer: String? = null

Expand Down

0 comments on commit 3ad438d

Please sign in to comment.