diff --git a/src/Source.java b/src/Source.java index d3d0cb4..c025e7a 100644 --- a/src/Source.java +++ b/src/Source.java @@ -59,19 +59,15 @@ public void correctTitle(String title, int season, int episode) { correctTitle(title, season, null, episode); } - public void rename(int starting) { - for(int i = starting; i < videoFiles.size(); i++) { + public void rename() { + for(int i = videoFiles.size() - 1; i >= 0; i--) { utils.renameFile(videoFiles.get(i)); } - for(int i = starting; i < subtitleFiles.size(); i++) { + for(int i = subtitleFiles.size() - 1; i >= 0; i--) { utils.renameFile(subtitleFiles.get(i)); } } - public void rename() { - rename(0); - } - public void clear() { videoFiles.clear(); diff --git a/src/Utils/Utils.java b/src/Utils/Utils.java index b27405d..9d2a517 100644 --- a/src/Utils/Utils.java +++ b/src/Utils/Utils.java @@ -36,7 +36,7 @@ public void renameFile(MediaFile mediafile) { if(file.renameTo(newFile)) { }else { - System.out.println("Failed!!"); + System.out.println("File already exists"); } }