diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e1cc29b5..f48cb765 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-python@v4
with:
- python-version: "3.11"
+ python-version: "3.12"
- name: Gather build version (*nix)
run: |
@@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
- python-version: "3.11"
+ python-version: "3.12"
- name: Gather build version
shell: powershell
diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml
index efad57e2..de732a22 100644
--- a/.github/workflows/pythonpublish.yml
+++ b/.github/workflows/pythonpublish.yml
@@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: '3.11'
+ python-version: '3.12'
- name: Install Dependencies
run: |
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 6052c1ef..48ff4010 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v3
with:
- python-version: "3.11"
+ python-version: "3.12"
- run: pip install black==23.7.0
- run: python -m black --check .
@@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-python@v3
with:
- python-version: "3.11"
+ python-version: "3.12"
- name: Install PySide6 requirements
run: |
diff --git a/CHANGES b/CHANGES
index ade0d083..6cb94ff0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
# Changelog
+## Version 5.6.1
+
+* Fixing #543 systems with more than one opencl device would break thumbnails and some encodings (thanks to swadomlic)
+* Fixing #505 (maybe) trying new methods to clean file paths for subtitles (thanks to Maddie Davis)
+
## Version 5.6.0
* Adding Passes option for bitrate mode in x265 and x264 (thanks to Chriss)
diff --git a/LICENSE b/LICENSE
index 9e804e90..5f8d3b14 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2019-2023 Chris Griffith
+Copyright (c) 2019-2024 Chris Griffith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index bebeb99c..3a1bd272 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@ Special thanks to [leonardyan](https://github.com/leonardyan) for numerous Chine
# License
-Copyright (C) 2019-2023 Chris Griffith
+Copyright (C) 2019-2024 Chris Griffith
The code itself is licensed under the MIT which you can read in the `LICENSE` file.
Read more about the release licensing in the [docs](docs/README.md) folder.
diff --git a/fastflix/encoders/common/helpers.py b/fastflix/encoders/common/helpers.py
index 5abe48ed..2dd30b90 100644
--- a/fastflix/encoders/common/helpers.py
+++ b/fastflix/encoders/common/helpers.py
@@ -77,7 +77,7 @@ def generate_ffmpeg_start(
[
f'"{ffmpeg}"',
start_extra,
- ("-init_hw_device opencl=ocl -filter_hw_device ocl " if enable_opencl and remove_hdr else ""),
+ ("-init_hw_device opencl:0.0=ocl -filter_hw_device ocl " if enable_opencl and remove_hdr else ""),
"-y",
time_one,
incoming_fps,
diff --git a/fastflix/flix.py b/fastflix/flix.py
index 383681e6..09379a2a 100644
--- a/fastflix/flix.py
+++ b/fastflix/flix.py
@@ -331,7 +331,7 @@ def generate_thumbnail_command(
# Hardware acceleration with OpenCL
if enable_opencl:
- command += ["-init_hw_device", "opencl=ocl", "-filter_hw_device", "ocl"]
+ command += ["-init_hw_device", "opencl:0.0=ocl", "-filter_hw_device", "ocl"]
command += shlex.split(filters)
@@ -462,7 +462,7 @@ def ffmpeg_audio_encoders(app, config: Config) -> List:
def ffmpeg_opencl_support(app, config: Config) -> bool:
- cmd = execute([f"{config.ffmpeg}", "-hide_banner", "-log_level", "error", "-init_hw_device", "opencl", "-h"])
+ cmd = execute([f"{config.ffmpeg}", "-hide_banner", "-log_level", "error", "-init_hw_device", "opencl:0.0", "-h"])
app.fastflix.opencl_support = cmd.returncode == 0
return app.fastflix.opencl_support
diff --git a/fastflix/shared.py b/fastflix/shared.py
index d1861364..b9b61906 100644
--- a/fastflix/shared.py
+++ b/fastflix/shared.py
@@ -316,7 +316,21 @@ def clean_file_string(source):
def quoted_path(source):
- return str(source).strip().replace("\\", "\\\\").replace(":", "\\:").replace("'", "'\\\\\\''")
+ cleaned_string = (
+ str(source)
+ .strip()
+ .replace("\\", "\\\\")
+ .replace(":", "\\:")
+ .replace("'", "'\\\\\\''")
+ .replace("\r\n", "")
+ .replace("\n", "")
+ .replace("\r", "")
+ )
+ if " " in cleaned_string[0:4]:
+ logger.warning(f"Unexpected space at start of quoted path, attempting to fix: {cleaned_string}")
+ cleaned_string = cleaned_string[0:4].replace(" ", "") + cleaned_string[4:]
+ logger.warning(f"New path set to: {cleaned_string}")
+ return cleaned_string
def sanitize(source):
diff --git a/fastflix/widgets/container.py b/fastflix/widgets/container.py
index fb2bbba5..9198701a 100644
--- a/fastflix/widgets/container.py
+++ b/fastflix/widgets/container.py
@@ -29,7 +29,8 @@
from fastflix.widgets.settings import Settings
from fastflix.widgets.windows.concat import ConcatWindow
from fastflix.widgets.windows.multiple_files import MultipleFilesWindow
-from fastflix.widgets.windows.hdr10plus_inject import HDR10PlusInjectWindow
+
+# from fastflix.widgets.windows.hdr10plus_inject import HDR10PlusInjectWindow
logger = logging.getLogger("fastflix")
@@ -214,11 +215,11 @@ def init_menu(self):
concat_action.triggered.connect(self.show_concat)
tools_menu.addAction(concat_action)
- hdr10p_inject_action = QAction(
- QtGui.QIcon(get_icon("onyx-queue", self.app.fastflix.config.theme)), t("HDR10+ Inject"), self
- )
- hdr10p_inject_action.triggered.connect(self.show_hdr10p_inject)
- tools_menu.addAction(hdr10p_inject_action)
+ # hdr10p_inject_action = QAction(
+ # QtGui.QIcon(get_icon("onyx-queue", self.app.fastflix.config.theme)), t("HDR10+ Inject"), self
+ # )
+ # hdr10p_inject_action.triggered.connect(self.show_hdr10p_inject)
+ # tools_menu.addAction(hdr10p_inject_action)
wiki_action = QAction(self.si(QtWidgets.QStyle.SP_FileDialogInfoView), t("FastFlix Wiki"), self)
wiki_action.triggered.connect(self.show_wiki)
@@ -273,9 +274,9 @@ def show_concat(self):
self.concat = ConcatWindow(app=self.app, main=self.main)
self.concat.show()
- def show_hdr10p_inject(self):
- self.hdr10p_inject = HDR10PlusInjectWindow(app=self.app, main=self.main)
- self.hdr10p_inject.show()
+ # def show_hdr10p_inject(self):
+ # self.hdr10p_inject = HDR10PlusInjectWindow(app=self.app, main=self.main)
+ # self.hdr10p_inject.show()
def show_about(self):
self.about = About(app=self.app)
diff --git a/pyproject.toml b/pyproject.toml
index ebf122d7..93defac4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
-target-version = ['py311']
+target-version = ['py312']
exclude = '''
/(
\.eggs
@@ -21,7 +21,7 @@ authors = [{ name = "Chris Griffith", email = "chris@cdgriffith.com" }]
readme = "README.md"
#url = "https://fastflix.org"
#download_url = "https://github.com/cdgriffith/FastFlix/releases"
-requires-python = ">=3.11,<3.12"
+requires-python = ">=3.12"
dynamic = ["version"]
dependencies = [
"appdirs~=1.4",
@@ -33,7 +33,7 @@ dependencies = [
"pathvalidate>=2.4,<3.0",
"psutil>=5.9,<6.0",
"pydantic>=1.9,<2.0",
- "pyside6>=6.4.2,<7.0",
+ "pyside6>=6.4.2",
"python-box[all]>=6.0,<7.0",
"requests>=2.28,<3.0",
"reusables>=0.9.6,<0.10.0",