From 06cd33151ca4f9090add7ec264ef964399084af4 Mon Sep 17 00:00:00 2001 From: Brendan Date: Mon, 16 Sep 2019 17:16:16 -0700 Subject: [PATCH] Content download and output working. --- continuity.ui | 468 ++++++++++++++++++++++---------------------------- main.py | 330 +++++++++++++++++++++-------------- status.txt | 4 + 3 files changed, 407 insertions(+), 395 deletions(-) create mode 100644 status.txt diff --git a/continuity.ui b/continuity.ui index 919f3af..3e1bb8a 100644 --- a/continuity.ui +++ b/continuity.ui @@ -7,8 +7,8 @@ 0 0 - 394 - 708 + 377 + 522 @@ -19,297 +19,232 @@ - 394 - 0 + 377 + 522 + + + + + 377 + 522 Continuity 0.0.1 - - - - - 1 - - - - Audio - - + + + + 10 + 10 + 361 + 251 + + + + 1 + + + + Audio + + + + + + URL: + + + + + + + Playlist + + + + + + + Paste URL here + + + + + + + Audio Format: + + + + + - - - URL: - - + + Ogg + - - - Paste URL here - - + + MP3 + - - - Audio Format: - - + + FLAC + + + + + + + + Bitrate: + + + + + + + + 128 kb/s + - - - - Ogg - - - - - MP3 - - - - - FLAC - - - + + 192 kb/s + - - - Bitrate: - - + + 320 kb/s + - - - - 128 kb/s - - - - - 192 kb/s - - - - - 320 kb/s - - - + + Best + + + + + + + + + Video + + + + + + URL: + + + + + + + Playlist + + + + + + + Paste URL here + + + + + + + Video Format: + + + + + + + + MP4 + - - - Play when finished?: - - + + AVI + - - - - yes - - - - - no - - - + + WEBM + + + + + + + Resolution: + + + + + - - - Changelog: - - + + Best + - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">* added more buttons</p></body></html> - - - - - - - OK - - - - - - - Reset - - - - - - - - Video - - - - - - URL: - - - - - - - Paste URL here - - - - - - - Video Format: - - - - - - - - MP4 - - - - - AVI - - - - - WEBM - - - - - - - - Bitrate: - - - - - - - - 128 kb/s - - - - - 192 kb/s - - - - - 320 kb/s - - - - - - - - Play when finished?: - - - - - - - - yes - - - - - no - - - - - - - - Changelog: - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">* added more buttons</p></body></html> - - - - - - - OK - - - - - - - Reset - - - - - - - - - - - 24 - - - - - - - Status Output - - - - + + + + + + + + + 120 + 430 + 141 + 34 + + + + Download + + + + + + 10 + 270 + 361 + 141 + + + + + + + 10 + 410 + 361 + 23 + + + + 24 + + 0 0 - 394 - 29 + 377 + 30 @@ -351,6 +286,13 @@ p, li { white-space: pre-wrap; } + + + KPushButton + QPushButton +
kpushbutton.h
+
+
diff --git a/main.py b/main.py index 82a09c2..6272367 100755 --- a/main.py +++ b/main.py @@ -7,73 +7,59 @@ # # WARNING! All changes made in this file will be lost! +import sys, os, subprocess, time, psutil +from PyQt5.QtWidgets import QApplication, QPushButton from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") - MainWindow.resize(394, 708) + MainWindow.resize(377, 522) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) - MainWindow.setMinimumSize(QtCore.QSize(394, 0)) + MainWindow.setMinimumSize(QtCore.QSize(377, 522)) + MainWindow.setMaximumSize(QtCore.QSize(377, 522)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") - self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) - self.verticalLayout.setObjectName("verticalLayout") self.tabs = QtWidgets.QTabWidget(self.centralwidget) + self.tabs.setGeometry(QtCore.QRect(10, 10, 361, 251)) self.tabs.setObjectName("tabs") self.audioTab = QtWidgets.QWidget() self.audioTab.setObjectName("audioTab") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.audioTab) self.verticalLayout_2.setObjectName("verticalLayout_2") - self.url_label = QtWidgets.QLabel(self.audioTab) - self.url_label.setObjectName("url_label") - self.verticalLayout_2.addWidget(self.url_label) + self.audio_url_label = QtWidgets.QLabel(self.audioTab) + self.audio_url_label.setObjectName("audio_url_label") + self.verticalLayout_2.addWidget(self.audio_url_label) + self.audio_tab_playlist = QtWidgets.QCheckBox(self.audioTab) + self.audio_tab_playlist.setObjectName("audio_tab_playlist") + self.verticalLayout_2.addWidget(self.audio_tab_playlist) self.audio_url_entry = QtWidgets.QLineEdit(self.audioTab) self.audio_url_entry.setObjectName("audio_url_entry") self.verticalLayout_2.addWidget(self.audio_url_entry) - self.audio_format_select_label = QtWidgets.QLabel(self.audioTab) - self.audio_format_select_label.setObjectName("audio_format_select_label") - self.verticalLayout_2.addWidget(self.audio_format_select_label) + self.audio_format_label = QtWidgets.QLabel(self.audioTab) + self.audio_format_label.setObjectName("audio_format_label") + self.verticalLayout_2.addWidget(self.audio_format_label) self.audio_format_select = QtWidgets.QComboBox(self.audioTab) self.audio_format_select.setObjectName("audio_format_select") - self.audio_format_select.addItem("") - self.audio_format_select.addItem("") - self.audio_format_select.addItem("") + self.audio_format_select.addItem("mp3") + self.audio_format_select.addItem("ogg") + self.audio_format_select.addItem("flac") self.verticalLayout_2.addWidget(self.audio_format_select) - self.bitrate_select_label_a = QtWidgets.QLabel(self.audioTab) - self.bitrate_select_label_a.setObjectName("bitrate_select_label_a") - self.verticalLayout_2.addWidget(self.bitrate_select_label_a) - self.bitrate_select_a = QtWidgets.QComboBox(self.audioTab) - self.bitrate_select_a.setObjectName("bitrate_select_a") - self.bitrate_select_a.addItem("") - self.bitrate_select_a.addItem("") - self.bitrate_select_a.addItem("") - self.verticalLayout_2.addWidget(self.bitrate_select_a) - self.play_finished_label = QtWidgets.QLabel(self.audioTab) - self.play_finished_label.setObjectName("play_finished_label") - self.verticalLayout_2.addWidget(self.play_finished_label) - self.play_finished_select = QtWidgets.QComboBox(self.audioTab) - self.play_finished_select.setObjectName("play_finished_select") - self.play_finished_select.addItem("") - self.play_finished_select.addItem("") - self.verticalLayout_2.addWidget(self.play_finished_select) - self.changelog_box_label_a = QtWidgets.QLabel(self.audioTab) - self.changelog_box_label_a.setObjectName("changelog_box_label_a") - self.verticalLayout_2.addWidget(self.changelog_box_label_a) - self.changelog_text_box_a = QtWidgets.QTextBrowser(self.audioTab) - self.changelog_text_box_a.setObjectName("changelog_text_box_a") - self.verticalLayout_2.addWidget(self.changelog_text_box_a) - self.ok_button_a = QtWidgets.QPushButton(self.audioTab) - self.ok_button_a.setObjectName("ok_button_a") - self.verticalLayout_2.addWidget(self.ok_button_a) - self.reset_button_a = QtWidgets.QPushButton(self.audioTab) - self.reset_button_a.setObjectName("reset_button_a") - self.verticalLayout_2.addWidget(self.reset_button_a) + self.bitrate_select_label = QtWidgets.QLabel(self.audioTab) + self.bitrate_select_label.setObjectName("bitrate_select_label") + self.verticalLayout_2.addWidget(self.bitrate_select_label) + self.bitrate_select = QtWidgets.QComboBox(self.audioTab) + self.bitrate_select.setObjectName("bitrate_select") + self.bitrate_select.addItem("Best") + #self.bitrate_select.addItem("128K") + #self.bitrate_select.addItem("256K") + #self.bitrate_select.addItem("320K") + self.verticalLayout_2.addWidget(self.bitrate_select) self.tabs.addTab(self.audioTab, "") self.videoTab = QtWidgets.QWidget() self.videoTab.setObjectName("videoTab") @@ -82,59 +68,45 @@ class Ui_MainWindow(object): self.video_url_label = QtWidgets.QLabel(self.videoTab) self.video_url_label.setObjectName("video_url_label") self.verticalLayout_4.addWidget(self.video_url_label) - self.url_entry_box_3 = QtWidgets.QLineEdit(self.videoTab) - self.url_entry_box_3.setObjectName("url_entry_box_3") - self.verticalLayout_4.addWidget(self.url_entry_box_3) - self.video_format_select_label = QtWidgets.QLabel(self.videoTab) - self.video_format_select_label.setObjectName("video_format_select_label") - self.verticalLayout_4.addWidget(self.video_format_select_label) + self.video_tab_playlist = QtWidgets.QCheckBox(self.videoTab) + self.video_tab_playlist.setObjectName("video_tab_playlist") + self.verticalLayout_4.addWidget(self.video_tab_playlist) + self.video_url_entry = QtWidgets.QLineEdit(self.videoTab) + self.video_url_entry.setObjectName("video_url_entry") + self.verticalLayout_4.addWidget(self.video_url_entry) + self.video_format_label = QtWidgets.QLabel(self.videoTab) + self.video_format_label.setObjectName("video_format_label") + self.verticalLayout_4.addWidget(self.video_format_label) self.video_format_select = QtWidgets.QComboBox(self.videoTab) self.video_format_select.setObjectName("video_format_select") - self.video_format_select.addItem("") - self.video_format_select.addItem("") - self.video_format_select.addItem("") + self.video_format_select.addItem("mp4") + self.video_format_select.addItem("mkv") + self.video_format_select.addItem("webm") + self.video_format_select.addItem("flv") self.verticalLayout_4.addWidget(self.video_format_select) - self.bitrate_select_label_v = QtWidgets.QLabel(self.videoTab) - self.bitrate_select_label_v.setObjectName("bitrate_select_label_v") - self.verticalLayout_4.addWidget(self.bitrate_select_label_v) - self.bitrate_select_v = QtWidgets.QComboBox(self.videoTab) - self.bitrate_select_v.setObjectName("bitrate_select_v") - self.bitrate_select_v.addItem("") - self.bitrate_select_v.addItem("") - self.bitrate_select_v.addItem("") - self.verticalLayout_4.addWidget(self.bitrate_select_v) - self.play_finished_label_v = QtWidgets.QLabel(self.videoTab) - self.play_finished_label_v.setObjectName("play_finished_label_v") - self.verticalLayout_4.addWidget(self.play_finished_label_v) - self.play_finished_select_v = QtWidgets.QComboBox(self.videoTab) - self.play_finished_select_v.setObjectName("play_finished_select_v") - self.play_finished_select_v.addItem("") - self.play_finished_select_v.addItem("") - self.verticalLayout_4.addWidget(self.play_finished_select_v) - self.changelog_box_label_v = QtWidgets.QLabel(self.videoTab) - self.changelog_box_label_v.setObjectName("changelog_box_label_v") - self.verticalLayout_4.addWidget(self.changelog_box_label_v) - self.changelog_text_box_3 = QtWidgets.QTextBrowser(self.videoTab) - self.changelog_text_box_3.setObjectName("changelog_text_box_3") - self.verticalLayout_4.addWidget(self.changelog_text_box_3) - self.ok_button_3 = QtWidgets.QPushButton(self.videoTab) - self.ok_button_3.setObjectName("ok_button_3") - self.verticalLayout_4.addWidget(self.ok_button_3) - self.reset_button_3 = QtWidgets.QPushButton(self.videoTab) - self.reset_button_3.setObjectName("reset_button_3") - self.verticalLayout_4.addWidget(self.reset_button_3) + self.resolution_select_label = QtWidgets.QLabel(self.videoTab) + self.resolution_select_label.setObjectName("resolution_select_label") + self.verticalLayout_4.addWidget(self.resolution_select_label) + self.resolution_select = QtWidgets.QComboBox(self.videoTab) + self.resolution_select.setObjectName("resolution_select") + self.resolution_select.addItem("480") + self.resolution_select.addItem("720") + self.resolution_select.addItem("1080") + self.verticalLayout_4.addWidget(self.resolution_select) self.tabs.addTab(self.videoTab, "") - self.verticalLayout.addWidget(self.tabs) - self.main_progress_bar = QtWidgets.QProgressBar(self.centralwidget) - self.main_progress_bar.setProperty("value", 24) - self.main_progress_bar.setObjectName("main_progress_bar") - self.verticalLayout.addWidget(self.main_progress_bar) - self.status_text_label = QtWidgets.QLabel(self.centralwidget) - self.status_text_label.setObjectName("status_text_label") - self.verticalLayout.addWidget(self.status_text_label) + self.download_button = QPushButton(self.centralwidget) + self.download_button.setGeometry(QtCore.QRect(120, 430, 141, 34)) + self.download_button.setObjectName("download_button") + self.output_window = QtWidgets.QTextBrowser(self.centralwidget) + self.output_window.setGeometry(QtCore.QRect(10, 270, 361, 141)) + self.output_window.setObjectName("output_window") + self.progressBar = QtWidgets.QProgressBar(self.centralwidget) + self.progressBar.setGeometry(QtCore.QRect(10, 410, 361, 23)) + self.progressBar.setProperty("value", 0) + self.progressBar.setObjectName("progressBar") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 394, 29)) + self.menubar.setGeometry(QtCore.QRect(0, 0, 377, 30)) self.menubar.setObjectName("menubar") self.menuMandy = QtWidgets.QMenu(self.menubar) self.menuMandy.setObjectName("menuMandy") @@ -160,69 +132,163 @@ class Ui_MainWindow(object): self.menubar.addAction(self.menuAbout.menuAction()) self.retranslateUi(MainWindow) - self.tabs.setCurrentIndex(1) + self.tabs.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) + def dl_content(self): + index = self.tabs.currentIndex() + if index == 0: + url = self.audio_url_entry.text() + if "https://" not in url[:8]: + if "http://" not in url[:7]: + self.output_window.append("That is not a valid url.") + return + self.output_window.append("Downloading " + url + "...") + self.output_window.repaint() + playlist = self.audio_tab_playlist.isChecked() + audio_format = self.audio_format_select.currentText() + + #command = "youtube-dl " + #if playlist == 1: + # command = command + "--yes-playlist " + #command = command + "--extract-audio " + #command = command + "--audio-format " + #command = command + audio_format + #command = command + " -o '%(title)s.%(ext)s' " + #command = command + url + + if playlist == 0: + subprocess.Popen(["youtube-dl", "--extract-audio", "--audio-format", audio_format, "-o '%(title)s.%(ext)s'", url], stdout=open('status.txt', 'w'), encoding='utf-8') + timeout = 0 + for p in psutil.process_iter(attrs=['name']): + while p.info['name'] == "youtube-dl": + b = open('status.txt', 'r', encoding='utf-8') + self.output_window.clear() + self.output_window.append(b.read()) + self.output_window.repaint() + time.sleep(2) + if p.info['name'] == "youtube-dl": + size = os.path.getsize("status.txt") + if size == os.path.getsize("status.txt"): + timeout = timeout + 1 + if timeout == 30: + break + #b.close() + if playlist == 1: + subprocess.run(["youtube-dl", "--yes-playlist", "--extract-audio", "--audio-format", audio_format, "-o '%(title)s.%(ext)s'", url], stdout=open('status.txt', 'w'), encoding='utf-8') + timeout = 0 + for p in psutil.process_iter(attrs=['name']): + while p.info['name'] == "youtube-dl": + b = open('status.txt', 'r', encoding='utf-8') + self.output_window.clear() + self.output_window.append(b.read()) + self.output_window.repaint() + time.sleep(2) + if p.info['name'] == "youtube-dl": + size = os.path.getsize("status.txt") + if size == os.path.getsize("status.txt"): + timeout = timeout + 1 + if timeout == 30: + break + if index == 1: + url = self.video_url_entry.text() + if "https://" not in url[:8]: + if "http://" not in url[:7]: + self.output_window.append("That is not a valid url.") + return + self.output_window.append("Downloading " + url + "...") + self.output_window.repaint() + playlist = self.video_tab_playlist.isChecked() + video_format = self.video_format_select.currentText() + resolution = self.resolution_select.currentText() + command = "(" + video_format + ")[height<=" + resolution + "]'" + if playlist == 0: + print("video playlist 0") + subprocess.Popen(["youtube-dl", "-f", command, "-o '%(title)s.%(ext)s'", url], stdout=open('status.txt', 'w'), encoding='utf-8') + timeout = 0 + for p in psutil.process_iter(attrs=['name']): + print("process for") + while p.info['name'] == "youtube-dl": + print("file open") + b = open('status.txt', 'r', encoding='utf-8') + self.output_window.clear() + self.output_window.append(b.read()) + self.output_window.repaint() + time.sleep(2) + if p.info['name'] == "youtube-dl": + print("size check") + size = os.path.getsize("status.txt") + if size == os.path.getsize("status.txt"): + timeout = timeout + 1 + if timeout == 30: + break + if playlist == 1: + subprocess.Popen(["youtube-dl", "--yes-playlist", "-f", command, "-o '%(title)s.%(ext)s'", url], stdout=open('status.txt', 'w'), encoding='utf-8') + timeout = 0 + for p in psutil.process_iter(attrs=['name']): + while p.info['name'] == "youtube-dl": + b = open('status.txt', 'r', encoding='utf-8') + self.output_window.clear() + self.output_window.append(b.read()) + self.output_window.repaint() + time.sleep(2) + if p.info['name'] == "youtube-dl": + size = os.path.getsize("status.txt") + if size == os.path.getsize("status.txt"): + timeout = timeout + 1 + if timeout == 30: + break + self.output_window.append("File Download Complete!") + + + + + + + def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "Continuity 0.0.1")) - self.url_label.setText(_translate("MainWindow", "URL:")) + self.audio_url_label.setText(_translate("MainWindow", "URL:")) + self.audio_tab_playlist.setText(_translate("MainWindow", "Playlist")) self.audio_url_entry.setText(_translate("MainWindow", "Paste URL here")) - self.audio_format_select_label.setText(_translate("MainWindow", "Audio Format:")) - self.audio_format_select.setItemText(0, _translate("MainWindow", "Ogg")) - self.audio_format_select.setItemText(1, _translate("MainWindow", "MP3")) - self.audio_format_select.setItemText(2, _translate("MainWindow", "FLAC")) - self.bitrate_select_label_a.setText(_translate("MainWindow", "Bitrate:")) - self.bitrate_select_a.setItemText(0, _translate("MainWindow", "128 kb/s")) - self.bitrate_select_a.setItemText(1, _translate("MainWindow", "192 kb/s")) - self.bitrate_select_a.setItemText(2, _translate("MainWindow", "320 kb/s")) - self.play_finished_label.setText(_translate("MainWindow", "Play when finished?:")) - self.play_finished_select.setItemText(0, _translate("MainWindow", "yes")) - self.play_finished_select.setItemText(1, _translate("MainWindow", "no")) - self.changelog_box_label_a.setText(_translate("MainWindow", "Changelog:")) - self.changelog_text_box_a.setHtml(_translate("MainWindow", "\n" -"\n" -"

* added more buttons

")) - self.ok_button_a.setText(_translate("MainWindow", "OK")) - self.reset_button_a.setText(_translate("MainWindow", "Reset")) + self.audio_format_label.setText(_translate("MainWindow", "Audio Format:")) + #self.audio_format_select.setItemText(0, _translate("MainWindow", "Ogg")) + #self.audio_format_select.setItemText(1, _translate("MainWindow", "MP3")) + #self.audio_format_select.setItemText(2, _translate("MainWindow", "FLAC")) + self.bitrate_select_label.setText(_translate("MainWindow", "Bitrate:")) + #self.bitrate_select.setItemText(0, _translate("MainWindow", "128 kb/s")) + #self.bitrate_select.setItemText(1, _translate("MainWindow", "192 kb/s")) + #self.bitrate_select.setItemText(2, _translate("MainWindow", "320 kb/s")) + #self.bitrate_select.setItemText(3, _translate("MainWindow", "Best")) self.tabs.setTabText(self.tabs.indexOf(self.audioTab), _translate("MainWindow", "Audio")) self.video_url_label.setText(_translate("MainWindow", "URL:")) - self.url_entry_box_3.setText(_translate("MainWindow", "Paste URL here")) - self.video_format_select_label.setText(_translate("MainWindow", "Video Format:")) - self.video_format_select.setItemText(0, _translate("MainWindow", "MP4")) - self.video_format_select.setItemText(1, _translate("MainWindow", "AVI")) - self.video_format_select.setItemText(2, _translate("MainWindow", "WEBM")) - self.bitrate_select_label_v.setText(_translate("MainWindow", "Bitrate:")) - self.bitrate_select_v.setItemText(0, _translate("MainWindow", "128 kb/s")) - self.bitrate_select_v.setItemText(1, _translate("MainWindow", "192 kb/s")) - self.bitrate_select_v.setItemText(2, _translate("MainWindow", "320 kb/s")) - self.play_finished_label_v.setText(_translate("MainWindow", "Play when finished?:")) - self.play_finished_select_v.setItemText(0, _translate("MainWindow", "yes")) - self.play_finished_select_v.setItemText(1, _translate("MainWindow", "no")) - self.changelog_box_label_v.setText(_translate("MainWindow", "Changelog:")) - self.changelog_text_box_3.setHtml(_translate("MainWindow", "\n" -"\n" -"

* added more buttons

")) - self.ok_button_3.setText(_translate("MainWindow", "OK")) - self.reset_button_3.setText(_translate("MainWindow", "Reset")) + self.video_tab_playlist.setText(_translate("MainWindow", "Playlist")) + self.video_url_entry.setText(_translate("MainWindow", "Paste URL here")) + self.video_format_label.setText(_translate("MainWindow", "Video Format:")) + #self.video_format_select.setItemText(0, _translate("MainWindow", "MP4")) + #self.video_format_select.setItemText(1, _translate("MainWindow", "AVI")) + #self.video_format_select.setItemText(2, _translate("MainWindow", "WEBM")) + self.resolution_select_label.setText(_translate("MainWindow", "Resolution:")) + #self.resolution_select.setItemText(0, _translate("MainWindow", "Best")) self.tabs.setTabText(self.tabs.indexOf(self.videoTab), _translate("MainWindow", "Video")) - self.status_text_label.setText(_translate("MainWindow", "Status Output")) + self.download_button.setText(_translate("MainWindow", "Download")) + #self.download_button.clicked.connect(dl_file()) self.menuMandy.setTitle(_translate("MainWindow", "File")) self.menuEdit.setTitle(_translate("MainWindow", "Edit")) self.menuAbout.setTitle(_translate("MainWindow", "About")) self.actionSettings.setText(_translate("MainWindow", "Settings")) self.actionQuit_Ctrl_q.setText(_translate("MainWindow", "Quit (Ctrl + q)")) self.actionSettings_2.setText(_translate("MainWindow", "Settings")) + self.download_button.clicked.connect(self.dl_content) +#from KPushButton import KPushButton + if __name__ == "__main__": - import sys + import sys, os , subprocess app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_MainWindow() diff --git a/status.txt b/status.txt new file mode 100644 index 0000000..c61c52a --- /dev/null +++ b/status.txt @@ -0,0 +1,4 @@ +[youtube] wqipMcwJeQI: Downloading webpage +[youtube] wqipMcwJeQI: Downloading video info webpage +[download] 'Beastie boys - Paul Revere.mp4' has already been downloaded + [download] 100% of 5.21MiB