aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/Downloader.java
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-11-12 19:54:51 -0800
committerPinapelz <yukais@pinapelz.com>2025-11-12 19:54:51 -0800
commitb8e9549304761b624e1b92c1245054a960c6297b (patch)
tree5947a26bcb113521ee95ad5368e4fabf417c8019 /src/main/java/Downloader.java
parent2e37c9643c27710c42b4d265a6c28a19fcec9198 (diff)
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
Diffstat (limited to 'src/main/java/Downloader.java')
-rw-r--r--src/main/java/Downloader.java6
1 files changed, 4 insertions, 2 deletions
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);
+ }
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage