From 3d328f8ed2e839cac142abbe905eeac4471ec071 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 5 Mar 2023 15:56:20 -0800 Subject: Updated .gitinore and remove checkUpdate() --- src/main/java/Main.java | 57 ------------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'src') diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 9a971da..cf81d38 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -237,12 +237,8 @@ public class Main extends JFrame { panel.add(useBlacklistBox); panel.add(Box.createVerticalStrut(8)); panel.add(version); - //panel.add(Box.createVerticalStrut(5)); - //panel.add(songsGen); - this.setSize(550,450); this.setTitle("YTMP3Tagger"); - checkUpdate(); } @@ -328,59 +324,6 @@ public class Main extends JFrame { } }); } - private void checkUpdate(){ //Check website for any updates and if the versions do not match then download new upate - try{ - URL url = new URL(versionURL); - URLConnection con = url.openConnection(); - InputStream in = con.getInputStream(); - String encoding = con.getContentEncoding(); - encoding = encoding == null ? "UTF-8" : encoding; - String body = IOUtils.toString(in, encoding); - ArrayList lines = new ArrayList(Arrays.asList(body.split("\\r?\\n"))); - if(VERSION.equals(lines.get(0))){ - System.out.println("Program is up to date"); - } - else{ - int dialogResult = JOptionPane.showConfirmDialog (null, "New Version Found!\nWould you like to download the new version?","New Version Found!",JOptionPane.YES_NO_OPTION); - if(dialogResult==JOptionPane.YES_OPTION){ - lines.remove(0); - for(int i =0;i