From a6858556b55036f133a0d5b4a7c85933a1ab4236 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sun, 13 Feb 2022 20:36:41 +0100 Subject: [PATCH] Removed subtitle by locale --- utils/locale.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/utils/locale.go b/utils/locale.go index 708d82f..3d00648 100644 --- a/utils/locale.go +++ b/utils/locale.go @@ -54,17 +54,3 @@ func LocaleLanguage(locale crunchyroll.LOCALE) string { 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 -}