Skip to content

Commit 34bb96b

Browse files
committed
Adding automatic downloads for rigaya encoders on Windows
1 parent acaf7b2 commit 34bb96b

File tree

22 files changed

+388
-41
lines changed

22 files changed

+388
-41
lines changed

CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Changelog
22

3-
## Version 5.11.1
3+
## Version 5.12.0
44

5+
* Adding automatic downloads for rigaya encoders on Windows
56
* Fixing custom_crf not being found (thanks to Norbert)
67

78
## Version 5.11.0

fastflix/application.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import logging
3+
import platform
34
import sys
45

56
import coloredlogs
@@ -13,9 +14,10 @@
1314
from fastflix.models.fastflix_app import FastFlixApp
1415
from fastflix.program_downloads import ask_for_ffmpeg, grab_stable_ffmpeg
1516
from fastflix.resources import main_icon, breeze_styles_path
16-
from fastflix.shared import file_date, message, latest_fastflix, DEVMODE
17+
from fastflix.shared import file_date, message, latest_fastflix, DEVMODE, yes_no_message
1718
from fastflix.widgets.container import Container
1819
from fastflix.widgets.progress_bar import ProgressBar, Task
20+
from fastflix.gpu_detect import automatic_rigaya_download
1921

2022
logger = logging.getLogger("fastflix")
2123

@@ -169,6 +171,7 @@ def app_setup(
169171
app.fastflix.config = Config()
170172
init_fastflix_directories(app)
171173
init_logging(app)
174+
logger.debug(f"GUI logging initialized, saving to {app.fastflix.log_path}")
172175
upgraded = app.fastflix.config.upgrade_check()
173176
if upgraded:
174177
# No translation will be possible in this case
@@ -215,6 +218,19 @@ def app_setup(
215218

216219
logger.setLevel(app.fastflix.config.logging_level)
217220

221+
if platform.system() == "Windows":
222+
if app.fastflix.config.auto_gpu_check is None:
223+
app.fastflix.config.auto_gpu_check = yes_no_message(
224+
"Do you want FastFlix to automatically detect your GPUs and download the optional encoders for them?\n\nThis will include downloading 7zip on Windows platform.",
225+
title="Allow Optional Downloads",
226+
)
227+
if app.fastflix.config.auto_gpu_check:
228+
ProgressBar(
229+
app, [Task(name=t("Detect GPUs"), command=automatic_rigaya_download)], signal_task=True, can_cancel=True
230+
)
231+
232+
app.fastflix.config.save()
233+
218234
startup_tasks = [
219235
Task(t("Gather FFmpeg version"), ffmpeg_configuration),
220236
Task(t("Gather FFprobe version"), ffprobe_configuration),
@@ -246,7 +262,6 @@ def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock, por
246262
# import tracemalloc
247263
#
248264
# tracemalloc.start()
249-
250265
app = app_setup(
251266
enable_scaling=enable_scaling,
252267
portable_mode=portable_mode,

fastflix/encoders/nvencc_av1/settings_panel.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,9 @@ def __init__(self, parent, main, app: FastFlixApp):
141141
)
142142
)
143143

144-
warning_label = QtWidgets.QLabel()
145-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
146-
147144
guide_label.setAlignment(QtCore.Qt.AlignBottom)
148145
guide_label.setOpenExternalLinks(True)
149146
grid.addWidget(guide_label, 11, 0, 1, 4)
150-
grid.addWidget(warning_label, 11, 4, 1, 1, alignment=QtCore.Qt.AlignRight)
151147

152148
self.setLayout(grid)
153149
self.hide()

fastflix/encoders/nvencc_avc/settings_panel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ def __init__(self, parent, main, app: FastFlixApp):
137137
)
138138
)
139139

140-
warning_label = QtWidgets.QLabel()
141-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
142-
143140
guide_label.setAlignment(QtCore.Qt.AlignBottom)
144141
guide_label.setOpenExternalLinks(True)
145142
grid.addWidget(guide_label, 11, 0, 1, 4)

fastflix/encoders/nvencc_hevc/settings_panel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ def __init__(self, parent, main, app: FastFlixApp):
141141
)
142142
)
143143

144-
warning_label = QtWidgets.QLabel()
145-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
146-
147144
guide_label.setAlignment(QtCore.Qt.AlignBottom)
148145
guide_label.setOpenExternalLinks(True)
149146
grid.addWidget(guide_label, 11, 0, 1, 4)

fastflix/encoders/qsvencc_av1/settings_panel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,9 @@ def __init__(self, parent, main, app: FastFlixApp):
146146
)
147147
)
148148

149-
warning_label = QtWidgets.QLabel()
150-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
151-
152149
guide_label.setAlignment(QtCore.Qt.AlignBottom)
153150
guide_label.setOpenExternalLinks(True)
154151
grid.addWidget(guide_label, 11, 0, 1, 4)
155-
grid.addWidget(warning_label, 11, 4, 1, 1, alignment=QtCore.Qt.AlignRight)
156-
157152
self.setLayout(grid)
158153
self.hide()
159154
self.hdr10plus_signal.connect(self.done_hdr10plus_extract)

fastflix/encoders/qsvencc_avc/settings_panel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,9 @@ def __init__(self, parent, main, app: FastFlixApp):
136136
)
137137
)
138138

139-
warning_label = QtWidgets.QLabel()
140-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
141-
142139
guide_label.setAlignment(QtCore.Qt.AlignBottom)
143140
guide_label.setOpenExternalLinks(True)
144141
grid.addWidget(guide_label, 11, 0, 1, 4)
145-
grid.addWidget(warning_label, 11, 4, 1, 1, alignment=QtCore.Qt.AlignRight)
146-
grid.addWidget(QtWidgets.QLabel(t("QSVEncC Encoder support is still experimental!")), 11, 5, 1, 1)
147142

148143
self.setLayout(grid)
149144
self.hide()

fastflix/encoders/qsvencc_hevc/settings_panel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ def __init__(self, parent, main, app: FastFlixApp):
138138
)
139139
)
140140

141-
warning_label = QtWidgets.QLabel()
142-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
143-
144141
guide_label.setAlignment(QtCore.Qt.AlignBottom)
145142
guide_label.setOpenExternalLinks(True)
146143
grid.addWidget(guide_label, 11, 0, 1, 4)
147-
grid.addWidget(warning_label, 11, 4, 1, 1, alignment=QtCore.Qt.AlignRight)
148-
grid.addWidget(QtWidgets.QLabel(t("QSVEncC Encoder support is still experimental!")), 11, 5, 1, 1)
149144

150145
self.setLayout(grid)
151146
self.hide()

fastflix/encoders/vceencc_av1/settings_panel.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,9 @@ def __init__(self, parent, main, app: FastFlixApp):
128128
)
129129
)
130130

131-
warning_label = QtWidgets.QLabel()
132-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
133-
134131
guide_label.setAlignment(QtCore.Qt.AlignBottom)
135132
guide_label.setOpenExternalLinks(True)
136133
grid.addWidget(guide_label, 12, 0, 1, 4)
137-
grid.addWidget(warning_label, 12, 4, 1, 1, alignment=QtCore.Qt.AlignRight)
138134

139135
self.setLayout(grid)
140136
self.hide()

fastflix/encoders/vceencc_avc/settings_panel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ def __init__(self, parent, main, app: FastFlixApp):
123123
)
124124
)
125125

126-
warning_label = QtWidgets.QLabel()
127-
warning_label.setPixmap(QtGui.QIcon(get_icon("onyx-warning", self.app.fastflix.config.theme)).pixmap(22))
128-
129126
guide_label.setAlignment(QtCore.Qt.AlignBottom)
130127
guide_label.setOpenExternalLinks(True)
131128
grid.addWidget(guide_label, 12, 0, 1, 4)

0 commit comments

Comments
 (0)