warp-beacon 2.1.12__tar.gz → 2.1.13__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.
- {warp_beacon-2.1.12/warp_beacon.egg-info → warp_beacon-2.1.13}/PKG-INFO +1 -1
- warp_beacon-2.1.13/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/jobs/abstract.py +1 -1
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/telegram/bot.py +3 -3
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/telegram/handlers.py +4 -4
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/telegram/utils.py +5 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/uploader/__init__.py +1 -2
- {warp_beacon-2.1.12 → warp_beacon-2.1.13/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.1.12/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/LICENSE +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/MANIFEST.in +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/README.md +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/assets/placeholder.gif +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/etc/.gitignore +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/etc/accounts.json +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/pyproject.toml +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/setup.cfg +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/setup.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.1.12 → warp_beacon-2.1.13}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -65,7 +65,7 @@ class AbstractJob(ABC):
|
|
65
65
|
canonical_name: str = ""
|
66
66
|
is_message_to_admin: bool = False
|
67
67
|
message_text: str = ""
|
68
|
-
|
68
|
+
source_username: str = ""
|
69
69
|
unvailable_error_count: int = 0
|
70
70
|
geoblock_error_count: int = 0
|
71
71
|
account_switches: int = 0
|
@@ -149,9 +149,9 @@ class Bot(object):
|
|
149
149
|
def build_signature_caption(self, job: UploadJob) -> str:
|
150
150
|
caption = ""
|
151
151
|
if job.chat_type in (ChatType.GROUP, ChatType.SUPERGROUP):
|
152
|
-
if job.
|
153
|
-
caption += f"Requested by **@{job.
|
154
|
-
if job.
|
152
|
+
if job.source_username:
|
153
|
+
caption += f"Requested by **@{job.source_username}**"
|
154
|
+
if job.source_username and job.url:
|
155
155
|
caption += " | "
|
156
156
|
if job.url:
|
157
157
|
caption += f"[Source link]({job.url})"
|
@@ -39,7 +39,7 @@ class Handlers(object):
|
|
39
39
|
media_type=JobType[d["media_type"].upper()],
|
40
40
|
message_id=message.id,
|
41
41
|
chat_type=message.chat.type,
|
42
|
-
source_username=message
|
42
|
+
source_username=Utils.extract_message_author(message)
|
43
43
|
)
|
44
44
|
)
|
45
45
|
|
@@ -100,7 +100,7 @@ class Handlers(object):
|
|
100
100
|
media_type=JobType.COLLECTION,
|
101
101
|
chat_id=chat.id,
|
102
102
|
chat_type=message.chat.type,
|
103
|
-
source_username=message
|
103
|
+
source_username=Utils.extract_message_author(message)
|
104
104
|
)
|
105
105
|
)
|
106
106
|
elif ent_len:
|
@@ -113,7 +113,7 @@ class Handlers(object):
|
|
113
113
|
media_type=media_type,
|
114
114
|
chat_id=chat.id,
|
115
115
|
chat_type=message.chat.type,
|
116
|
-
source_username=message
|
116
|
+
source_username=Utils.extract_message_author(message)
|
117
117
|
)
|
118
118
|
)
|
119
119
|
else:
|
@@ -164,7 +164,7 @@ class Handlers(object):
|
|
164
164
|
in_process=self.bot.uploader.is_inprocess(uniq_id),
|
165
165
|
uniq_id=uniq_id,
|
166
166
|
job_origin=origin,
|
167
|
-
source_username=message
|
167
|
+
source_username=Utils.extract_message_author(message),
|
168
168
|
chat_type=chat.type
|
169
169
|
))
|
170
170
|
self.bot.uploader.set_inprocess(uniq_id)
|
@@ -85,5 +85,10 @@ class Utils(object):
|
|
85
85
|
def extract_message_author(message: Message) -> str:
|
86
86
|
if message.from_user:
|
87
87
|
return message.from_user
|
88
|
+
if message.sender_chat:
|
89
|
+
if message.sender_chat.username:
|
90
|
+
return message.sender_chat.username
|
91
|
+
if message.sender_chat.title:
|
92
|
+
return message.sender_chat.title
|
88
93
|
return ''
|
89
94
|
|
@@ -2,12 +2,11 @@ import os
|
|
2
2
|
import threading
|
3
3
|
import multiprocessing
|
4
4
|
from warp_beacon.jobs.upload_job import UploadJob
|
5
|
-
#import time
|
6
5
|
import logging
|
7
6
|
|
8
7
|
import asyncio
|
9
8
|
|
10
|
-
from typing import
|
9
|
+
from typing import Callable
|
11
10
|
|
12
11
|
from warp_beacon.storage import Storage
|
13
12
|
from warp_beacon.jobs.types import JobType
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|