mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-10 16:00:33 -07:00
fix: manually encoded the username when creating the uri for streaming and fetching coverArt
This commit is contained in:
parent
0201077bc4
commit
af83ffd608
3 changed files with 16 additions and 4 deletions
|
|
@ -1,5 +1,8 @@
|
|||
package com.cappielloantonio.tempo.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
|
|
@ -50,4 +53,12 @@ public class Util {
|
|||
|
||||
return pascalCase.toString();
|
||||
}
|
||||
|
||||
public static String encode(String value) {
|
||||
try {
|
||||
return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue