Skip to content

Commit 1f04d37

Browse files
committed
fix: compatibility update with API v5.4.1
1 parent 6c78705 commit 1f04d37

File tree

11 files changed

+184
-73
lines changed

11 files changed

+184
-73
lines changed

app/ui/manga_page_utils.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (p *MangaPage) downloadChapters(selection map[int]struct{}, attemptNo int)
8888
// saveChapter : Save a chapter.
8989
func (p *MangaPage) saveChapter(chapter *mangodex.Chapter) error {
9090
downloader, err := core.App.Client.AtHome.NewMDHomeClient(
91-
chapter, core.App.Config.DownloadQuality, core.App.Config.ForcePort443)
91+
chapter.ID, core.App.Config.DownloadQuality, core.App.Config.ForcePort443)
9292
if err != nil {
9393
return err
9494
}
@@ -99,14 +99,8 @@ func (p *MangaPage) saveChapter(chapter *mangodex.Chapter) error {
9999
return err
100100
}
101101

102-
// Get the pages to download
103-
pages := chapter.Attributes.Data
104-
if core.App.Config.DownloadQuality == "data-saver" {
105-
pages = chapter.Attributes.DataSaver
106-
}
107-
108102
// Save each page.
109-
for num, page := range pages {
103+
for num, page := range downloader.Pages {
110104
// Get image data.
111105
image, err := downloader.GetChapterPage(page)
112106
if err != nil {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/darylhjd/mangadesk
33
go 1.16
44

55
require (
6-
github.com/darylhjd/mangodex v0.0.0-20211211122551-1fc99cf5388b
6+
github.com/darylhjd/mangodex v0.0.0-20211224142032-6fd9fa02d329
77
github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1
88
github.com/rivo/tview v0.0.0-20211202162923-2a6de950f73b
9-
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
9+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
1010
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
1111
golang.org/x/text v0.3.7 // indirect
1212
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/darylhjd/mangodex v0.0.0-20211211122551-1fc99cf5388b h1:B6vUrI8dXtXM+HYcWTXqKqJb/GCfkrDSRjmB7bcr2jU=
2-
github.com/darylhjd/mangodex v0.0.0-20211211122551-1fc99cf5388b/go.mod h1:RApCWGRbVd11wQMLhiZ1ejybkf1C4CS6rMANQlog8B0=
1+
github.com/darylhjd/mangodex v0.0.0-20211224142032-6fd9fa02d329 h1:dwReyhjyXsh9D5smzkzjYIMkW/OUuHcwxgiJk2BI8qQ=
2+
github.com/darylhjd/mangodex v0.0.0-20211224142032-6fd9fa02d329/go.mod h1:RApCWGRbVd11wQMLhiZ1ejybkf1C4CS6rMANQlog8B0=
33
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
44
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
55
github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1 h1:QqwPZCwh/k1uYqq6uXSb9TRDhTkfQbO80v8zhnIe5zM=
@@ -15,8 +15,8 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ
1515
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1616
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1717
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
18-
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk=
19-
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
18+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
19+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2020
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
2121
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
2222
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=

vendor/github.com/darylhjd/mangodex/at_home.go

Lines changed: 31 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/darylhjd/mangodex/chapter.go

Lines changed: 10 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/mkerrors.sh

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/zerrors_linux.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/ztypes_linux.go

Lines changed: 75 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/windows/exec_windows.go

Lines changed: 10 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)