From 7f117f572fa22f2d3ce9a3b0bb612326e6ad38a0 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sat, 29 Apr 2023 20:05:21 +0100 Subject: [PATCH] Faster checks for video exists. --- .../java/me/kavin/piped/utils/DatabaseHelper.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/DatabaseHelper.java b/src/main/java/me/kavin/piped/utils/DatabaseHelper.java index 9a6dead..696a2bc 100644 --- a/src/main/java/me/kavin/piped/utils/DatabaseHelper.java +++ b/src/main/java/me/kavin/piped/utils/DatabaseHelper.java @@ -97,12 +97,11 @@ public class DatabaseHelper { } public static boolean doesVideoExist(SharedSessionContract s, String id) { - CriteriaBuilder cb = s.getCriteriaBuilder(); - CriteriaQuery cr = cb.createQuery(String.class); - Root