py-tgcalls 2.1.2b1__py3-none-any.whl → 2.1.2b3__py3-none-any.whl

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: py-tgcalls
3
- Version: 2.1.2b1
3
+ Version: 2.1.2b3
4
4
  Summary: Async client API for the Telegram Calls.
5
5
  Author-email: Laky-64 <iraci.matteo@gmail.com>
6
6
  Project-URL: Homepage, https://pytgcalls.github.io/
@@ -20,7 +20,7 @@ Requires-Python: >=3.9
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  Requires-Dist: aiohttp>=3.9.3
23
- Requires-Dist: ntgcalls<1.4.0,>=1.3.5b1
23
+ Requires-Dist: ntgcalls<1.4.0,>=1.3.5b5
24
24
  Requires-Dist: deprecation
25
25
  Provides-Extra: pyrogram
26
26
  Requires-Dist: pyrogram>=1.2.20; extra == "pyrogram"
@@ -1,8 +1,8 @@
1
- py_tgcalls-2.1.2b1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
1
+ py_tgcalls-2.1.2b3.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
2
2
  pytgcalls/__init__.py,sha256=qbfwN7rYwIdCegMOzdcbvwazeNjDzgmowgcqLFNqKIM,308
3
- pytgcalls/__version__.py,sha256=kvDoewJAYHho5O8mY2N051qMPx4teq8KxOdVpZY5OZI,24
3
+ pytgcalls/__version__.py,sha256=jIltsC16890jgPh8YRlK5nMNGzaAe5P19p3v0qdpUyM,24
4
4
  pytgcalls/environment.py,sha256=ctCHACvG6l8SdpPewSBhOvc70kbwpv18maC0TwLvZ08,1924
5
- pytgcalls/exceptions.py,sha256=Rijc-8T93WEWJxNW9jncU8_M6mYZZZcs8F2bqitEIeI,3787
5
+ pytgcalls/exceptions.py,sha256=yezms8JiO7aGEkUrvTkR9QHhXtVOIXmm1Q4nQbx9tm0,3958
6
6
  pytgcalls/ffmpeg.py,sha256=tm6DBxyNfPh3h3an-b2s9x1UyX-cvkCdov9prlXxVZY,8649
7
7
  pytgcalls/filters.py,sha256=qTFDlt-23xnMh_Ug2WmmOUf13JPX6_yacrv7c3F9Pp0,6125
8
8
  pytgcalls/mtproto_required.py,sha256=6B-31p5qH_6oekUgypV4nK3hqPS6Nr-pA8S81wjnbaY,630
@@ -35,7 +35,7 @@ pytgcalls/methods/decorators/on_update.py,sha256=ZTL4YcQk0N4Ru56a5WItUvkSN5SAqr6
35
35
  pytgcalls/methods/internal/__init__.py,sha256=fcgIxUJKT6QJD30ltnOfzKsLhzTTTklD2qxKlwCvyv0,1057
36
36
  pytgcalls/methods/internal/clear_cache.py,sha256=qgG-oubmdtnefnXSiHSPHyBTyXypiLDC7G8l3FzjNw8,236
37
37
  pytgcalls/methods/internal/clear_call.py,sha256=yElvn3i6_j14Q7n9kcLSl-muYAGcaIZaEFHdp6MrN0g,549
38
- pytgcalls/methods/internal/connect_call.py,sha256=2DRmsILPyGNxV2880tVsQ2XUwd89iSIqVWHl5AkgEaE,5393
38
+ pytgcalls/methods/internal/connect_call.py,sha256=s4R-74sLippqPy1hpQasUaxwiJnZ9GVx6lgcaPqex8M,5900
39
39
  pytgcalls/methods/internal/emit_sig_data.py,sha256=ucIsknhJHB-0x7lcymXvwQ647AJQ852zH2W6MdlC3ws,216
40
40
  pytgcalls/methods/internal/handle_connection_changed.py,sha256=_1u3J6_Pjl1Gs1u_WkhG2FAUl_hxlHUiflaMkKkJDsc,866
41
41
  pytgcalls/methods/internal/handle_mtproto_updates.py,sha256=Ev2Jake6Z_SrBodnjO5N16YiYaEY3Ti4tkU1pKOsJVM,7747
@@ -70,7 +70,7 @@ pytgcalls/methods/utilities/start.py,sha256=mn0kQZhTUuc-9CCJDbFIVsEtJ8kfnfZOGbVC
70
70
  pytgcalls/methods/utilities/stream_params.py,sha256=fOSloo1A7WTxaZEtOiPXjdexMeoJjq8CZtfHuIFX7Ns,3325
71
71
  pytgcalls/mtproto/__init__.py,sha256=X4zvzFG7km7qHyE0fdvA550WcOVO_xl_p__gvIfDGmw,130
72
72
  pytgcalls/mtproto/bridged_client.py,sha256=svXufZkCj7WM9XOWkuk5oJVQxgL1Bg_8rz7w_ZKWlQg,6451
73
- pytgcalls/mtproto/client_cache.py,sha256=Mt0827e_T8DXJHOTkXhkIQUT9EUBWjoLcFcXP1gBnZY,5973
73
+ pytgcalls/mtproto/client_cache.py,sha256=fpmZhRUGD3G2t2LjEK0z4OPLmWVhJQZUvDW6bgr6StI,5907
74
74
  pytgcalls/mtproto/hydrogram_client.py,sha256=pSEtHowL833-vD5ppm78eBe7_Ik0pumChbDTMLsyP5Y,25553
75
75
  pytgcalls/mtproto/mtproto_client.py,sha256=95A13HsNJfpNslsY_gWiqYXj_Vvo-pl3rVrsJGxftgg,8517
76
76
  pytgcalls/mtproto/pyrogram_client.py,sha256=linvRHAxZCb4PenJEN9-OtjQm7Go9OONyDotZcMydNY,25710
@@ -115,7 +115,7 @@ pytgcalls/types/stream/record_stream.py,sha256=RWeD9U-sqUmb_PuZQxYnExZyoibepU_8o
115
115
  pytgcalls/types/stream/stream_ended.py,sha256=xR_kZwFf03hA6rw_nvI7Be7GwoCKzQf_1MKaGpPDXqY,716
116
116
  pytgcalls/types/stream/stream_frames.py,sha256=028ZhNV-mN3BGqMlmxusAV1xDQpXRYCeM0WXBZhRUhA,446
117
117
  pytgcalls/types/stream/video_quality.py,sha256=HBfWq005kh-D19MaVE9VzVdnODzrXf4IJUimCfslfiU,231
118
- py_tgcalls-2.1.2b1.dist-info/METADATA,sha256=eIv6LkWODtw1kuwAm47s97UaONUq-Dx3PeF8ojZQwbQ,5284
119
- py_tgcalls-2.1.2b1.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
120
- py_tgcalls-2.1.2b1.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
121
- py_tgcalls-2.1.2b1.dist-info/RECORD,,
118
+ py_tgcalls-2.1.2b3.dist-info/METADATA,sha256=wzJ9y03r_nlZyBHgX4lM7sPk03_7diECvlHeM_gpp6E,5284
119
+ py_tgcalls-2.1.2b3.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
120
+ py_tgcalls-2.1.2b3.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
121
+ py_tgcalls-2.1.2b3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
pytgcalls/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.1.2b1'
1
+ __version__ = '2.1.2b3'
pytgcalls/exceptions.py CHANGED
@@ -169,3 +169,10 @@ class UnsupportedMethod(Exception):
169
169
  super().__init__(
170
170
  'Unsupported method for this kind of call',
171
171
  )
172
+
173
+
174
+ class RTMPStreamingUnsupported(Exception):
175
+ def __init__(self):
176
+ super().__init__(
177
+ 'Streaming into an RTMP connection is not supported',
178
+ )
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import json
2
3
  from typing import Optional
3
4
  from typing import Union
4
5
 
@@ -7,6 +8,7 @@ from ntgcalls import ConnectionNotFound
7
8
  from ntgcalls import MediaDescription
8
9
  from ntgcalls import TelegramServerError
9
10
 
11
+ from ...exceptions import RTMPStreamingUnsupported
10
12
  from ...exceptions import TimedOutAnswer
11
13
  from ...scaffold import Scaffold
12
14
  from ...types import CallConfig
@@ -41,6 +43,15 @@ class ConnectCall(Scaffold):
41
43
  media_description.screen is None,
42
44
  self._cache_user_peer.get(chat_id),
43
45
  )
46
+ is_rtmp = json.loads(result_params).get('rtmp')
47
+ if (
48
+ media_description.camera is not None or
49
+ media_description.microphone is not None or
50
+ media_description.screen is not None or
51
+ media_description.speaker is not None
52
+ ) and is_rtmp:
53
+ raise RTMPStreamingUnsupported()
54
+
44
55
  await self._binding.connect(
45
56
  chat_id,
46
57
  result_params,
@@ -30,7 +30,6 @@ class ClientCache:
30
30
  ) -> Optional[Any]:
31
31
  full_chat = self._full_chat_cache.get(chat_id)
32
32
  if full_chat is not None:
33
- py_logger.debug('FullChat cache hit for %d', chat_id)
34
33
  return full_chat
35
34
  else:
36
35
  # noinspection PyBroadException