diff --git a/guessit.go b/guessit.go index a9a6fe2..2903527 100644 --- a/guessit.go +++ b/guessit.go @@ -45,6 +45,7 @@ func (u *Match) UnmarshalJSON(data []byte) error { type Alias Match aux := &struct { AudioCodec interface{} `json:"audio_codec,omitempty"` + Other interface{} `json:"other,omitempty"` *Alias }{ Alias: (*Alias)(u), @@ -61,6 +62,13 @@ func (u *Match) UnmarshalJSON(data []byte) error { u.AudioCodec = ac } + switch oth := aux.AudioCodec.(type) { + case string: + u.AudioCodec = append(u.AudioCodec, oth) + case []string: + u.AudioCodec = oth + } + return nil }