@ -28,7 +28,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Install FFmpeg & Poppler
run: |
sudo apt update
sudo apt install ffmpeg poppler-utils
@ -12,7 +12,7 @@ repos:
exclude: ".*(galleria|photoswipe|jquery|leaflet).*$"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
rev: v0.15.0
hooks:
- id: ruff-check
args: [ --fix, --show-fixes, --exit-non-zero-on-fix ]
@ -119,7 +119,9 @@ def process_thumb(media):
if plugin_settings.get("ext_as_thumb", DEFAULT_CONFIG["ext_as_thumb"]):
if pdf2img and media.src_ext.lower() == ".pdf":
images = pdf2img(media.src_path, single_file=True, size=settings["thumb_size"])
images = pdf2img(
media.src_path, single_file=True, size=settings["thumb_size"]
)
images[0].save(media.thumb_path)
else:
kwargs = {}
@ -1 +0,0 @@
@ -36,10 +36,7 @@ def test_img_sizes(tmpdir):
"""Test that image size is swaped if needed."""
conf = tmpdir.join("sigal.conf.py")
conf.write(
"img_size = (600, 800)\n"
"thumb_size = (150, 200)"
conf.write("img_size = (600, 800)\nthumb_size = (150, 200)")
settings = read_settings(str(conf))
assert settings["img_size"] == (800, 600)