mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-06-03 00:58:06 -04:00
添加jellyfin client
This commit is contained in:
parent
6de5e6ab86
commit
92003797db
@ -152,7 +152,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
} else if (type.equals("Person")){
|
} else if (type.equals("Person")){
|
||||||
JsonElement ProductionLocations = JfClient.jeFromGson(detailObj,"ProductionLocations");
|
JsonElement ProductionLocations = JfClient.jeFromGson(detailObj,"ProductionLocations");
|
||||||
String PremiereDate = JfClient.strFromGson(detailObj,"PremiereDate");
|
String PremiereDate = JfClient.strFromGson(detailObj,"PremiereDate");
|
||||||
tvDetails.append("出生日期:" +PremiereDate+"\n");
|
tvDetails.append("\n出生日期:" +Utils.UtcToLocal(PremiereDate)+"\n");
|
||||||
tvDetails.append("出生地:" + ProductionLocations == null ? "" : ProductionLocations.toString());
|
tvDetails.append("出生地:" + ProductionLocations == null ? "" : ProductionLocations.toString());
|
||||||
fillItemsByPerson(Id);
|
fillItemsByPerson(Id);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,11 @@ import com.lzy.okgo.callback.StringCallback;
|
|||||||
import com.lzy.okgo.model.HttpHeaders;
|
import com.lzy.okgo.model.HttpHeaders;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import okhttp3.Call;
|
import okhttp3.Call;
|
||||||
import okhttp3.Headers;
|
import okhttp3.Headers;
|
||||||
@ -26,6 +30,23 @@ import okhttp3.Response;
|
|||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准时间转换
|
||||||
|
* @param utcTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String UtcToLocal(String utcTime){
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'");
|
||||||
|
df.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
String dt = "";
|
||||||
|
try {
|
||||||
|
dt = df.parse(utcTime).toLocaleString();
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> T JsonToObj(String jsonStr, Class<T> tClass) {
|
public static <T> T JsonToObj(String jsonStr, Class<T> tClass) {
|
||||||
if (jsonStr != null && jsonStr.length() > 0) {
|
if (jsonStr != null && jsonStr.length() > 0) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user