Fix typos & add more comments

This commit is contained in:
bytedream 2022-04-16 00:17:36 +02:00
parent 2e9ce3cf52
commit 3617955bc5
16 changed files with 82 additions and 68 deletions

View file

@ -11,11 +11,12 @@ const (
MOVIE = "movies"
)
// Format contains detailed information about an episode video stream.
type Format struct {
crunchy *Crunchyroll
ID string
// FormatType represents if the format parent is an episode or a movie
// FormatType represents if the format parent is an episode or a movie.
FormatType FormatType
Video *m3u8.Variant
AudioLocale LOCALE
@ -27,7 +28,7 @@ type Format struct {
// The Format.Video.Chunklist pointer is, by default, nil because an additional
// request must be made to receive its content. The request is not made when
// initializing a Format struct because it would probably cause an intense overhead
// since Format.Video.Chunklist is only used sometimes
// since Format.Video.Chunklist is only used sometimes.
func (f *Format) InitVideo() error {
if f.Video.Chunklist == nil {
resp, err := f.crunchy.Client.Get(f.Video.URI)
@ -45,7 +46,7 @@ func (f *Format) InitVideo() error {
return nil
}
// Download downloads the Format with the via Downloader specified options
// Download downloads the Format with the via Downloader specified options.
func (f *Format) Download(downloader Downloader) error {
return downloader.download(f)
}