eaf_base_api 3.3__tar.gz → 3.3.1__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: 3.3
3
+ Version: 3.3.1
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>
@@ -10,8 +10,8 @@ Classifier: Programming Language :: Python
10
10
  Requires-Dist: curl-cffi
11
11
  Requires-Dist: tenacity>=9.1.2
12
12
  Requires-Dist: m3u8 ; extra == 'hls'
13
- Requires-Dist: av ; python_full_version >= '3.10' and extra == 'hls'
14
- Requires-Python: >=3.10
13
+ Requires-Dist: av ; python_full_version >= '3.12' and extra == 'hls'
14
+ Requires-Python: >=3.12
15
15
  Project-URL: Homepage, https://github.com/EchterAlsFake/eaf_base_api
16
16
  Project-URL: Repository, https://github.com/EchterAlsFake/eaf_base_api
17
17
  Provides-Extra: hls
@@ -1043,8 +1043,8 @@ a new Python file, import only m3u8 and see what error you get.
1043
1043
  assert m3u8 is not None
1044
1044
 
1045
1045
  if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
1046
- m3u8_url = await m3u8_url()
1047
- elif inspect.iscoroutine(m3u8_url):
1046
+ m3u8_url = m3u8_url()
1047
+ if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
1048
1048
  m3u8_url = await m3u8_url
1049
1049
 
1050
1050
  if m3u8_url.lstrip().startswith("#EXTM3U"):
@@ -1079,6 +1079,12 @@ a new Python file, import only m3u8 and see what error you get.
1079
1079
  Inspect the master playlist and return sorted unique heights (e.g., [240, 360, 480, 720, 1080]).
1080
1080
  """
1081
1081
  assert m3u8 is not None
1082
+
1083
+ if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
1084
+ m3u8_url = m3u8_url()
1085
+ if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
1086
+ m3u8_url = await m3u8_url
1087
+
1082
1088
  if not m3u8_url.startswith("https://"):
1083
1089
  master = m3u8.loads(m3u8_url)
1084
1090
  else:
@@ -1249,8 +1255,8 @@ a new Python file, import only m3u8 and see what error you get.
1249
1255
  m3u8_url = getattr(video, "m3u8_base_url", None)
1250
1256
 
1251
1257
  if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
1252
- m3u8_url = await m3u8_url()
1253
- elif inspect.iscoroutine(m3u8_url):
1258
+ m3u8_url = m3u8_url()
1259
+ if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
1254
1260
  m3u8_url = await m3u8_url
1255
1261
 
1256
1262
  self.logger.info(
@@ -1389,8 +1395,8 @@ a new Python file, import only m3u8 and see what error you get.
1389
1395
  m3u8_master = getattr(video, "m3u8_base_url")
1390
1396
  assert m3u8_master is not None, "m3u8_base_url is missing from video object"
1391
1397
  if inspect.iscoroutinefunction(m3u8_master) or (callable(m3u8_master) and not isinstance(m3u8_master, str)):
1392
- m3u8_master = await m3u8_master()
1393
- elif inspect.iscoroutine(m3u8_master):
1398
+ m3u8_master = m3u8_master()
1399
+ if inspect.iscoroutine(m3u8_master) or inspect.isawaitable(m3u8_master):
1394
1400
  m3u8_master = await m3u8_master
1395
1401
  self.logger.info(f"Fetching segments for quality={quality} m3u8_url_master={m3u8_master}")
1396
1402
  segments = await self.get_segments(quality=quality, m3u8_url_master=m3u8_master)
@@ -4,10 +4,10 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "eaf_base_api"
7
- version = "3.3"
7
+ version = "3.3.1"
8
8
  description = "A base API for EchterAlsFake's Porn APIs"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.12"
11
11
  license = "LGPL-3.0-or-later"
12
12
  license-files = ["LICENSE*"]
13
13
 
@@ -28,7 +28,7 @@ dependencies = [
28
28
  hls = [
29
29
  "m3u8",
30
30
  # av needs Python >= 3.10, so guard it (otherwise `pip install ...[hls]` fails on 3.8/3.9)
31
- "av; python_version >= '3.10'",
31
+ "av; python_version >= '3.12'",
32
32
  ]
33
33
 
34
34
  [project.urls]
File without changes
File without changes