Initial
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user