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 {
|
if err != nil {
|
||||||
fmt.Println(err)
|
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{
|
comicInfo := ComicInfo{
|
||||||
XMLName: "ComicInfo",
|
XMLName: "ComicInfo",
|
||||||
XMLNS: "http://www.w3.org/2001/XMLSchema-instance",
|
XMLNS: "http://www.w3.org/2001/XMLSchema-instance",
|
||||||
|
@ -547,7 +547,9 @@ func GenerateChapterMetadata(volume jnc.VolumeAugmented, serie jnc.SerieAugmente
|
||||||
sInfo := serie.Info
|
sInfo := serie.Info
|
||||||
|
|
||||||
comicInfo.Series = sInfo.Title
|
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
|
comicInfo.Count = -1 // TODO somehow fetch actual completion status
|
||||||
|
|
||||||
|
@ -595,7 +597,9 @@ type ComicInfo struct {
|
||||||
XMLNS string `xml:"xmlns,attr"`
|
XMLNS string `xml:"xmlns,attr"`
|
||||||
XSI string `xml:"xsi,attr"`
|
XSI string `xml:"xsi,attr"`
|
||||||
Series string `xml:"Series"`
|
Series string `xml:"Series"`
|
||||||
Number int `xml:"Number"`
|
Title string `xml:"Title"`
|
||||||
|
Volume int `xml:"Volume"`
|
||||||
|
Number string `xml:"Number"`
|
||||||
Count int `xml:"Count"`
|
Count int `xml:"Count"`
|
||||||
Summary string `xml:"Summary"`
|
Summary string `xml:"Summary"`
|
||||||
Year int `xml:"Year"`
|
Year int `xml:"Year"`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue