|
@@ -68,11 +68,11 @@ const PunlishPlanDetailModal: React.FC<PunlishPlanDetailModalProps> = ({
|
|
};
|
|
};
|
|
|
|
|
|
const downloadCover = (video: VideoItem) => {
|
|
const downloadCover = (video: VideoItem) => {
|
|
- if (video.cover) {
|
|
|
|
|
|
+ if (video.shareCover) {
|
|
const link = document.createElement('a');
|
|
const link = document.createElement('a');
|
|
- link.href = video.cover;
|
|
|
|
|
|
+ link.href = video.shareCover;
|
|
// Attempt to infer filename, might need refinement
|
|
// Attempt to infer filename, might need refinement
|
|
- const filename = video.cover.substring(video.cover.lastIndexOf('/') + 1) || `cover_${video.videoId}.jpg`;
|
|
|
|
|
|
+ const filename = video.shareCover.substring(video.shareCover.lastIndexOf('/') + 1) || `cover_${video.videoId}.jpg`;
|
|
link.download = filename;
|
|
link.download = filename;
|
|
link.target = '_blank'; // Open in new tab might be safer for some browsers
|
|
link.target = '_blank'; // Open in new tab might be safer for some browsers
|
|
link.rel = 'noopener noreferrer';
|
|
link.rel = 'noopener noreferrer';
|