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 1a03298..b2d107c 100644 --- a/src/main/java/com/example/video_downloader/services/ProcessService.java +++ b/src/main/java/com/example/video_downloader/services/ProcessService.java @@ -6,11 +6,17 @@ 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 { @@ -18,27 +24,29 @@ public class ProcessService { private VideoRepository videoRepository; @PostConstruct - public void validateVideos() throws IOException, InterruptedException { + public void validateVideos() throws HttpClientErrorException, IOException, InterruptedException { List