From 3748afdd720f7af0e858791e6633099003418d00 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 2 Feb 2022 21:23:37 +0000 Subject: [PATCH] Fix for empty lbry streams. (#180) --- src/main/java/me/kavin/piped/utils/LbryHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/me/kavin/piped/utils/LbryHelper.java b/src/main/java/me/kavin/piped/utils/LbryHelper.java index 1fc3156..4f95b39 100644 --- a/src/main/java/me/kavin/piped/utils/LbryHelper.java +++ b/src/main/java/me/kavin/piped/utils/LbryHelper.java @@ -4,6 +4,7 @@ import me.kavin.piped.consts.Constants; import okhttp3.MediaType; import okhttp3.Request; import okhttp3.RequestBody; +import org.apache.commons.lang3.StringUtils; import org.json.JSONObject; import java.io.IOException; @@ -18,6 +19,10 @@ public class LbryHelper { public static String getLBRYStreamURL(String lbryId) throws IOException { + + if (StringUtils.isEmpty(lbryId)) + return null; + var request = new Request.Builder() .url("https://api.lbry.tv/api/v1/proxy?m=get") .post(RequestBody.create(String.valueOf(