mangadex

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ValidateManga

func ValidateManga(ctx context.Context, uuid string) (bool, error)

Types

type Chapter

type Chapter struct {
	ID              string      `json:"id"`
	SeriesID        string      `json:"series_id"`
	Title           string      `json:"title"`
	ScanlationGroup string      `json:"scanlation_group"`
	PublishedAt     dbutil.Time `json:"published_at"`
	Pages           int         `json:"pages"`
	VolumeNo        string      `json:"volume_no"`
	ChapterNo       string      `json:"chapter_no"`
}

func NewChapters

func NewChapters(ctx context.Context, id string, since time.Time) ([]Chapter, error)

func (Chapter) CreateDownload

func (ch Chapter) CreateDownload(mangaTitle string, createSubscription bool) *Download

func (*Chapter) Scan

func (ch *Chapter) Scan(src interface{}) error

func (Chapter) Value

func (ch Chapter) Value() (driver.Value, error)

type Download

type Download struct {
	MangaTitle string  `json:"manga_title" db:"manga_title"`
	Chapter    Chapter `json:"chapter" db:"chapter"`

	Status      DownloadStatus `json:"status" db:"status"`
	CurrentPage int            `json:"current_page" db:"current_page"`
	TotalPages  int            `json:"total_pages" db:"total_pages"`
	TimeTaken   string         `json:"time_taken" db:"time_taken"`
	Subscribe   bool           `json:"subscribe"`
	// contains filtered or unexported fields
}

func (*Download) Cancel

func (d *Download) Cancel()

func (*Download) Run

func (d *Download) Run(ctx context.Context, libraryPath string) error

func (Download) String

func (d Download) String() string

type DownloadStatus

type DownloadStatus string
const (
	DownloadQueued    DownloadStatus = "Queued"
	DownloadStarted   DownloadStatus = "Started"
	DownloadFinished  DownloadStatus = "Finished"
	DownloadCancelled DownloadStatus = "Cancelled"
	DownloadExists    DownloadStatus = "Already Downloaded"
	DownloadFailed    DownloadStatus = "Failed"
)

type Listing

type Listing struct {
	ID            string `json:"id"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	CoverURL      string `json:"cover_url"`
	SmallCoverURL string `json:"small_cover_url"`
	Year          int    `json:"year"`
}

func SearchManga

func SearchManga(ctx context.Context, title string, limit int) ([]Listing, error)

func ViewManga

func ViewManga(ctx context.Context, uuid string) (Listing, error)

func (Listing) ListChapters

func (l Listing) ListChapters(ctx context.Context) ([]Chapter, error)

func (Listing) NewChapters

func (l Listing) NewChapters(ctx context.Context, since time.Time) ([]Chapter, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL