Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions srcpkgs/python3-click-option-group/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'python3-click-option-group'
pkgname=python3-click-option-group
version=0.5.9
revision=1
build_style=python3-pep517
hostmakedepends="hatchling hatch-vcs"
depends="python3-click"
short_desc="Click-extension package that adds option groups missing in Click"
maintainer="John <me@johnnynator.dev>"
license="BSD-3-Clause "
homepage="https://github.com/click-contrib/click-option-group"
distfiles="${PYPI_SITE}/c/click-option-group/click_option_group-${version}.tar.gz"
checksum=f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823

post_install() {
vlicense LICENSE
}
18 changes: 18 additions & 0 deletions srcpkgs/python3-knowit/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Template file for 'python3-knowit'
pkgname=python3-knowit
version=0.5.11
revision=1
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
depends="python3-babelfish python3-enzyme python3-pymediainfo python3-yaml
python3-trakit"
short_desc="Know better your media files"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://pypi.org/project/knowit"
distfiles="${PYPI_SITE}/k/knowit/knowit-${version}.tar.gz"
checksum=9045d6640b1bd00fcc49f2f7e81992cdc6c7279767db199d7f3b63e2f5007b58

post_install() {
vlicense LICENSE
}
7 changes: 6 additions & 1 deletion srcpkgs/python3-pysrt/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'python3-pysrt'
pkgname=python3-pysrt
version=1.1.2
revision=8
revision=9
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3 python3-chardet"
Expand All @@ -11,4 +11,9 @@ license="GPL-3.0-only"
homepage="https://github.com/byroot/pysrt"
distfiles="${PYPI_SITE}/p/pysrt/pysrt-${version}.tar.gz"
checksum=b4f844ba33e4e7743e9db746492f3a193dc0bc112b153914698e7c1cdeb9b0b9
alternatives="srt:srt:/usr/bin/pysrt-srt"
conflicts="python-pysrt>=0"

post_install() {
mv ${DESTDIR}/usr/bin/{srt,python3-pysrt-srt}
}
17 changes: 17 additions & 0 deletions srcpkgs/python3-pysubs2/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'python3-pysubs2'
pkgname=python3-pysubs2
version=1.8.0
revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools"
depends="python3"
short_desc="Library for editing subtitle files"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://github.com/tkarabela/pysubs2"
distfiles="${PYPI_SITE}/p/pysubs2/pysubs2-${version}.tar.gz"
checksum=3397bb58a4a15b1325ba2ae3fd4d7c214e2c0ddb9f33190d6280d783bb433b20

post_install() {
vlicense LICENSE.txt
}
6 changes: 3 additions & 3 deletions srcpkgs/python3-rarfile/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'python3-rarfile'
pkgname=python3-rarfile
version=4.0
revision=8
version=4.2
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3"
Expand All @@ -11,7 +11,7 @@ license="ISC"
homepage="https://github.com/markokr/rarfile"
changelog="https://github.com/markokr/rarfile/raw/master/doc/news.rst"
distfiles="${PYPI_SITE}/r/rarfile/rarfile-${version}.tar.gz"
checksum=67548769229c5bda0827c1663dce3f54644f9dbfba4ae86d4da2b2afd3e602a1
checksum=8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef

post_install() {
vlicense LICENSE
Expand Down
20 changes: 20 additions & 0 deletions srcpkgs/python3-srt/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Template file for 'python3-srt'
pkgname=python3-srt
version=3.5.3
revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools"
depends="python3"
short_desc="Library for parsing, modifying, and composing SRT files"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://github.com/cdown/srt"
distfiles="${PYPI_SITE}/s/srt/srt-${version}.tar.gz"
checksum=4884315043a4f0740fd1f878ed6caa376ac06d70e135f306a6dc44632eed0cc0
alternatives="srt:srt:/usr/bin/pysrt-srt"
conflicts="python3-pysrt<=1.1.2_8"

post_install() {
mv ${DESTDIR}/usr/bin/{srt,python3-srt-srt}
vlicense LICENSE
}
17 changes: 17 additions & 0 deletions srcpkgs/python3-trakit/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'python3-trakit'
pkgname=python3-trakit
version=0.2.5
revision=1
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
depends="python3-babelfish python3-rebulk"
short_desc="Guess additional information from track titles"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://github.com/ratoaq2/trakit"
distfiles="${PYPI_SITE}/t/trakit/trakit-${version}.tar.gz"
checksum=d7e530ed82906eeadf7982d6a357883ae0490f34bbd18f8232b8fc5f250a4ae7

post_install() {
vlicense LICENSE
}
8 changes: 4 additions & 4 deletions srcpkgs/sabnzbd/template
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Template file for 'sabnzbd'
pkgname=sabnzbd
version=4.4.1
revision=2
version=4.5.5
revision=1
pycompile_dirs="/usr/share/sabnzbd"
hostmakedepends="python3 gettext"
depends="par2cmdline python3-cheetah3 python3-cryptography
python3-feedparser python3-configobj python3-CherryPy python3-Cheroot
python3-portend python3-chardet python3-notify2 python3-guessit
python3-portend python3-chardet python3-notify2 python3-guessit python3-rarfile
python3-puremagic python3-pysocks python3-apprise python3-sabctools unzip"
short_desc="Open Source Binary Newsreader written in Python"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, custom:Bundled"
homepage="https://sabnzbd.org/"
changelog="https://github.com/sabnzbd/sabnzbd/releases"
distfiles="https://github.com/sabnzbd/sabnzbd/releases/download/${version}/SABnzbd-${version}-src.tar.gz"
checksum=a9ebf273d77c6d3cc9a13b1bd1640b903f4891e58aee3ef5a25595db3aa4d7fb
checksum=7f93d714287293f519f244b92d8eb727aa504448c5961dab8420e2093f92e3b7
python_version=3

post_extract() {
Expand Down
93 changes: 93 additions & 0 deletions srcpkgs/subliminal/patches/1336.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
From 6fa86ec9b5bd02d324b0fdea9a6880aa44a925b5 Mon Sep 17 00:00:00 2001
From: John Zimmermann <me@johnnynator.dev>
Date: Fri, 26 Dec 2025 14:14:11 +0100
Subject: [PATCH] Replace opensubtitlescom _search recursion with a generator
implementation

It can happen that a opensubtitlescom query might return hundreds of
pages, this can lead to a stackoverflow (especially on systems with a
smaller default thread stack size like musl libc)
---
src/subliminal/providers/opensubtitlescom.py | 48 +++++++++-----------
1 file changed, 22 insertions(+), 26 deletions(-)

diff --git a/src/subliminal/providers/opensubtitlescom.py b/src/subliminal/providers/opensubtitlescom.py
index 13257162..b9cc98af 100644
--- a/src/subliminal/providers/opensubtitlescom.py
+++ b/src/subliminal/providers/opensubtitlescom.py
@@ -31,7 +31,7 @@
from . import Provider

if TYPE_CHECKING:
- from collections.abc import Mapping, Set
+ from collections.abc import Generator, Mapping, Set

C = TypeVar('C', bound=Callable)

@@ -595,30 +595,29 @@ def api_get(

return r.json() # type: ignore[no-any-return]

- def _search(self, *, page: int = 1, **params: Any) -> list[dict[str, Any]]:
- # Extended params with page
- ext_params = {'page': page, **params}
-
- # query the server
- logger.info('Searching subtitles %r', ext_params)
-
- # GET request and add page information
- response = self.api_get('subtitles', ext_params)
-
- if not response or not response['data']:
- return []
-
- ret = response['data']
+ def _search(self, **params: Any) -> Generator[dict[str, Any], None, None]:
+ page = 1
+
+ while True:
+ # Extended params with page
+ ext_params = {'page': page, **params}
+ logger.info('Searching subtitles %r', ext_params)
+ # GET request and add page information
+ response = self.api_get('subtitles', ext_params)
+ if not response or not response['data']:
+ break
+ else:
+ yield from response['data']

- # check that the maximum number of pages has not been exceeded
- allow_more_pages = self.max_result_pages <= 0 or page < self.max_result_pages
+ page += 1

- # retrieve other pages maybe
- if allow_more_pages and 'total_pages' in response and page < response['total_pages']:
- # missing pages
- ret.extend(self._search(page=page + 1, **params))
+ # check that the maximum number of pages has not been exceeded
+ if self.max_result_pages > 0 and page > self.max_result_pages:
+ break

- return ret # type: ignore[no-any-return]
+ # check if we fetched all pages already
+ if 'total_pages' not in response or page > response['total_pages']:
+ break

def _make_query(
self,
@@ -711,14 +710,11 @@ def query(
# add the language and query the server
criterion.update({'languages': ','.join(sorted(lang.opensubtitlescom for lang in languages))})

- # query the server
- responses = self._search(**criterion)
-
imdb_match = 'imdb_id' in criterion or 'show_imdb_id' in criterion
tmdb_match = 'tmdb_id' in criterion or 'show_tmdb_id' in criterion

# loop over subtitle items
- for response in responses:
+ for response in self._search(**criterion):
# read single response
subtitle = self.subtitle_class.from_response(
response,
17 changes: 9 additions & 8 deletions srcpkgs/subliminal/template
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Template file for 'subliminal'
pkgname=subliminal
version=2.1.0
revision=10
build_style=python3-module
hostmakedepends="python3-setuptools"
version=2.5.0
revision=1
build_style=python3-pep517
hostmakedepends="hatchling hatch-vcs"
depends="python3 python3-guessit python3-babelfish python3-enzyme
python3-BeautifulSoup4 python3-requests python3-click python3-dogpile.cache
python3-stevedore python3-chardet python3-pysrt python3-six python3-appdirs
python3-rarfile python3-pytz"
python3-BeautifulSoup4 python3-requests python3-click python3-click-option-group
python3-dogpile.cache python3-stevedore python3-chardet python3-pytz
python3-rarfile python3-srt python3-pysubs2 python3-tomlkit python3-platformdirs
python3-defusedxml python3-knowit"
short_desc="Subtitles, faster than your thoughts"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="http://subliminal.readthedocs.org"
changelog="https://github.com/Diaoul/subliminal/blob/master/HISTORY.rst"
distfiles="${PYPI_SITE}/s/subliminal/subliminal-${version}.tar.gz"
checksum=c6439cc733a4f37f01f8c14c096d44fd28d75d1f6f6e2d1d1003b1b82c65628b
checksum=3c79507e9c304895fb41eb0039b11f5abcb9f77376fe550cb605932836dfadc3

do_check() {
: # pypi tarball has no tests
Expand Down