Skip to content

Commit

Permalink
Merge pull request #185 from openzim/remove_unused_metadata
Browse files Browse the repository at this point in the history
Unset `metadata_from` + rollback to Python 3.10
  • Loading branch information
benoit74 authored Nov 16, 2023
2 parents a0e0300 + bd67bbb commit d9146ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-bookworm
FROM python:3.10-bookworm
LABEL org.opencontainers.image.source https://github.com/openzim/youtube

# Install necessary packages
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ build-backend = "hatchling.build"
name = "youtube2zim"
authors = [{ name = "Kiwix", email = "[email protected]" }]
keywords = ["kiwix", "zim", "offline", "youtube"]
requires-python = ">=3.11"
requires-python = ">=3.10,<3.11"
description = "Make ZIM file from a Youtube channel, user or playlist(s)"
readme = "README.md"
license = { text = "GPL-3.0-or-later" }
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
]
dependencies = [
Expand Down Expand Up @@ -61,7 +61,7 @@ exclude = ["/.github"]

[tool.hatch.build.hooks.custom]
path = "hatch_build.py"
dependencies = ["zimscraperlib==3.1.1"]
dependencies = ["zimscraperlib>=2.0.0,<2.1.0"]

[tool.hatch.envs.default]
features = ["dev"]
Expand Down Expand Up @@ -222,5 +222,5 @@ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
include = ["src", "tests", "tasks.py"]
exclude = [".env/**", ".venv/**", "src/youtube2zim/templates", ".hatch"]
extraPaths = ["src"]
pythonVersion = "3.11"
pythonVersion = "3.10"
typeCheckingMode = "basic"
9 changes: 5 additions & 4 deletions src/youtube2zim/playlists/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def __init__(

self.build_dir = pathlib.Path(tempfile.mkdtemp())

# metadata_from JSON file
self.metadata_from = (
pathlib.Path(self.metadata_from) if self.metadata_from else None
)
self.metadata_from = None
# metadata_from JSON file is broken for now
# self.metadata_from = (
# pathlib.Path(self.metadata_from) if self.metadata_from else None
# )
self.metadata = {} # custom metadata holder

# update youtube credentials store
Expand Down

0 comments on commit d9146ee

Please sign in to comment.