mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Added function to get audio locale
This commit is contained in:
parent
92fe5782d1
commit
1c3de9ea93
1 changed files with 8 additions and 0 deletions
|
|
@ -69,6 +69,14 @@ func SeasonFromID(crunchy *Crunchyroll, id string) (*Season, error) {
|
||||||
return season, nil
|
return season, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Season) AudioLocale() (LOCALE, error) {
|
||||||
|
episodes, err := s.Episodes()
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return episodes[0].AudioLocale()
|
||||||
|
}
|
||||||
|
|
||||||
// Episodes returns all episodes which are available for the season
|
// Episodes returns all episodes which are available for the season
|
||||||
func (s *Season) Episodes() (episodes []*Episode, err error) {
|
func (s *Season) Episodes() (episodes []*Episode, err error) {
|
||||||
if s.children != nil {
|
if s.children != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue