mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
Add VideoThumbnail to video playlist view
This commit is contained in:
@@ -43,6 +43,7 @@ import { FileSizeUnits } from '../api/actions/updateUserConfig';
|
|||||||
import { useUserConfigStore } from '../stores/UserConfigStore';
|
import { useUserConfigStore } from '../stores/UserConfigStore';
|
||||||
import NotFound from './NotFound';
|
import NotFound from './NotFound';
|
||||||
import { ApiResponseType } from '../functions/APIClient';
|
import { ApiResponseType } from '../functions/APIClient';
|
||||||
|
import VideoThumbnail from '../components/VideoThumbail';
|
||||||
|
|
||||||
const isInPlaylist = (videoId: string, playlist: PlaylistType) => {
|
const isInPlaylist = (videoId: string, playlist: PlaylistType) => {
|
||||||
return playlist.playlist_entries.some(entry => {
|
return playlist.playlist_entries.some(entry => {
|
||||||
@@ -534,9 +535,8 @@ const Video = () => {
|
|||||||
{playlistItem.playlist_previous && (
|
{playlistItem.playlist_previous && (
|
||||||
<>
|
<>
|
||||||
<Link to={Routes.Video(playlistItem.playlist_previous.youtube_id)}>
|
<Link to={Routes.Video(playlistItem.playlist_previous.youtube_id)}>
|
||||||
<img
|
<VideoThumbnail
|
||||||
src={`${getApiUrl()}/${playlistItem.playlist_previous.vid_thumb}`}
|
videoThumbUrl={playlistItem.playlist_previous.vid_thumb}
|
||||||
alt="previous thumbnail"
|
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="playlist-desc">
|
<div className="playlist-desc">
|
||||||
@@ -564,10 +564,7 @@ const Video = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Link to={Routes.Video(playlistItem.playlist_next.youtube_id)}>
|
<Link to={Routes.Video(playlistItem.playlist_next.youtube_id)}>
|
||||||
<img
|
<VideoThumbnail videoThumbUrl={playlistItem.playlist_next.vid_thumb} />
|
||||||
src={`${getApiUrl()}/${playlistItem.playlist_next.vid_thumb}`}
|
|
||||||
alt="previous thumbnail"
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user