diff --git a/core/interface.py b/core/interface.py index f34b61d..6d7a731 100644 --- a/core/interface.py +++ b/core/interface.py @@ -10,6 +10,10 @@ class Interface(tk.Frame): self.master = master self.create_widgets() + def update_command(self): + command = '{}/venv/bin/pip install youtube-dl --upgrade'.format(Path(os.path.dirname(os.path.abspath(sys.argv[0]))).parent) + return command + def create_command(self): command = '{}/venv/bin/python {}'.format(Path(os.path.dirname(os.path.abspath(sys.argv[0]))).parent,os.path.abspath(sys.argv[0])) @@ -72,6 +76,7 @@ class Interface(tk.Frame): tk.Button(self.master,text='Choose folder', command = self.select_directory).grid(row=1,column=8,sticky='WE') + tk.Button(self.master,text='Update Youtube-dl', command = lambda: self.process_window(self.update_command())).grid(row=4,column=6,sticky='WE') tk.Button(self.master,text='Process', command = lambda: self.process_window(self.create_command())).grid(row=4,column=8,sticky='WE') diff --git a/install.sh b/install.sh index 82c42c9..00a7d30 100755 --- a/install.sh +++ b/install.sh @@ -35,7 +35,6 @@ touch runGUI.sh echo "#!/bin/bash" > runGUI.sh echo "" >> runGUI.sh echo cd $(pwd) >> runGUI.sh -echo "./venv/bin/pip install --upgrade youtube-dl" >> runGUI.sh echo "./venv/bin/python3 ./core/core.py -i" >> runGUI.sh chmod u+x runGUI.sh