fix(metadata): recognize ComicInfo Day tag and "MA15+" rating

These fields are used by comictagger.
This commit is contained in:
rouhannb 2020-08-02 18:00:18 -04:00 committed by Gauthier
parent 7025df98d0
commit 3ad438d53f
3 changed files with 5 additions and 1 deletions

View file

@ -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>()

View file

@ -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),

View file

@ -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