handle non existing iso639-1 better

This commit is contained in:
Niko Storni 2020-10-20 17:43:25 +02:00
parent de798ade36
commit 692c796770

View file

@ -411,7 +411,7 @@ func (v *YoutubeVideo) publish(daemon *jsonrpc.Client, params SyncParams) (*Sync
}
}
info := whatlanggo.Detect(v.getAbbrevDescription())
if info.IsReliable() {
if info.IsReliable() && info.Lang.Iso6391() != "" {
language := info.Lang.Iso6391()
languages = []string{language}
}