aboutsummaryrefslogtreecommitdiff
path: root/mal
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-06 09:58:16 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-08-06 09:58:16 +0530
commit3d23ed955d11651bd9bacda02070b8d13b6922a1 (patch)
treebd059a01f9dbefbbf49471d64d8082feccae76da /mal
parentda51d5d32c6a7795278539eaf994975c7776e296 (diff)
added volumes command
Diffstat (limited to 'mal')
-rw-r--r--mal/episodes.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/mal/episodes.go b/mal/episodes.go
index 43b69c0..0940af5 100644
--- a/mal/episodes.go
+++ b/mal/episodes.go
@@ -43,3 +43,12 @@ func SetChapters(mangaId, prevValue int, ch string) m.UpdateResponse {
}
return res
}
+
+func SetVolumes(mangaId, prevValue int, vol string) m.UpdateResponse {
+ res, err := userMangaClient.SetVolumesRead(mangaId, util.ParseNumeric(vol, prevValue))
+ if err != nil {
+ fmt.Println("MyAnimeList returned error while updating volumes:", err)
+ os.Exit(1)
+ }
+ return res
+}