Skip to content

Commit 3f5cc51

Browse files
authored
Version 5.12.1 (#669)
* Fixing #654 Failed to import attachment due to bad mime type gathering (thanks to larsk2) * Fixing #659 current profile panel won't open (thanks to danielly2020) * Fixing missing undefined option for audio tracks (thanks to danielly2020) * Fixing missing unittests for common encoder options * Fixing some extra spaces in commands * Fixing logs were showing red for info commands * Fixing missing translations (thanks to danielly2020)
1 parent a27c355 commit 3f5cc51

File tree

137 files changed

+3897
-586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+3897
-586
lines changed

.github/workflows/build.yaml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
with:
2020
python-version: "3.12"
2121

22+
- name: Install the latest version of uv and activate the environment
23+
uses: astral-sh/setup-uv@v6
24+
with:
25+
activate-environment: true
26+
2227
- name: Gather build version (*nix)
2328
run: |
2429
mkdir dist
@@ -35,18 +40,10 @@ jobs:
3540
if: ${{ startsWith(matrix.os, 'ubuntu') }}
3641

3742
- name: Install Python Dependencies
38-
run: |
39-
python -m pip install --upgrade pip setuptools --ignore-installed
40-
pip install .
41-
pip install .[develop]
42-
43-
- name: Grab iso-639 lists
44-
run: |
45-
cp $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
46-
cp $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
43+
run: uv sync --frozen
4744

4845
- name: Build single executable
49-
run: pyinstaller FastFlix_Nix_OneFile.spec
46+
run: uv run pyinstaller FastFlix_Nix_OneFile.spec
5047

5148
- name: Copy license to dist
5249
run: |
@@ -67,7 +64,7 @@ jobs:
6764
- name: Build Mac App
6865
if : ${{ startsWith(matrix.os, 'macos') }}
6966
run: |
70-
python scripts/build_mac_app.py ${{ matrix.os }}
67+
uv run python scripts/build_mac_app.py ${{ matrix.os }}
7168
pushd dist
7269
7z a -mm=Deflate -mfb=258 -mpass=15 FastFlix_${{ env.VERSION }}_appbundle_${{ matrix.os }}_${{ env.ARCH }}.zip FastFlix.app
7370
popd
@@ -89,6 +86,11 @@ jobs:
8986
with:
9087
python-version: "3.12"
9188

89+
- name: Install the latest version of uv and activate the environment
90+
uses: astral-sh/setup-uv@v6
91+
with:
92+
activate-environment: true
93+
9294
- name: Gather build version
9395
shell: powershell
9496
run: |
@@ -104,25 +106,15 @@ jobs:
104106
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
105107

106108
- name: Install Python Dependencies
107-
run: |
108-
python -m pip install --upgrade pip setuptools --ignore-installed
109-
pip install .
110-
pip install .[develop]
111-
112-
113-
- name: Grab iso-639 lists
114-
shell: powershell
115-
run: |
116-
copy $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
117-
copy $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
109+
run: uv sync --frozen
118110

119111
- name: Build single executable
120112
shell: cmd
121-
run: pyinstaller FastFlix_Windows_OneFile.spec
113+
run: uv run pyinstaller FastFlix_Windows_OneFile.spec
122114

123115
- name: Build installer executable
124116
shell: cmd
125-
run: pyinstaller FastFlix_Windows_Installer.spec
117+
run: uv run pyinstaller FastFlix_Windows_Installer.spec
126118

127119
# - uses: skymatic/code-sign-action@v1
128120
# with:

.github/workflows/pythonpublish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222

2323
- name: Install Dependencies
2424
run: |
25-
python -m pip install --upgrade pip
26-
pip install setuptools wheel twine build --upgrade
25+
python -m pip install uv --upgrade
26+
uv sync --frozen
27+
uv run pip install setuptools wheel twine build --upgrade
2728
2829
2930
- name: Build and Publish
@@ -32,7 +33,5 @@ jobs:
3233
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3334

3435
run: |
35-
pip install .
36-
pip install .[develop]
37-
python -m build --wheel
38-
twine upload dist/*.whl
36+
uv run python -m build --wheel
37+
uv run twine upload dist/*.whl

.github/workflows/test.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
name: Lint
1+
name: Lint and Test
22

33
on:
4-
push:
5-
branches-ignore:
6-
- master
7-
- main
84
pull_request:
95

106
jobs:
@@ -18,8 +14,13 @@ jobs:
1814
with:
1915
python-version: "3.12"
2016

21-
- run: pip install black==24.8.0
22-
- run: python -m black --check .
17+
- name: Install the latest version of uv and activate the environment
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
activate-environment: true
21+
22+
- run: uv sync --frozen
23+
- run: uv run ruff check
2324

2425
test:
2526
runs-on: ubuntu-24.04
@@ -31,18 +32,20 @@ jobs:
3132
with:
3233
python-version: "3.12"
3334

35+
- name: Install the latest version of uv and activate the environment
36+
uses: astral-sh/setup-uv@v6
37+
with:
38+
activate-environment: true
39+
3440
- name: Install PySide6 requirements
3541
run: |
3642
sudo apt update
3743
sudo apt install libopengl0 freeglut3-dev -y
3844
3945
- name: Install requirements
40-
run: |
41-
python -m pip install --upgrade pip setuptools
42-
pip install .
43-
pip install .[develop]
46+
run: uv sync --frozen
4447

4548
- name: Run tests
4649
env:
4750
PYTEST_QT_API: pyside6
48-
run: pytest tests
51+
run: uv run pytest tests -v

.pre-commit-config.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: mixed-line-ending
66
- id: trailing-whitespace
@@ -22,10 +22,16 @@ repos:
2222
- id: check-toml
2323
- id: detect-private-key
2424
- id: end-of-file-fixer
25-
- repo: https://github.com/psf/black
26-
rev: 24.8.0
25+
- repo: https://github.com/astral-sh/ruff-pre-commit
26+
# Ruff version.
27+
rev: v0.12.1
2728
hooks:
28-
- id: black
29+
# Run the linter.
30+
- id: ruff-check
31+
args: [ --fix ]
32+
# Run the formatter.
33+
- id: ruff-format
34+
2935
# - repo: https://github.com/pre-commit/mirrors-mypy
3036
# rev: 'v0.942'
3137
# hooks:

CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## Version 5.12.1
4+
5+
* Fixing #654 Failed to import attachment due to bad mime type gathering (thanks to larsk2)
6+
* Fixing #659 current profile panel won't open (thanks to danielly2020)
7+
* Fixing missing undefined option for audio tracks (thanks to danielly2020)
8+
* Fixing missing unittests for common encoder options
9+
* Fixing some extra spaces in commands
10+
* Fixing logs were showing red for info commands
11+
* Fixing missing translations (thanks to danielly2020)
12+
313
## Version 5.12.0
414

515
* Adding automatic downloads for rigaya encoders on Windows

FastFlix_Nix_OneFile.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ all_imports.append("iso639")
2828

2929
a = Analysis(['fastflix/__main__.py'],
3030
binaries=[],
31-
datas=[('iso-639-3.tab', 'iso639'), ('iso-639-3.json', 'iso639'), ('CHANGES', 'fastflix/.'), ('docs/build-licenses.txt', 'docs')] + all_fastflix_files,
31+
datas=[('CHANGES', 'fastflix/.'), ('docs/build-licenses.txt', 'docs')] + all_fastflix_files,
3232
hiddenimports=all_imports,
3333
hookspath=[],
3434
runtime_hooks=[],

FastFlix_Windows_Installer.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ all_imports.append("iso639")
2626

2727
a = Analysis(['fastflix\\__main__.py'],
2828
binaries=[],
29-
datas=[('iso-639-3.tab', 'iso639'), ('iso-639-3.json', 'iso639'), ('CHANGES', 'fastflix\\.'), ('docs\\build-licenses.txt', 'docs')] + all_fastflix_files,
29+
datas=[('CHANGES', 'fastflix\\.'), ('docs\\build-licenses.txt', 'docs')] + all_fastflix_files,
3030
hiddenimports=all_imports,
3131
hookspath=[],
3232
runtime_hooks=[],

FastFlix_Windows_OneFile.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ with open(portable_file, "w") as portable:
3333

3434
a = Analysis(['fastflix\\__main__.py'],
3535
binaries=[],
36-
datas=[('iso-639-3.tab', 'iso639'), ('iso-639-3.json', 'iso639'), ('CHANGES', 'fastflix\\.'), ('docs\\build-licenses.txt', 'docs')] + all_fastflix_files,
36+
datas=[('CHANGES', 'fastflix\\.'), ('docs\\build-licenses.txt', 'docs')] + all_fastflix_files,
3737
hiddenimports=all_imports,
3838
hookspath=[],
3939
runtime_hooks=[],

fastflix/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def start_fastflix():
1010
exit_code = 2
1111
portable_mode = True
1212
try:
13-
from fastflix import portable
13+
from fastflix import portable # noqa: F401
1414
except ImportError:
1515
portable_mode = False
1616

fastflix/application.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ def init_logging(app: FastFlixApp):
5252
logger.setLevel(logging.DEBUG)
5353
logger.addHandler(stream_handler)
5454
logger.addHandler(file_handler)
55-
coloredlogs.install(level="DEBUG", logger=logger)
55+
level_styles = {
56+
"debug": {"color": "blue"},
57+
"info": {"color": "green"},
58+
"warning": {"color": "yellow", "bold": True},
59+
"error": {"color": "red", "bold": True},
60+
}
61+
coloredlogs.install(level="DEBUG", logger=logger, level_styles=level_styles)
5662

5763

5864
def init_encoders(app: FastFlixApp, **_):
@@ -246,7 +252,7 @@ def app_setup(
246252
try:
247253
ProgressBar(app, startup_tasks)
248254
except Exception:
249-
logger.exception(f'{t("Could not start FastFlix")}!')
255+
logger.exception(f"{t('Could not start FastFlix')}!")
250256
sys.exit(1)
251257

252258
container = Container(app)

0 commit comments

Comments
 (0)