mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
Fix for empty lbry streams. (#180)
This commit is contained in:
parent
c07cf5fd1f
commit
3748afdd72
@ -4,6 +4,7 @@ import me.kavin.piped.consts.Constants;
|
|||||||
import okhttp3.MediaType;
|
import okhttp3.MediaType;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -18,6 +19,10 @@ public class LbryHelper {
|
|||||||
|
|
||||||
public static String getLBRYStreamURL(String lbryId)
|
public static String getLBRYStreamURL(String lbryId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(lbryId))
|
||||||
|
return null;
|
||||||
|
|
||||||
var request = new Request.Builder()
|
var request = new Request.Builder()
|
||||||
.url("https://api.lbry.tv/api/v1/proxy?m=get")
|
.url("https://api.lbry.tv/api/v1/proxy?m=get")
|
||||||
.post(RequestBody.create(String.valueOf(
|
.post(RequestBody.create(String.valueOf(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user