Skip to content

Commit

Permalink
two bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PyFlat-JR committed May 6, 2024
1 parent c067a04 commit c18627f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ def update_main_frame(self):
mw.ui.info_range_slider_label.setText(self.tm.get_inline_string("select-range-info"))
mw.ui.date_label.setText(self.tm.get_inline_string("playlist-count").format(self.data.playlist_count))
mw.ui.last_page_btn.setVisible(True)
mw.ui.playlist_range_slider.setRange(0, self.data.playlist_count)
mw.ui.playlist_range_slider.setValue((0, self.data.playlist_count))
mw.ui.playlist_range_slider.setRange(1, self.data.playlist_count)
mw.ui.playlist_range_slider.setValue((1, self.data.playlist_count))

def change_location(self):
new_dir = QFileDialog.getExistingDirectory(None, self.tm.get_inline_string("select-folder"), os.path.expanduser(self.file))
Expand Down Expand Up @@ -1015,10 +1015,12 @@ def download_playlist(self):
if dl.selected_ids == []:
dl.yes_no_messagebox(dl.tm.get_inline_string("no-video-chosen"), QMessageBox.Warning, dl.tm.get_inline_string("warning"), QMessageBox.Ok)
return
ext = mw.ui.format_selection.currentText().lower()
res = mw.ui.resolution_selection.currentText()
def download_next(index):
if index < len(dl.selected_ids):
video_id = dl.selected_ids[index]-1
self.playlist_data_objects[video_id].prepare_for_download()
self.playlist_data_objects[video_id].prepare_for_download(ext, res)
QTimer.singleShot(1000, lambda: download_next(index + 1))

download_next(0)
Expand Down

0 comments on commit c18627f

Please sign in to comment.