From b8e9549304761b624e1b92c1245054a960c6297b Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Wed, 12 Nov 2025 19:54:51 -0800 Subject: add confirmation before downloading for duplicate urls checks the output dir to see if there is already a file with that videoId if it is, then show a confirmation prompt --- src/main/java/Downloader.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/Downloader.java') diff --git a/src/main/java/Downloader.java b/src/main/java/Downloader.java index aed0bb4..c480a85 100644 --- a/src/main/java/Downloader.java +++ b/src/main/java/Downloader.java @@ -254,8 +254,6 @@ public class Downloader { return true; } - - public static int timestampToSeconds(String timestamp) { int totalSeconds = 0; try { @@ -271,4 +269,8 @@ public class Downloader { } return totalSeconds; } + + public boolean videoIdAlreadyDownloaded(String videoId){ + return FileUtility.findFileContainingString(this.outputDirectory, videoId); + } } -- cgit v1.2.3