add update youtube-dl button

This commit is contained in:
ftg 2020-05-17 20:56:43 +02:00
parent b48c7809b9
commit a7a1115bfd
2 changed files with 5 additions and 1 deletions

View File

@ -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')

View File

@ -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