diff --git a/includes/jplayer.theme.inc b/includes/jplayer.theme.inc index 01eacad..897ac7e 100644 --- a/includes/jplayer.theme.inc +++ b/includes/jplayer.theme.inc @@ -134,17 +134,19 @@ function jplayer_sort_files($raw_files = array(), $player_id, $type = 'single') } // Add file into correct group - if (in_array($item['ext'], $video_extensions)) { - $videos = TRUE; - $item['type'] = 'audio'; - } - elseif (in_array($item['ext'], $audio_extensions)) { - $audio = TRUE; - $item['type'] = 'video'; - } - elseif (in_array($item['ext'], $poster_extensions)) { - $poster = $item['url']; - $item['type'] = 'poster'; + if (!isset($item['type'])) { + if (in_array($item['ext'], $video_extensions)) { + $videos = TRUE; + $item['type'] = 'video'; + } + elseif (in_array($item['ext'], $audio_extensions)) { + $audio = TRUE; + $item['type'] = 'audio'; + } + elseif (in_array($item['ext'], $poster_extensions)) { + $poster = $item['url']; + $item['type'] = 'poster'; + } } $media[] = $item;