Skip to content

Commit

Permalink
include time in CUSTOM URL Format
Browse files Browse the repository at this point in the history
  • Loading branch information
DeekshithSH committed Oct 12, 2024
1 parent bdc3176 commit 2170aba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion WebStreamer/bot/plugins/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import logging
import urllib.parse
from time import time
from WebStreamer.bot import StreamBot
from telethon import Button, errors
from telethon.events import NewMessage
Expand Down Expand Up @@ -31,7 +32,8 @@ async def private_receive_handler(event: NewMessage.Event):
"name": urllib.parse.quote(file_name),
"size": get_size(event.message.media),
"id": log_msg.id,
"mime": urllib.parse.quote(log_msg.file.mime_type)
"mime": urllib.parse.quote(log_msg.file.mime_type),
"time": int(time())
})
else:
stream_link = f"{Var.URL}dl/{log_msg.id}/{urllib.parse.quote(get_name(event.message.file))}"
Expand Down
2 changes: 1 addition & 1 deletion WebStreamer/utils/Translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class en:
<b>📦 File Size:</b> <i>{size}</i>\n
<b>📥 Download:</b> <i>{link}</i>\n
Link generated using <a href='https://t.me/{username}'>{firstname}</a>.\n
<b>Note:</b> Link will only work for 24 hours.
<b>Note:</b> Link will only work for 1 week.
"""

#----------------------#
Expand Down

0 comments on commit 2170aba

Please sign in to comment.