-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPV-YTDL.py
executable file
·50 lines (32 loc) · 882 Bytes
/
MPV-YTDL.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
author: Josh Fowler
website: glitchbusters.info
last edited: December 2017
"""
import sys
import os
from PyQt4 import QtGui
class Example(QtGui.QWidget):
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.btn = QtGui.QPushButton('Click me', self)
self.btn.move(5, 5)
self.btn.clicked.connect(self.showDialog)
self.setGeometry(300, 300, 85, 35)
self.setWindowTitle('MPV-YTDL')
self.show()
def showDialog(self):
text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog',
'Enter your the URL below')
if ok:
os.system ('mpv ' + text)
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()