update RedisTools
update BTDownload
This commit is contained in:
parent
32b53a6a16
commit
0a15594184
@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import;
|
|||||||
@Import(DmhyRssDownloadManager.class)
|
@Import(DmhyRssDownloadManager.class)
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class NasApplication {
|
public class NasApplication {
|
||||||
public static final String version = "1.2.17.1";
|
public static final String version = "1.2.17.2";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(NasApplication.class, args);
|
SpringApplication.run(NasApplication.class, args);
|
||||||
|
@ -106,10 +106,12 @@ public class BTDownloadManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static void done(String path,String filename,String hash1,String hash2,String tid) {
|
public synchronized static void done(String path,String filename,String hash1,String hash2,String tid) {
|
||||||
grep(path,filename);
|
//grep(path,filename);
|
||||||
|
System.out.println("path = " + path + ", filename = " + filename + ", hash1 = " + hash1 + ", hash2 = " + hash2 + ", tid = " + tid);
|
||||||
String hash=StringUtils.isEmpty(hash1)?StringUtils.isEmpty(hash2)?null:hash2:hash1;
|
String hash=StringUtils.isEmpty(hash1)?StringUtils.isEmpty(hash2)?null:hash2:hash1;
|
||||||
if(hash!=null){
|
if(hash!=null){
|
||||||
String map = RedisTools.getHashMap("rss", hash);
|
String map = RedisTools.getHashMap("rss", hash);
|
||||||
|
System.out.println("map = " + map);
|
||||||
JSONObject item=JSON.parseObject(map);
|
JSONObject item=JSON.parseObject(map);
|
||||||
if (item.containsKey("thumbnail")) {
|
if (item.containsKey("thumbnail")) {
|
||||||
onSend(item.getString("thumbnail"), item,item.getJSONObject("enclosure").getString("link"));
|
onSend(item.getString("thumbnail"), item,item.getJSONObject("enclosure").getString("link"));
|
||||||
|
@ -14,6 +14,11 @@ public class PatternTools {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
public static String getMagnetHash(String magnetLink){
|
public static String getMagnetHash(String magnetLink){
|
||||||
return Objects.requireNonNull(exec(".(?<=btih:).*(?=&dn)", magnetLink)).substring(1);
|
System.out.println("magnetLink = " + magnetLink);
|
||||||
|
String ret=exec(".(?<=btih:).*(?=&dn)", magnetLink);
|
||||||
|
if(ret==null){
|
||||||
|
ret=exec(".(?<=btih:).*(?=&dn)",magnetLink);
|
||||||
|
}
|
||||||
|
return Objects.requireNonNull(ret).substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user