nah, that's better...
This commit is contained in:
@@ -62,16 +62,17 @@ public class EntryDownloader implements CommandLineRunner {
|
|||||||
lastPage = entrylist.lastPage;
|
lastPage = entrylist.lastPage;
|
||||||
|
|
||||||
for (int i = 0; i < entrylist.entries.length; i++) {
|
for (int i = 0; i < entrylist.entries.length; i++) {
|
||||||
|
|
||||||
|
File targetDir = new File("E:\\" + entrylist.entries[i].mediaAssistantId);
|
||||||
|
if (targetDir.exists()) {
|
||||||
|
log.info("Skip " + entrylist.entries[i].mediaAssistantId + ", target directory already present");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String entryJson = restTemplate.exchange(mamHost + "/rest/migration/entry/{id}", HttpMethod.GET, entity, String.class, entrylist.entries[i].mediaAssistantId).getBody();
|
String entryJson = restTemplate.exchange(mamHost + "/rest/migration/entry/{id}", HttpMethod.GET, entity, String.class, entrylist.entries[i].mediaAssistantId).getBody();
|
||||||
Entry entry = jsonMapper.readValue(entryJson, Entry.class);
|
Entry entry = jsonMapper.readValue(entryJson, Entry.class);
|
||||||
|
|
||||||
File targetDir = new File("E:\\" + entry.id);
|
|
||||||
if (targetDir.exists()) {
|
|
||||||
log.info("Skip " + entry.id + ", target directory already present");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Download> downloadSelection = new ArrayList<Download>();
|
List<Download> downloadSelection = new ArrayList<Download>();
|
||||||
|
|
||||||
// Select download: Download original only. If original is not available, download largest file
|
// Select download: Download original only. If original is not available, download largest file
|
||||||
|
|||||||
Reference in New Issue
Block a user