update
This commit is contained in:
parent
8fa1f81ff9
commit
a39d99eeb6
4
pom.xml
4
pom.xml
@ -60,14 +60,14 @@
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>4.2.2</version>
|
||||
<version>4.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<version>2.0.17</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
|
@ -49,6 +49,13 @@ public class JellyfinController {
|
||||
json.put("code",0);
|
||||
}else{
|
||||
File dir=new File("web"+File.separator+"apk"+File.separator+"jellyfin"+File.separator);
|
||||
buildDownloadJson(json, appVersion, dir);
|
||||
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
private void buildDownloadJson(JSONObject json, String appVersion, File dir) {
|
||||
json.put("code",0);
|
||||
if(dir.exists()){
|
||||
for (File file : dir.listFiles()) {
|
||||
@ -62,10 +69,8 @@ public class JellyfinController {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return json;
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping("/jellyfin/updateTvApp.do")
|
||||
public JSONObject updateTvApp(String version){
|
||||
@ -75,19 +80,7 @@ public class JellyfinController {
|
||||
json.put("code",0);
|
||||
}else{
|
||||
File dir=new File("web"+File.separator+"apk"+File.separator+"jellyfinTv"+File.separator);
|
||||
json.put("code",0);
|
||||
if(dir.exists()){
|
||||
for (File file : dir.listFiles()) {
|
||||
if(file.getName().endsWith(".apk")){
|
||||
json.put("code",1);
|
||||
JSONObject data=new JSONObject();
|
||||
data.put("version",appVersion);
|
||||
data.put("url","http://nas.cnmglz.com:9999/apk"+file.getAbsolutePath().replace(new File("web"+File.separator+"apk"+File.separator).getAbsolutePath(),""));
|
||||
json.put("data",data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
buildDownloadJson(json, appVersion, dir);
|
||||
|
||||
}
|
||||
return json;
|
||||
|
Loading…
Reference in New Issue
Block a user