From 56015d31749259dfb5387cf6b84f9a107807de45 Mon Sep 17 00:00:00 2001 From: IchBinLeoon <50367411+IchBinLeoon@users.noreply.github.com> Date: Sat, 20 Nov 2021 00:47:52 +0100 Subject: [PATCH 1/2] Fix typos --- crunchyroll.go | 2 +- format.go | 4 ++-- utils/sort.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crunchyroll.go b/crunchyroll.go index e9b1e63..189ad80 100644 --- a/crunchyroll.go +++ b/crunchyroll.go @@ -280,7 +280,7 @@ func (c *Crunchyroll) Search(query string, limit uint) (s []*Series, m []*Movie, return s, m, nil } -// FindVideo fins a Video (Season or Movie) by a crunchyroll link +// FindVideo finds a Video (Season or Movie) by a crunchyroll link // e.g. https://www.crunchyroll.com/darling-in-the-franxx func (c *Crunchyroll) FindVideo(seriesUrl string) (Video, error) { if series, ok := MatchVideo(seriesUrl); ok { diff --git a/format.go b/format.go index 691cd47..7fbdb58 100644 --- a/format.go +++ b/format.go @@ -180,7 +180,7 @@ func (f *Format) getCrypt(segment *m3u8.MediaSegment) (block cipher.Block, iv [] return block, iv, nil } -// downloadSegment downloads a segments, decrypts it and names it after the given index +// downloadSegment downloads a segment, decrypts it and names it after the given index func (f *Format) downloadSegment(segment *m3u8.MediaSegment, filename string, block cipher.Block, iv []byte) (*os.File, error) { // every segment is aes-128 encrypted and has to be decrypted when downloaded content, err := decryptSegment(f.crunchy.Client, segment, block, iv) @@ -200,7 +200,7 @@ func (f *Format) downloadSegment(segment *m3u8.MediaSegment, filename string, bl return file, nil } -// mergeSegments reads every file in tempPath and write their content to output +// mergeSegments reads every file in tempPath and writes their content to output func (f *Format) mergeSegments(tempPath string, output *os.File) error { dir, err := os.ReadDir(tempPath) if err != nil { diff --git a/utils/sort.go b/utils/sort.go index 92bd35c..628af64 100644 --- a/utils/sort.go +++ b/utils/sort.go @@ -19,7 +19,7 @@ func (mlbd MovieListingsByDuration) Less(i, j int) bool { return mlbd[i].DurationMS < mlbd[j].DurationMS } -// EpisodesByDuration episodes by their duration +// EpisodesByDuration sorts episodes by their duration type EpisodesByDuration []*crunchyroll.Episode func (ebd EpisodesByDuration) Len() int { @@ -32,7 +32,7 @@ func (ebd EpisodesByDuration) Less(i, j int) bool { return ebd[i].DurationMS < ebd[j].DurationMS } -// FormatsByResolution sort formats after their resolution +// FormatsByResolution sorts formats after their resolution type FormatsByResolution []*crunchyroll.Format func (fbr FormatsByResolution) Len() int { From 58ce651134f16259cabb1cb606e1292f2ac60cbb Mon Sep 17 00:00:00 2001 From: ByteDream <63594396+ByteDream@users.noreply.github.com> Date: Tue, 23 Nov 2021 09:29:49 +0100 Subject: [PATCH 2/2] Typo fix --- crunchyroll-go.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crunchyroll-go.1 b/crunchyroll-go.1 index 99bcb5d..40c7f83 100644 --- a/crunchyroll-go.1 +++ b/crunchyroll-go.1 @@ -119,7 +119,7 @@ Download a episode with japanese audio and american subtitles. $ crunchyroll-go download -a ja-JP -s en-US https://www.crunchyroll.com/darling-in-the-franxx/episode-1-alone-and-lonesome-759575 .SH BUGS -If you notice any bug or want a enhancement, feel free to create a new issue or pull request in the GitHub repository. +If you notice any bug or want an enhancement, feel free to create a new issue or pull request in the GitHub repository. .SH AUTHOR ByteDream