library

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BookStatusText

func BookStatusText(b *audible.Book) string

func FormatFilePath

func FormatFilePath(p string, width int) string

FormatFilePath tries to fit the given path within the given width

func GetActivationBytes

func GetActivationBytes(actionQueue chan<- Action) []byte

func GetCookieJar

func GetCookieJar(actionQueue chan<- Action) http.CookieJar

func GetDirPickerBtnText

func GetDirPickerBtnText(actionQueue chan<- Action) string

func GetDownloadBtnText

func GetDownloadBtnText(actionQueue chan<- Action) string

func GetDstPath

func GetDstPath(actionQueue chan<- Action, b *audible.Book) string

func GetSelectedDirPath

func GetSelectedDirPath(actionQueue chan<- Action) string

func Indent

func Indent(items ...fyne.CanvasObject) fyne.CanvasObject

func IsBookDownloaded

func IsBookDownloaded(actionQueue chan<- Action, index int) bool

func IsBookSelected

func IsBookSelected(actionQueue chan<- Action, index int) bool

func NewState

func NewState(client *audible.Client, activationBytes []byte, books []*audible.Book) chan<- Action

func PathFromFyneURI

func PathFromFyneURI(uri fyne.ListableURI) string

func Run

func Run(w fyne.Window, renderQueue chan func(w fyne.Window), actionQueue chan<- Action) error

func StartDownloads

func StartDownloads(actionQueue chan<- Action) error

Types

type Action

type Action = func(s *State)

func BookCheckboxAction

func BookCheckboxAction(index int, action components.CheckboxAction) Action

func BookProgressBarAction

func BookProgressBarAction(index int, action components.ProgressBarAction) Action

func BookProgressBarMaybeShow

func BookProgressBarMaybeShow(index int) Action

func MainProgressBarAction

func MainProgressBarAction(action components.ProgressBarAction) Action

func SetBookCheckboxCh

func SetBookCheckboxCh(index int, ch chan<- components.CheckboxAction) Action

func SetBookDownloaded

func SetBookDownloaded(index int, downloaded bool) Action

func SetBookStatusText

func SetBookStatusText(index int, text string) Action

func SetDownloading

func SetDownloading(isDownloading bool) Action

func SetSelectedDir

func SetSelectedDir(uri fyne.ListableURI) Action

type State

type State struct {
	Client *audible.Client
	// contains filtered or unexported fields
}

func (*State) GetBook

func (s *State) GetBook(index int) *audible.Book

func (*State) GetBookIndexForID

func (s *State) GetBookIndexForID(id string) (int, bool)

func (*State) GetBookIndicesByID

func (s *State) GetBookIndicesByID() map[string]int

func (*State) GetBooks

func (s *State) GetBooks() []*audible.Book

func (*State) GetBooksLen

func (s *State) GetBooksLen() int

func (*State) GetDirPickerBtnText

func (s *State) GetDirPickerBtnText() string

func (*State) GetDownloadBtnText

func (s *State) GetDownloadBtnText() string

func (*State) GetDownloadedBooks

func (s *State) GetDownloadedBooks() []*audible.Book

func (*State) IsBookDownloaded

func (s *State) IsBookDownloaded(index int) bool

func (*State) SetBookDownloaded

func (s *State) SetBookDownloaded(index int, downloaded bool)

func (*State) SetBookIndexForID

func (s *State) SetBookIndexForID(id string, index int)

func (*State) SetBookLocalPath

func (s *State) SetBookLocalPath(index int, localPath string)

func (*State) SetNumSelected

func (s *State) SetNumSelected(num int)

func (*State) SetSelectedDirPath

func (s *State) SetSelectedDirPath(v string)

Jump to

Keyboard shortcuts

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