eaf-base-api 4.2.3__tar.gz → 4.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eaf_base_api
3
- Version: 4.2.3
3
+ Version: 4.2.6
4
4
  Summary: A base API for EchterAlsFake's Porn APIs
5
5
  Author: Johannes Habel
6
6
  Author-email: Johannes Habel <EchterAlsFake@proton.me>
@@ -233,6 +233,7 @@ def remux_ts_to_mp4(
233
233
  try:
234
234
  cmd = [
235
235
  str(ffmpeg),
236
+ "-nostdin",
236
237
  "-y",
237
238
  "-v", "error",
238
239
  "-i", str(in_p),
@@ -263,7 +264,12 @@ def remux_ts_to_mp4(
263
264
  str(out_p),
264
265
  ])
265
266
 
266
- proc = subprocess.run(cmd, capture_output=True, text=True)
267
+ # GUI launches on Windows may have an invalid inherited console input
268
+ # handle. Supply all streams explicitly and keep FFmpeg windowless.
269
+ proc = subprocess.run(
270
+ cmd, stdin=subprocess.DEVNULL, capture_output=True, text=True,
271
+ creationflags=subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0,
272
+ )
267
273
  if proc.returncode != 0:
268
274
  raise RuntimeError(f"FFmpeg stream-copy remux failed: {proc.stderr.strip()}")
269
275
 
@@ -304,6 +310,7 @@ def write_metadata_tags(
304
310
  try:
305
311
  cmd = [
306
312
  str(ffmpeg),
313
+ "-nostdin",
307
314
  "-y",
308
315
  "-v", "error",
309
316
  "-i", str(target_path),
@@ -334,7 +341,10 @@ def write_metadata_tags(
334
341
 
335
342
  cmd.extend(["-movflags", "+faststart", str(temporary_output)])
336
343
 
337
- proc = subprocess.run(cmd, capture_output=True, text=True)
344
+ proc = subprocess.run(
345
+ cmd, stdin=subprocess.DEVNULL, capture_output=True, text=True,
346
+ creationflags=subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0,
347
+ )
338
348
  if proc.returncode != 0:
339
349
  raise MetadataWriteError(f"FFmpeg tagging failed: {proc.stderr.strip()}")
340
350
 
@@ -36,7 +36,8 @@ class ContextLogger(logging.LoggerAdapter):
36
36
  "url": active_url or "-"}
37
37
  context.update(kwargs.get("extra") or {})
38
38
  kwargs["extra"] = context
39
- return f"[class={context['class_name']} url={context['url']}] {msg}", kwargs
39
+ prefix = f"[class={context['class_name']} url={context['url']}]".replace("%", "%%")
40
+ return f"{prefix} {msg}", kwargs
40
41
 
41
42
 
42
43
  def get_logger(name: str, owner: object | None = None) -> ContextLogger:
@@ -7,6 +7,7 @@ from functools import wraps
7
7
 
8
8
  from base_api.modules import errors
9
9
  from base_api.modules.logger import class_name, get_logger, log_context
10
+ from base_api.modules.static_functions import strip_title
10
11
  from base_api.modules.urls import same_site_url
11
12
 
12
13
 
@@ -90,7 +91,8 @@ def prepare_download_config(configuration, title: str | None):
90
91
  # own attributes (path, stream URL, default callback) are changed.
91
92
  result = copy.copy(configuration)
92
93
  if not result.no_title:
93
- result.path = os.path.join(result.path, f"{title}.mp4")
94
+ clean_title = strip_title(title) if title else "video"
95
+ result.path = os.path.join(result.path, f"{clean_title}.mp4")
94
96
  return result
95
97
 
96
98
 
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.9.30,<0.10.0"]
2
+ requires = ["uv_build>=0.13.0,<0.14.0"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "eaf_base_api"
7
- version = "4.2.3"
7
+ version = "4.2.6"
8
8
  description = "A base API for EchterAlsFake's Porn APIs"
9
9
  requires-python = ">=3.12"
10
10
  license = "AGPL-3.0-or-later"
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.9.30,<0.10.0"]
2
+ requires = ["uv_build>=0.13.0,<0.14.0"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "eaf_base_api"
7
- version = "4.2.3"
7
+ version = "4.2.6"
8
8
  description = "A base API for EchterAlsFake's Porn APIs"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  requires-python = ">=3.12"
File without changes
File without changes