Skip to content

Commit

Permalink
added a size column and edited the readme. Bumped the version to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yasoob committed Feb 18, 2014
1 parent 6b39158 commit edb9c84
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
youtube-dl-GUI
==============

This repository contains code for a youtube-dl GUI written in PyQt. It is based on [youtube-dl](https://github.com/rg3/youtube-dl) which is a Video downloading script maintained by various contributers and released in Public Domain. This GUI code is currently written for Python v2.x and not v3.x However I will make it compatible with Python v3.x after refining it a little.
This repository contains code for a youtube-dl GUI written in PyQt. It is based on [youtube-dl](https://github.com/rg3/youtube-dl) which is a Video downloading script maintained by various contributers and released in Public Domain. This GUI code is currently written for Python v2.x and not v3.x However I will make it compatible with Python v3.x after refining it a little. Please note that this GUI code is released under the MIT License and not Public Domain.

ScreenShot:
-------------
Expand Down
7 changes: 5 additions & 2 deletions download_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ def hook(self, li):
if li.get('speed') is not None:
self.speed = self.format_speed(li.get('speed'))
self.eta = self.format_seconds(li.get('eta'))
self.list_Signal.emit( [self.local_rowcount, li.get('filename').split('/')[-1],self.eta,self.speed,li.get('status')])
self.bytes = 'unknown'
if li.get('total_bytes') is not None:
self.bytes = self.format_bytes(li.get('total_bytes'))
self.list_Signal.emit( [self.local_rowcount, li.get('filename').split('/')[-1],self.bytes,self.eta,self.speed,li.get('status')])
elif li.get('status') == "finished":
self.remove_url_Signal.emit(self.url)
self.list_Signal.emit( [self.local_rowcount, li.get('filename').split('/')[-1],self.eta,self.speed,li.get('status')])
self.list_Signal.emit( [self.local_rowcount, li.get('filename').split('/')[-1],self.bytes,self.eta,self.speed,li.get('status')])
else:
self.statusSignal.emit('Already Downloaded')
self.row_Signal.emit()
Expand Down
12 changes: 8 additions & 4 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'gui_qt-designer.ui'
#
# Created: Sun Feb 16 21:54:15 2014
# Created: Mon Feb 17 19:00:14 2014
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -73,7 +73,7 @@ def setupUi(self, MainWindow):
self.tableWidget = QtGui.QTableWidget(self.centralwidget)
self.tableWidget.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.tableWidget.setRowCount(0)
self.tableWidget.setColumnCount(4)
self.tableWidget.setColumnCount(5)
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
item = QtGui.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(0, item)
Expand All @@ -83,6 +83,8 @@ def setupUi(self, MainWindow):
self.tableWidget.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(3, item)
item = QtGui.QTableWidgetItem()
self.tableWidget.setHorizontalHeaderItem(4, item)
self.tableWidget.verticalHeader().setDefaultSectionSize(30)
self.tableWidget.verticalHeader().setMinimumSectionSize(20)
self.tableWidget.verticalHeader().setSortIndicatorShown(False)
Expand Down Expand Up @@ -119,10 +121,12 @@ def retranslateUi(self, MainWindow):
item = self.tableWidget.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Video/Song", None))
item = self.tableWidget.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "ETA", None))
item.setText(_translate("MainWindow", "Size", None))
item = self.tableWidget.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Speed", None))
item.setText(_translate("MainWindow", "ETA", None))
item = self.tableWidget.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Speed", None))
item = self.tableWidget.horizontalHeaderItem(4)
item.setText(_translate("MainWindow", "Status", None))
self.download_btn.setText(_translate("MainWindow", "Download", None))
self.menuFile.setTitle(_translate("MainWindow", "File", None))
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, parent=None):
self.rowcount = 0

self.connect_menu_action()
self.setWindowTitle('youtube-dl v0.2')
self.setWindowTitle('youtube-dl v0.3.0')
self.show()

def set_connections(self):
Expand Down
10 changes: 7 additions & 3 deletions resources/gui_qt-designer.ui
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@
<bool>true</bool>
</property>
<property name="rowCount">
<number>1</number>
<number>0</number>
</property>
<property name="columnCount">
<number>4</number>
<number>5</number>
</property>
<attribute name="verticalHeaderDefaultSectionSize">
<number>30</number>
Expand All @@ -147,12 +147,16 @@
<attribute name="verticalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
<row/>
<column>
<property name="text">
<string>Video/Song</string>
</property>
</column>
<column>
<property name="text">
<string>Size</string>
</property>
</column>
<column>
<property name="text">
<string>ETA</string>
Expand Down

0 comments on commit edb9c84

Please sign in to comment.