Skip to content

Commit

Permalink
* Fixing #513 Profile configuration issues, including with load direc…
Browse files Browse the repository at this point in the history
…tory (thanks to Nikita S.)
  • Loading branch information
cdgriffith committed Aug 26, 2023
1 parent 78df4f3 commit 040e5df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Fixing #503 missing CRF mode for SVT-AV1 (thanks to ignace72)
* Fixing #506 excessive amounts of RAM used and not cleared - partially mitigated (thanks to 19Battlestar65)
* Fixing #509 Portuguese translations (thanks to Felipe Augusto Arantes de Souza)
* Fixing #513 Profile configuration issues, including with load directory (thanks to Nikita S.)
* Fixing #516 Performance improvements due to constant stream reads (thanks to William Barath)

## Version 5.5.6
Expand Down
18 changes: 13 additions & 5 deletions fastflix/widgets/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from fastflix.models.fastflix_app import FastFlixApp
from fastflix.program_downloads import latest_ffmpeg
from fastflix.resources import main_icon, get_icon, changes_file, local_changes_file, local_package_changes_file
from fastflix.shared import clean_logs, error_message, latest_fastflix, message
from fastflix.shared import clean_logs, error_message, latest_fastflix, message, yes_no_message
from fastflix.widgets.about import About
from fastflix.widgets.changes import Changes
# from fastflix.widgets.logs import Logs
Expand Down Expand Up @@ -277,11 +277,11 @@ def new_profile(self):
if not self.app.fastflix.current_video:
error_message(t("Please load in a video to configure a new profile"))
else:
self.main.page_update(build_thumbnail=False)
if self.profile_window:
self.profile_window.show()
else:
self.profile_window = ProfileWindow(self.app, self.main, self)
self.profile_window.show()
self.profile_window.close()
self.profile_window = ProfileWindow(self.app, self.main, self)
self.profile_window.show()

def show_profile(self):
self.profile_details = ProfileDetails(
Expand Down Expand Up @@ -360,6 +360,14 @@ def set_stay_top(self):
self.app.fastflix.config.save()

def open_many(self):
if self.app.fastflix.current_video:
discard = yes_no_message(
f'{t("There is already a video being processed")}<br>' f'{t("Are you sure you want to discard it?")}',
title="Discard current video",
)
if not discard:
return
self.main.clear_current_video()
self.mfw = MultipleFilesWindow(app=self.app, main=self.main)
self.mfw.show()

Expand Down
8 changes: 6 additions & 2 deletions fastflix/widgets/windows/multiple_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@ def __init__(self, app, main, items=None):
layout.addWidget(self.files_area)
layout.addWidget(QtWidgets.QLabel(t("Drag and Drop to reorder")))
self.setLayout(layout)
self.change_profile()

def change_profile(self):
self.main.widgets.profile_box.setCurrentText(self.profile_box.currentText())
# self.main.set_profile()
if self.main.widgets.profile_box.currentText() == self.profile_box.currentText():
self.main.set_profile()
else:
self.main.widgets.profile_box.setCurrentText(self.profile_box.currentText())


def set_folder_name(self, name):
self.base_folder_label.setText(f'{t("Base Folder")}: {name}')
Expand Down

0 comments on commit 040e5df

Please sign in to comment.