public static void fetchAllCategories() {
        Thread thread = new Thread() {
            @Override
            public void run() {
                super.run();

                String updateString = "";
                int fetched_cat = 0;
                int fetched_chan = 0;
                int size_cat = categories.size();
                int size_chan;
                for(Map.Entry<String, Category> entry : categories.entrySet()) {
                    fetched_cat++;

                    fetched_chan = 0;
                    List<YTChannel> channels = categories.get(entry.getValue().toString().toLowerCase()).getChannels();
                    size_chan = channels.size();
                    for (YTChannel channel : channels) {
                        fetched_chan++;
                        gui.labelThing.setText("Fetching category " + fetched_cat + "/" + size_cat + " - Channel " + fetched_chan + "/" + size_chan);

                        fetchUpdate(channel, false);
                        while(isWorking) {
                            try {
                                Thread.sleep(500);
                            } catch (InterruptedException e) {
                                e.printStackTrace();
                            }
                        }
                        if(!returnText.equals("NaN"))
                            updateString = updateString + returnText;
                    }
                }
                if(!updateString.isEmpty()) {
                    JOptionPane.showMessageDialog(gui.panel1, updateString);
                }
                else {
                    JOptionPane.showMessageDialog(gui.panel1, "No new videos from your channels.\nCheck back later!");
                }
                gui.labelThing.setText("");
                gui.loadingSub.setText("");
                gui.buttonFunc = true;
                gui.categories.setEnabled(true);
                gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            }
        };
        gui.buttonFunc = false;
        gui.categories.setEnabled(false);
        gui.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        thread.start();
    }