ADD thumbnail to database (#12)
* ADD thumbnail to database * ADD thumbnail generation and retrieval functionality * ADD thumbnail availability check in VideoCard component * ADD ClipDTO to reduce exposed internals * REFactor move APIResponse and VideoMetadata to dto package * REMOVE unused props from VideoCard * ADD isThumbnailAvailable function
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package com.ddf.vodsystem.entities;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class APIResponse<T> {
|
||||
private String status;
|
||||
private String message;
|
||||
private T data;
|
||||
|
||||
public APIResponse(String status, String message, T data) {
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,7 @@ public class Clip {
|
||||
|
||||
@Column(name = "video_path", nullable = false, length = 255)
|
||||
private String videoPath;
|
||||
|
||||
@Column(name = "thumbnail_path", nullable = false, length = 255)
|
||||
private String thumbnailPath;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ddf.vodsystem.entities;
|
||||
import java.io.File;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import com.ddf.vodsystem.dto.VideoMetadata;
|
||||
import org.springframework.security.core.context.SecurityContext;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.ddf.vodsystem.entities;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VideoMetadata {
|
||||
private String title;
|
||||
private String description;
|
||||
private Float startPoint;
|
||||
private Float endPoint;
|
||||
private Float fps;
|
||||
private Integer width;
|
||||
private Integer height;
|
||||
private Float fileSize;
|
||||
}
|
||||
Reference in New Issue
Block a user