mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Fix for non-utf-8 URLs from LBRY.
This commit is contained in:
parent
a08151475e
commit
89a8737bcd
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import rocks.kavin.reqwest4j.ReqwestUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import static me.kavin.piped.consts.Constants.mapper;
|
||||
|
@ -56,6 +57,9 @@ public class LbryHelper {
|
|||
if (StringUtils.isEmpty(streamUrl))
|
||||
return null;
|
||||
|
||||
// LBRY provides non UTF-8 characters in the URL, which causes issues
|
||||
streamUrl = new URI(streamUrl).toASCIIString();
|
||||
|
||||
var resp = ReqwestUtils.fetch(streamUrl, "HEAD", null, Map.of(
|
||||
"Origin", "https://odysee.com",
|
||||
"Referer", "https://odysee.com/"
|
||||
|
|
Loading…
Reference in a new issue