From bf269aec5e335a6076f0a03f2cb3964ea7747ad2 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 23 Nov 2022 21:24:30 +0000 Subject: [PATCH] Fix syncrunner extracting Streams unnecessarily. --- src/main/java/me/kavin/piped/utils/matrix/SyncRunner.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/matrix/SyncRunner.java b/src/main/java/me/kavin/piped/utils/matrix/SyncRunner.java index 5e9dfc0..55ffe52 100644 --- a/src/main/java/me/kavin/piped/utils/matrix/SyncRunner.java +++ b/src/main/java/me/kavin/piped/utils/matrix/SyncRunner.java @@ -141,8 +141,10 @@ public class SyncRunner implements Runnable { info.getViews(), info.getDuration(), info.getTitle())) { - VideoHelpers.handleNewVideo("https://www.youtube.com/watch?v=" + info.getVideoId(), - System.currentTimeMillis(), null); + var channel = DatabaseHelper.getChannelFromId(info.getUploaderId()); + if (channel != null) + VideoHelpers.handleNewVideo("https://www.youtube.com/watch?v=" + info.getVideoId(), + System.currentTimeMillis(), channel); } });