mirror of
https://github.com/bestnite/bilinovel-downloader.git
synced 2025-10-26 17:14:24 +00:00
refactor
This commit is contained in:
15
model/downloader.go
Normal file
15
model/downloader.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
type ExtraFile struct {
|
||||
Data []byte
|
||||
Path string
|
||||
ManifestItem ManifestItem
|
||||
}
|
||||
|
||||
type Downloader interface {
|
||||
GetNovel(novelId int) (*Novel, error)
|
||||
GetVolume(novelId int, volumeId int) (*Volume, error)
|
||||
GetChapter(novelId int, volumeId int, chapterId int) (*Chapter, error)
|
||||
GetStyleCSS() string
|
||||
GetExtraFiles() []ExtraFile
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
package model
|
||||
|
||||
type ChaperContent struct {
|
||||
Html string
|
||||
Images map[string][]byte
|
||||
}
|
||||
|
||||
type Chapter struct {
|
||||
Title string
|
||||
Url string
|
||||
Content string
|
||||
ImageOEBPSPaths []string
|
||||
ImageFullPaths []string
|
||||
TextOEBPSPath string
|
||||
TextFullPath string
|
||||
Id int
|
||||
NovelId int
|
||||
VolumeId int
|
||||
Title string
|
||||
Url string
|
||||
Content *ChaperContent
|
||||
}
|
||||
|
||||
type Volume struct {
|
||||
@@ -15,7 +19,8 @@ type Volume struct {
|
||||
SeriesIdx int
|
||||
Title string
|
||||
Url string
|
||||
Cover string
|
||||
CoverUrl string
|
||||
Cover []byte
|
||||
Description string
|
||||
Authors []string
|
||||
Chapters []*Chapter
|
||||
Reference in New Issue
Block a user