diff --git a/frontend/src/components/VideoListItemTable.tsx b/frontend/src/components/VideoListItemTable.tsx index 83edb39a..3542406c 100644 --- a/frontend/src/components/VideoListItemTable.tsx +++ b/frontend/src/components/VideoListItemTable.tsx @@ -6,6 +6,11 @@ import humanFileSize from '../functions/humanFileSize'; import { FileSizeUnits } from '../api/actions/updateUserConfig'; import { useUserConfigStore } from '../stores/UserConfigStore'; +const StreamsTypeEmun = { + Video: 'video', + Audio: 'audio', +}; + type VideoListItemProps = { videoList: VideoType[] | undefined; viewStyle: ViewStylesType; @@ -35,7 +40,8 @@ const VideoListItemTable = ({ videoList, viewStyle }: VideoListItemProps) => {
{videoList?.map(({ youtube_id, title, channel, vid_type, media_size, streams }) => { - const [videoStream, audioStream] = streams; + const videoStream = streams?.find(s => s.type === StreamsTypeEmun.Video); + const audioStream = streams?.find(s => s.type === StreamsTypeEmun.Audio); return (