Skip to content

Commit

Permalink
Merge pull request #31 from oleksis/master
Browse files Browse the repository at this point in the history
Fix issue #27
  • Loading branch information
oleksis authored May 29, 2021
2 parents 38ff78d + 20989e6 commit 2c5b1c2
Show file tree
Hide file tree
Showing 45 changed files with 1,411 additions and 1,644 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
id: build_x64_release
run: |
C:\Miniconda\condabin\conda.bat activate base
python -m pip install --upgrade pip setuptools wheel
python setup.py pyinstaller
- name: Create Release
id: create_release
Expand Down
27 changes: 21 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
*.pyc
*.mp3
*.mp4
*.srt
*.ttml
*.sbv
*.vtt
*.flv
*.mp4
*.m4a
*.m4v
*.mp3
*.3gp
*.wav
*.ape
*.mkv
*.swf
*.part
.idea
.vscode
env
build
dist
env/
dist/
build/
*venv/
*venv.back/
*.spec
*.egg-info
old/
*.part
.idea
.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion GUI/AboutDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class AboutDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
super(AboutDialog, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
super(AboutDialog, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) # type: ignore
self.ui = Ui_Dialog()
self.ui.setupUi(self)
18 changes: 10 additions & 8 deletions GUI/BatchAddUrls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

class BatchAddDialogue(QtWidgets.QDialog):
def __init__(self, parent=None):
super(BatchAddDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
super(BatchAddDialogue, self).__init__(
parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint
) # type: ignore
self.ui = Ui_BatchAdd()
self.ui.setupUi(self)
self.download = False
Expand All @@ -14,24 +16,24 @@ def __init__(self, parent=None):

def browse_clicked(self):
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
self, "Select txt file", filter='*.txt'
self, "Select txt file", filter="*.txt"
)

if file_name == '':
if not file_name:
return
with open(file_name, 'r') as file_data:

with open(file_name, "r") as file_data:
for line in file_data.readlines():
self.ui.UrlList.append(line.strip())

def add_clicked(self):
if str(self.ui.UrlList.toPlainText()).strip() == '':
_have_urls = str(self.ui.UrlList.toPlainText()).strip() # != ''
if not _have_urls:
QtWidgets.QMessageBox.information(self, "Error!", "No urls given!")
return
else:
self.download = True
self.close()

def close_clicked(self):
self.download = False
self.close()

4 changes: 2 additions & 2 deletions GUI/LicenseDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class LicenseDialogue(QtWidgets.QDialog):
def __init__(self, parent=None):
super(LicenseDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
super(LicenseDialogue, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) # type: ignore
self.ui = Ui_Dialog()
self.ui.setupUi(self)
self.ui.ExitButton.clicked.connect(self.close)
self.ui.ExitButton.clicked.connect(self.close)
Loading

0 comments on commit 2c5b1c2

Please sign in to comment.