Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
subinps committed Dec 30, 2021
1 parent e698a10 commit 687b21a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,8 @@ async def c_play(channel):
async def pause():
try:
await group_call.pause_stream(Config.CHAT)
Config.DUR['PAUSE'] = time.time()
Config.PAUSE=True
return True
except GroupCallNotFound:
await restart_playout()
Expand All @@ -1344,6 +1346,13 @@ async def pause():
async def resume():
try:
await group_call.resume_stream(Config.CHAT)
pause=Config.DUR.get('PAUSE')
if pause:
diff = time.time() - pause
start=Config.DUR.get('TIME')
if start:
Config.DUR['TIME']=start+diff
Config.PAUSE=False
return True
except GroupCallNotFound:
await restart_playout()
Expand Down

0 comments on commit 687b21a

Please sign in to comment.