Add further metadata fields to the ComicInfo generation
This commit is contained in:
parent
b36bc9b0b2
commit
fb157d6b77
1 changed files with 8 additions and 4 deletions
12
main.go
12
main.go
|
@ -421,7 +421,7 @@ func DownloadAndProcessEpub(jnovel jnc.Api, serie jnc.SerieAugmented, volume jnc
|
|||
}
|
||||
}
|
||||
|
||||
comicInfo, err := GenerateChapterMetadata(volume, serie, len(chap.pages), language)
|
||||
comicInfo, err := GenerateChapterMetadata(volume, serie, len(chap.pages), language, chap.chDisplay)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ func DownloadAndProcessEpub(jnovel jnc.Api, serie jnc.SerieAugmented, volume jnc
|
|||
}
|
||||
}
|
||||
|
||||
func GenerateChapterMetadata(volume jnc.VolumeAugmented, serie jnc.SerieAugmented, pageCount int, language string) ([]byte, error) {
|
||||
func GenerateChapterMetadata(volume jnc.VolumeAugmented, serie jnc.SerieAugmented, pageCount int, language string, chapterNumber string) ([]byte, error) {
|
||||
comicInfo := ComicInfo{
|
||||
XMLName: "ComicInfo",
|
||||
XMLNS: "http://www.w3.org/2001/XMLSchema-instance",
|
||||
|
@ -547,7 +547,9 @@ func GenerateChapterMetadata(volume jnc.VolumeAugmented, serie jnc.SerieAugmente
|
|||
sInfo := serie.Info
|
||||
|
||||
comicInfo.Series = sInfo.Title
|
||||
comicInfo.Number = vInfo.Number
|
||||
comicInfo.Title = vInfo.Title
|
||||
comicInfo.Number = chapterNumber
|
||||
comicInfo.Volume = vInfo.Number
|
||||
|
||||
comicInfo.Count = -1 // TODO somehow fetch actual completion status
|
||||
|
||||
|
@ -595,7 +597,9 @@ type ComicInfo struct {
|
|||
XMLNS string `xml:"xmlns,attr"`
|
||||
XSI string `xml:"xsi,attr"`
|
||||
Series string `xml:"Series"`
|
||||
Number int `xml:"Number"`
|
||||
Title string `xml:"Title"`
|
||||
Volume int `xml:"Volume"`
|
||||
Number string `xml:"Number"`
|
||||
Count int `xml:"Count"`
|
||||
Summary string `xml:"Summary"`
|
||||
Year int `xml:"Year"`
|
||||
|
|
Loading…
Add table
Reference in a new issue