From a39bad0f132f9fc62c7f1d942fd342fdeb966598 Mon Sep 17 00:00:00 2001 From: Reeverflow Date: Tue, 17 Feb 2026 21:42:55 +0100 Subject: [PATCH] Added video downloading from database url. Added findByStatus, any entry with NEW status in the db will have their url returned. Currently to add entries to the database POSTMAN or other apps need to be used. --- .../VideoDownloaderApplication.java | 1 + .../repositories/VideoRepository.java | 4 +++ .../services/ProcessService.java | 26 +++++++++++++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/video_downloader/VideoDownloaderApplication.java b/src/main/java/com/example/video_downloader/VideoDownloaderApplication.java index 68beb82..3b61d97 100644 --- a/src/main/java/com/example/video_downloader/VideoDownloaderApplication.java +++ b/src/main/java/com/example/video_downloader/VideoDownloaderApplication.java @@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class VideoDownloaderApplication { public static void main(String[] args) { + SpringApplication.run(VideoDownloaderApplication.class, args); } } diff --git a/src/main/java/com/example/video_downloader/repositories/VideoRepository.java b/src/main/java/com/example/video_downloader/repositories/VideoRepository.java index 77650f4..84405bb 100644 --- a/src/main/java/com/example/video_downloader/repositories/VideoRepository.java +++ b/src/main/java/com/example/video_downloader/repositories/VideoRepository.java @@ -1,9 +1,13 @@ package com.example.video_downloader.repositories; +import com.example.video_downloader.entity.StatusEnum; import com.example.video_downloader.entity.Video; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface VideoRepository extends JpaRepository { + List