新增对Jellyfin的搜刮(但未完成自动化)
新增音乐分享功能 修复BT下载地址错误
This commit is contained in:
@@ -54,6 +54,27 @@ public class ConfigTools {
|
||||
return def;
|
||||
}
|
||||
|
||||
public static String loadIni(File file, String key) {
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new FileReader(file));
|
||||
String tmp, str = null;
|
||||
while ((tmp = reader.readLine()) != null) {
|
||||
if(tmp.startsWith(key+"=")){
|
||||
str=tmp.split("=")[1];
|
||||
if(StringUtils.isEmpty(str)){
|
||||
str=null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean save(String type, String key, Object data) {
|
||||
File file = new File(type);
|
||||
String src = readFile(file);
|
||||
|
||||
Reference in New Issue
Block a user