mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-10 06:20:27 -04:00
Make progress dialog indeterminate
This commit is contained in:
parent
d41d96b6e2
commit
d218fbed99
@ -323,16 +323,12 @@ class RenameAction extends AbstractAction {
|
||||
|
||||
@Override
|
||||
public Map<File, File> call(Consumer<String> message, BiConsumer<Long, Long> progress, Supplier<Boolean> cancelled) throws Exception {
|
||||
long i = 0;
|
||||
long n = renameMap.size();
|
||||
|
||||
for (Entry<File, File> mapping : renameMap.entrySet()) {
|
||||
if (cancelled.get()) {
|
||||
return renameLog;
|
||||
}
|
||||
|
||||
progress.accept(i++, n);
|
||||
message.accept(String.format("[%d / %d] %s", i, n, mapping.getKey().getName()));
|
||||
message.accept(mapping.getKey().getName());
|
||||
|
||||
// rename file, throw exception on failure
|
||||
File source = mapping.getKey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user