Skip to content

Commit

Permalink
修改同步目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
907739769 committed Sep 20, 2024
1 parent f18a52f commit 663db8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
自动删除本地过时文件夹及文件(小雅媒体库网站不存在的文件及文件夹,不会删除其他目录的文件),网站上面文件的和本地
同名文件不会删除,防止网站没有nfo等文件,但是本地有nfo等文件,导致误删nfo等文件

`https://emby.xiaoya.pro/` `https://icyou.eu.org/` `https://lanyuewan.cn/` `https://emby.8.net.co/` `https://emby.raydoom.tk/` `https://emby.kaiserver.uk/` `https://embyxiaoya.laogl.top/`
`https://emby.xiaoya.pro/` `https://icyou.eu.org/` `https://emby.8.net.co/` `https://emby.raydoom.tk/` `https://emby.kaiserver.uk/` `https://embyxiaoya.laogl.top/`
`https://emby-data.raydoom.tk/` `https://emby-data.5168168.xyz/` `https://emby-data.ermaokj.com/` `https://emby-data.tmxy.pp.ua/` `https://emby-data.poxi1221.eu.org/`

以上网站会同步以下指定目录
Expand Down Expand Up @@ -47,6 +47,7 @@ PikPak/
20240604 增加tg消息推送文件同步情况、机器人命令手动执行任务,新增参数tgToken、tgUserId,机器人命令包括/sync和/syncdir,syncdir后面追加指定路径参数可以同步指定路径数据,例如/syncdir 每日更新/电影/中国/
20240614 优化内存占用,减少无任务期间内存占用
20240629 增加是否重新下载本地0KB大小的文件 默认不启用0,启用填1
20240920 修改同步目录结构
```

## docker部署
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/cn/jackding/xiaoyasync/SyncService.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public class SyncService {
private String retryDownEmptyFile;

//在这个列表里面的就会执行删除操作
private List<String> syncList = Arrays.asList("每日更新/.*,电影/2023/.*,纪录片(已刮削)/.*,音乐/演唱会/.*,音乐/狄更斯:音乐剧 (2023)/.*".split(","));
private List<String> syncList = Arrays.asList("115/.*,PikPak/.*,动漫/.*,每日更新/.*,电影/.*,电视剧/.*,纪录片/.*,纪录片(已刮削)/.*,综艺/.*,音乐/.*,\uD83D\uDCFA画质演示测试(4K,8K,HDR,Dolby)/.*".split(","));

//这个是全部元数据的网站列表 在这个列表里面就同步全部元数据并且删除过时数据 否则不会删除
private final List<String> allBaseUrl = Arrays.asList("https://icyou.eu.org/,https://lanyuewan.cn/,https://emby.8.net.co/,https://emby.raydoom.tk/,https://emby.kaiserver.uk/,https://embyxiaoya.laogl.top/,https://emby.xiaoya.pro/,https://emby-data.raydoom.tk/,https://emby-data.5168168.xyz/,https://emby-data.ermaokj.com/,https://emby-data.tmxy.pp.ua/,https://emby-data.poxi1221.eu.org/".split(","));
private final List<String> allBaseUrl = Arrays.asList("https://icyou.eu.org/,https://emby.8.net.co/,https://emby.raydoom.tk/,https://emby.kaiserver.uk/,https://embyxiaoya.laogl.top/,https://emby.xiaoya.pro/,https://emby-data.raydoom.tk/,https://emby-data.5168168.xyz/,https://emby-data.ermaokj.com/,https://emby-data.tmxy.pp.ua/,https://emby-data.poxi1221.eu.org/".split(","));

private volatile String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0";

Expand Down Expand Up @@ -255,10 +255,6 @@ public void init() {
}
//本地路径加上分隔符
localDir = localDir.endsWith(File.separator) ? localDir : localDir + File.separator;
//如果是这些网站 同步的文件会多一些
if (allBaseUrl.contains(useBaseUrl)) {
syncList = Arrays.asList("每日更新/.*,电影/.*,纪录片(已刮削)/.*,音乐/.*,PikPak/.*,动漫/.*,电视剧/.*,纪录片/.*,综艺/.*,\uD83D\uDCFA画质演示测试(4K,8K,HDR,Dolby)/".split(","));
}
}

private void deleteDirectory(File directory) {
Expand Down

0 comments on commit 663db8a

Please sign in to comment.