From 99ff046d16e08c65269a3f480f7b6ba76c818353 Mon Sep 17 00:00:00 2001 From: Reeverflow Date: Sat, 21 Feb 2026 14:40:30 +0100 Subject: [PATCH] Decoupling ProcessService from Video Validation and Validation Execution --- .../services/ProcessService.java | 42 ---------------- .../services/YtdlpService.java | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 src/main/java/com/example/video_downloader/services/YtdlpService.java diff --git a/src/main/java/com/example/video_downloader/services/ProcessService.java b/src/main/java/com/example/video_downloader/services/ProcessService.java index b2d107c..00f16a1 100644 --- a/src/main/java/com/example/video_downloader/services/ProcessService.java +++ b/src/main/java/com/example/video_downloader/services/ProcessService.java @@ -1,54 +1,12 @@ package com.example.video_downloader.services; -import com.example.video_downloader.entity.StatusEnum; -import com.example.video_downloader.entity.Video; -import com.example.video_downloader.repositories.VideoRepository; -import jakarta.annotation.PostConstruct; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.web.client.HttpClientErrorException; - import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; -import static java.nio.file.Path.*; @Service public class ProcessService { - @Autowired - private VideoRepository videoRepository; - - @PostConstruct - public void validateVideos() throws HttpClientErrorException, IOException, InterruptedException { - List