mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fix typos & add more comments
This commit is contained in:
parent
2e9ce3cf52
commit
3617955bc5
16 changed files with 82 additions and 68 deletions
4
url.go
4
url.go
|
|
@ -5,7 +5,7 @@ import (
|
|||
)
|
||||
|
||||
// ExtractEpisodesFromUrl extracts all episodes from an url.
|
||||
// If audio is not empty, the episodes gets filtered after the given locale
|
||||
// If audio is not empty, the episodes gets filtered after the given locale.
|
||||
func (c *Crunchyroll) ExtractEpisodesFromUrl(url string, audio ...LOCALE) ([]*Episode, error) {
|
||||
series, episodes, err := c.ParseUrl(url)
|
||||
if err != nil {
|
||||
|
|
@ -78,7 +78,7 @@ func (c *Crunchyroll) ExtractEpisodesFromUrl(url string, audio ...LOCALE) ([]*Ep
|
|||
}
|
||||
|
||||
// ParseUrl parses the given url into a series or episode.
|
||||
// The returning episode is a slice because non-beta urls have the same episode with different languages
|
||||
// The returning episode is a slice because non-beta urls have the same episode with different languages.
|
||||
func (c *Crunchyroll) ParseUrl(url string) (*Series, []*Episode, error) {
|
||||
if seriesId, ok := ParseBetaSeriesURL(url); ok {
|
||||
series, err := SeriesFromID(c, seriesId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue