This commit is contained in:
2023-06-20 21:59:29 +02:00
commit 8fca6d5a88
11 changed files with 241 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
public class Main {
static ArrayList<File> orphanList = new ArrayList<>();
static TorrentList torrentList = new TorrentList();
static DownloadList downloadList = new DownloadList();
static DownloadList copiedList = new DownloadList();
static ArrayList<File> downloadedFiles = new ArrayList<>();
public static void main(String[] args) throws IOException, InterruptedException {
System.out.println("ManageTorrent by SDA Corporation");
orphanList.clear();
downloadedFiles = downloadList.RequestList("\\F:\\var\\lib\\transmission-daemon\\downloads");
ArrayList<File> copiedFiles = copiedList.RequestList("\\\\dartydisk6\\downloads");
orphanList.forEach(file -> {
for (File file2 : copiedFiles) {
if (file.getName().equals(file2.getName())) {
break;
}
}
System.out.println("Orphean :" + file.getName());
});
}
public void ListTorrents() throws IOException, InterruptedException {
ArrayList<Torrent> torrentDownloadedList = torrentList.RequestList();
for (File file:downloadedFiles
) {
for (Torrent torrent:torrentDownloadedList
) {
if (file.getName().equals(torrent.name)) {
break;
}
}
orphanList.add(file);
}
}
}