py-tgcalls 1.2.0b3__py3-none-any.whl → 1.2.0b4__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.1
2
2
  Name: py-tgcalls
3
- Version: 1.2.0b3
3
+ Version: 1.2.0b4
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/pytgcalls/pytgcalls
6
6
  Author: Laky-64
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
20
20
  Requires-Python: >=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: aiohttp
23
+ Requires-Dist: aiohttp (>=3.9.3)
24
24
  Requires-Dist: deprecation
25
25
  Requires-Dist: ntgcalls (>=1.0.4)
26
26
  Requires-Dist: psutil
@@ -1,5 +1,5 @@
1
1
  pytgcalls/__init__.py,sha256=MRF45fC5EHvNRJgMHKZEiytlfOidmShTvi5loWD9GPw,261
2
- pytgcalls/__version__.py,sha256=4ckk-Cls6CKJVP8rWb27nis58iJTbJdroI_RftwT3Dk,24
2
+ pytgcalls/__version__.py,sha256=e0x1w4r-Ts9X2Jy52t0kP_sQy_wvO1djpeHHELferXs,24
3
3
  pytgcalls/environment.py,sha256=ctCHACvG6l8SdpPewSBhOvc70kbwpv18maC0TwLvZ08,1924
4
4
  pytgcalls/exceptions.py,sha256=C261IoYwqXTUmuYGY8u2GZzBATOAumTUg_v5KPffjHk,3711
5
5
  pytgcalls/ffmpeg.py,sha256=boFIaw4Bov7sIkZPlOx7UJ3xE4anmPmjRXPpTxjzCf4,8377
@@ -44,11 +44,11 @@ pytgcalls/methods/utilities/cache_peer.py,sha256=Ylt0wCCJOoNKf1wZEXjfE8aBZKUIIgd
44
44
  pytgcalls/methods/utilities/call_holder.py,sha256=3OkoiQ_wa3idnJiR1juJuOcxB8C_ojSpDnIUkh9vbLw,1776
45
45
  pytgcalls/methods/utilities/get_max_voice_chat.py,sha256=NbNivrr3kVguIkuTx8rUApxCWUmJiUipHjLE0-V0vJg,237
46
46
  pytgcalls/methods/utilities/idle.py,sha256=khG0AGmLwgglKwToab29X5Em1tz2r4wRHTX0APrza_k,727
47
- pytgcalls/methods/utilities/mtproto_handler.py,sha256=em8fImrp2ZG5UW0ps2POTXbKOk77gAG0s8RLCPGpn-g,3274
47
+ pytgcalls/methods/utilities/mtproto_handler.py,sha256=pdX29BJDPsdB9xFLRZt41Lc1OXercsDhuRMZuOPgTy8,2473
48
48
  pytgcalls/methods/utilities/ping.py,sha256=pIraQyVd-fJDAdEnuD5MHBgFhXxN8-6yl2TV68aw6AA,295
49
49
  pytgcalls/methods/utilities/resolve_chat_id.py,sha256=GiCU2AVidY5dTK7Rf-77MBse8mizMQwdRdxCLHrq6Lc,413
50
50
  pytgcalls/methods/utilities/run.py,sha256=cnYQd2xB5Cr_WS0Q2cXJZPGiN6JOCULzj1r4xXVyrlg,152
51
- pytgcalls/methods/utilities/start.py,sha256=1eDXLwxhyNsLcUt0hfxwjFm2YKEDBS41i5e1zagmXGQ,3073
51
+ pytgcalls/methods/utilities/start.py,sha256=WB9lXlAfiEqwYlxzboPiNgwvZ1eFMuCb8IcIq9slVe0,3592
52
52
  pytgcalls/methods/utilities/stream_params.py,sha256=GS5-Dcxq9-Uh3cZAyO4qQnBE_AIe0t6Y8xYjOpmOEbY,1578
53
53
  pytgcalls/mtproto/__init__.py,sha256=X4zvzFG7km7qHyE0fdvA550WcOVO_xl_p__gvIfDGmw,130
54
54
  pytgcalls/mtproto/bridged_client.py,sha256=AmpXcBDHte6YWtlpq9qNAteVe1lI4rQrhtBcGHd1A3A,2756
@@ -102,8 +102,8 @@ pytgcalls/types/stream/legacy/quality/low_quality_audio.py,sha256=D69u3emO4lSKwV
102
102
  pytgcalls/types/stream/legacy/quality/low_quality_video.py,sha256=WH_oMrdj2RG7WGc2TRpuAHA0fYE57k_dOAqBnd0Xt2g,391
103
103
  pytgcalls/types/stream/legacy/quality/medium_quality_audio.py,sha256=IfIWt7Bv_2BE2RcgOIpyel0ewcoMsa8hm7rZ-p9fRG8,393
104
104
  pytgcalls/types/stream/legacy/quality/medium_quality_video.py,sha256=nrNjCkoHTSOh3cPdKDi66HXTPl9f6rqhIalTwE6Ad_U,394
105
- py_tgcalls-1.2.0b3.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
106
- py_tgcalls-1.2.0b3.dist-info/METADATA,sha256=UF3ODltSWKFvs2hZRjSR8e_K2I39dpEjZtsByMIormk,4846
107
- py_tgcalls-1.2.0b3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
108
- py_tgcalls-1.2.0b3.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
109
- py_tgcalls-1.2.0b3.dist-info/RECORD,,
105
+ py_tgcalls-1.2.0b4.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
106
+ py_tgcalls-1.2.0b4.dist-info/METADATA,sha256=Rkr79cbjSV5vFAlHZLnylCYWhu7BBIdEv4DLXtbQVT8,4856
107
+ py_tgcalls-1.2.0b4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
108
+ py_tgcalls-1.2.0b4.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
109
+ py_tgcalls-1.2.0b4.dist-info/RECORD,,
pytgcalls/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.2.0b3'
1
+ __version__ = '1.2.0b4'
@@ -1,7 +1,4 @@
1
- from ntgcalls import ConnectionNotFound
2
-
3
1
  from ...scaffold import Scaffold
4
- from ...to_async import ToAsync
5
2
  from ...types import Update
6
3
  from ...types.groups import GroupCallParticipant
7
4
  from ...types.groups import JoinedGroupCallParticipant
@@ -22,32 +19,14 @@ class MTProtoHandler(Scaffold):
22
19
  def _handle_mtproto(self):
23
20
  @self._app.on_kicked()
24
21
  async def kicked_handler(chat_id: int):
25
- try:
26
- await ToAsync(
27
- self._binding.stop,
28
- chat_id,
29
- )
30
- except ConnectionNotFound:
31
- pass
32
-
33
22
  await self._on_event_update.propagate(
34
23
  'KICK_HANDLER',
35
24
  self,
36
25
  chat_id,
37
26
  )
38
- self._cache_user_peer.pop(chat_id)
39
27
 
40
28
  @self._app.on_closed_voice_chat()
41
29
  async def closed_voice_chat_handler(chat_id: int):
42
- self._cache_user_peer.pop(chat_id)
43
- try:
44
- await ToAsync(
45
- self._binding.stop,
46
- chat_id,
47
- )
48
- except ConnectionNotFound:
49
- pass
50
-
51
30
  await self._on_event_update.propagate(
52
31
  'CLOSED_HANDLER',
53
32
  self,
@@ -64,14 +43,6 @@ class MTProtoHandler(Scaffold):
64
43
 
65
44
  @self._app.on_left_group()
66
45
  async def left_handler(chat_id: int):
67
- self._cache_user_peer.pop(chat_id)
68
- try:
69
- await ToAsync(
70
- self._binding.stop,
71
- chat_id,
72
- )
73
- except ConnectionNotFound:
74
- pass
75
46
  await self._on_event_update.propagate(
76
47
  'LEFT_HANDLER',
77
48
  self,
@@ -9,6 +9,7 @@ from ...exceptions import PyTgCallsAlreadyRunning
9
9
  from ...mtproto import BridgedClient
10
10
  from ...pytgcalls_session import PyTgCallsSession
11
11
  from ...scaffold import Scaffold
12
+ from ...to_async import ToAsync
12
13
  from ...types import GroupCallParticipant
13
14
  from ...types import StreamAudioEnded
14
15
  from ...types import StreamVideoEnded
@@ -43,6 +44,21 @@ class Start(Scaffold):
43
44
  pass
44
45
  self._need_unmute[chat_id] = participant.muted_by_admin
45
46
 
47
+ @self._app.on_kicked()
48
+ @self._app.on_left_group()
49
+ @self._app.on_closed_voice_chat()
50
+ async def clear_call(chat_id: int):
51
+ try:
52
+ await ToAsync(
53
+ self._binding.stop,
54
+ chat_id,
55
+ )
56
+ except ConnectionNotFound:
57
+ pass
58
+ self._cache_user_peer.pop(chat_id)
59
+ if chat_id in self._need_unmute:
60
+ del self._need_unmute[chat_id]
61
+
46
62
  def stream_upgrade(chat_id: int, state: MediaState):
47
63
  asyncio.run_coroutine_threadsafe(
48
64
  update_status(chat_id, state), loop,