mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Removed subtitle by locale
This commit is contained in:
parent
1b0124e385
commit
a6858556b5
1 changed files with 0 additions and 14 deletions
|
|
@ -54,17 +54,3 @@ func LocaleLanguage(locale crunchyroll.LOCALE) string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SubtitleByLocale returns the subtitle of a crunchyroll.Format by its locale.
|
|
||||||
// Check the second ok return value if the format has this subtitle
|
|
||||||
func SubtitleByLocale(format *crunchyroll.Format, locale crunchyroll.LOCALE) (subtitle *crunchyroll.Subtitle, ok bool) {
|
|
||||||
if format.Subtitles == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
for _, sub := range format.Subtitles {
|
|
||||||
if sub.Locale == locale {
|
|
||||||
return sub, true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue