warp-beacon 2.2.6__py3-none-any.whl → 2.2.8__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.
- warp_beacon/__version__.py +1 -1
- warp_beacon/mediainfo/video.py +1 -1
- warp_beacon/scraper/youtube/abstract.py +1 -1
- warp_beacon/telegram/bot.py +6 -2
- warp_beacon/telegram/utils.py +4 -1
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/METADATA +1 -1
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/RECORD +11 -11
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/WHEEL +1 -1
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/LICENSE +0 -0
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.2.6.dist-info → warp_beacon-2.2.8.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.2.
|
1
|
+
__version__ = "2.2.8"
|
2
2
|
|
warp_beacon/mediainfo/video.py
CHANGED
@@ -48,7 +48,7 @@ class VideoInfo(MediaInfoAbstract):
|
|
48
48
|
# Signal that we only want to look at keyframes.
|
49
49
|
stream = self.container.streams.video[0]
|
50
50
|
stream.codec_context.skip_frame = "NONKEY"
|
51
|
-
frame_num =
|
51
|
+
frame_num = 120
|
52
52
|
time_base = stream.time_base
|
53
53
|
framerate = stream.average_rate
|
54
54
|
frame_container_pts = round((frame_num / framerate) / time_base)
|
@@ -109,7 +109,7 @@ class YoutubeAbstract(ScraperAbstract):
|
|
109
109
|
image = Image.open(io.BytesIO(f.read()))
|
110
110
|
image = MediaInfoAbstract.shrink_image_to_fit(image)
|
111
111
|
io_buf = io.BytesIO()
|
112
|
-
image.save(io_buf, format='JPEG')
|
112
|
+
image.save(io_buf, format='JPEG', subsampling=0, quality=100)
|
113
113
|
io_buf.seek(0)
|
114
114
|
return io_buf
|
115
115
|
except Exception as e:
|
warp_beacon/telegram/bot.py
CHANGED
@@ -148,13 +148,17 @@ class Bot(object):
|
|
148
148
|
|
149
149
|
def build_signature_caption(self, job: UploadJob) -> str:
|
150
150
|
caption = ""
|
151
|
+
if job.canonical_name:
|
152
|
+
caption = f"**{job.canonical_name}**"
|
151
153
|
if job.chat_type in (ChatType.GROUP, ChatType.SUPERGROUP):
|
154
|
+
if job.canonical_name:
|
155
|
+
caption += "\n"
|
152
156
|
if job.source_username:
|
153
157
|
caption += f"Requested by **@{job.source_username}**"
|
154
158
|
if job.source_username and job.url:
|
155
159
|
caption += " | "
|
156
160
|
if job.url:
|
157
|
-
caption += f"[
|
161
|
+
caption += f"[source link]({job.url})"
|
158
162
|
|
159
163
|
return caption
|
160
164
|
|
@@ -315,7 +319,7 @@ class Bot(object):
|
|
315
319
|
args["message_id"] = job.placeholder_message_id
|
316
320
|
else:
|
317
321
|
args["disable_notification"] = True
|
318
|
-
args["reply_to_message_id"] = job.message_id
|
322
|
+
#args["reply_to_message_id"] = job.message_id
|
319
323
|
|
320
324
|
if os.environ.get("ENABLE_DONATES", None) == "true" and job.media_type is not JobType.COLLECTION:
|
321
325
|
args["reply_markup"] = InlineKeyboardMarkup([[InlineKeyboardButton("❤ Donate", url=os.environ.get("DONATE_LINK", "https://pay.cryptocloud.plus/pos/W5BMtNQt5bJFoW2E"))]])
|
warp_beacon/telegram/utils.py
CHANGED
@@ -84,7 +84,10 @@ class Utils(object):
|
|
84
84
|
@staticmethod
|
85
85
|
def extract_message_author(message: Message) -> str:
|
86
86
|
if message.from_user:
|
87
|
-
|
87
|
+
if message.from_user.username:
|
88
|
+
return message.from_user.username
|
89
|
+
if message.from_user.id:
|
90
|
+
return str(message.from_user.id)
|
88
91
|
if message.sender_chat:
|
89
92
|
if message.sender_chat.username:
|
90
93
|
return message.sender_chat.username
|
@@ -3,7 +3,7 @@ lib/systemd/system/warp_beacon.service,sha256=lPmHqLqcI2eIV7nwHS0qcALQrznixqJuww
|
|
3
3
|
var/warp_beacon/accounts.json,sha256=rKFQM_b9eoDS4mJ1B_SZNolPLXx1SQdQMdY2F_ZcBt8,1523
|
4
4
|
var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
|
5
5
|
warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
|
6
|
-
warp_beacon/__version__.py,sha256=
|
6
|
+
warp_beacon/__version__.py,sha256=XDXei5fg61VxVBlT807KOYh3HbXVdl_uehPZ3sl46Gk,23
|
7
7
|
warp_beacon/warp_beacon.py,sha256=7KEtZDj-pdhtl6m-zFLsSojs1ZR4o7L0xbqtdmYPvfE,342
|
8
8
|
warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
warp_beacon/compress/video.py,sha256=_PDMVYCyzLYxHv1uZmmzGcG_8rjaZr7BTXsXTTy_oS4,2846
|
@@ -16,7 +16,7 @@ warp_beacon/mediainfo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
16
16
|
warp_beacon/mediainfo/abstract.py,sha256=ZR2JMuRpoh7nDNov9a8YkAfr6BI2HXnXzQtVrLgDxjs,1185
|
17
17
|
warp_beacon/mediainfo/audio.py,sha256=ous88kwQj4bDIChN5wnGil5LqTs0IQHH0d-nyrL0-ZM,651
|
18
18
|
warp_beacon/mediainfo/silencer.py,sha256=MgUc9Ibbhjhg9GbJMNfJqrdDkMsQShZkQ1sCwvW_-qI,1647
|
19
|
-
warp_beacon/mediainfo/video.py,sha256=
|
19
|
+
warp_beacon/mediainfo/video.py,sha256=DXHiWAOyJPSVXQ0OP7uOBikUFT7noFmMaMSIx04Mhs4,2506
|
20
20
|
warp_beacon/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
warp_beacon/scheduler/scheduler.py,sha256=8gjW0CLuX3KyYpSDSkRE0i48AsJbi-fQ2qJZAJ-yt_s,2411
|
22
22
|
warp_beacon/scraper/__init__.py,sha256=a9B877_OfoUFufMQBgFqIg9prrt84UcUS91jsRbyHU8,15010
|
@@ -26,20 +26,20 @@ warp_beacon/scraper/exceptions.py,sha256=lHsPrYy5iYnHsIdUHqRxZmzlqrkNj_TS4TkiTJf
|
|
26
26
|
warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
warp_beacon/scraper/instagram/instagram.py,sha256=iT66IM7nsbVDWQzBW-CJUWDBjoBbRZH4BHx6TJw3oqo,13517
|
28
28
|
warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
warp_beacon/scraper/youtube/abstract.py,sha256=
|
29
|
+
warp_beacon/scraper/youtube/abstract.py,sha256=Wfui5UEN4OV4dnTbRTyYuf_qvUy9sX93rGyVlOsBe04,6076
|
30
30
|
warp_beacon/scraper/youtube/music.py,sha256=8TguqXc1BC9Slp09BzCU8dtQ6BnyKwzZSLLFHpqDHtg,1498
|
31
31
|
warp_beacon/scraper/youtube/shorts.py,sha256=pHfvEBau8Zp7Ar3LBuPmjqYq8fmjJUQvzeZXujQMpG4,1203
|
32
32
|
warp_beacon/scraper/youtube/youtube.py,sha256=K98n2TSJaDZt-xT7mADZL1UEf2exIYm0Wnenn2GAYfI,2250
|
33
33
|
warp_beacon/storage/__init__.py,sha256=8XsJXq9X7GDlTaWREF4W1PDX9PH5utwhjf5c5M8Bb7o,3378
|
34
34
|
warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
warp_beacon/telegram/bot.py,sha256=
|
35
|
+
warp_beacon/telegram/bot.py,sha256=pvgoAchBq9ZRGkaXAO0PyDSb-NV_5_2rGQhEm0LuQdw,15182
|
36
36
|
warp_beacon/telegram/handlers.py,sha256=LWDdJBLuB-ImemPtzldgm9UY42T2mr0yJsHHQZDmQkI,6759
|
37
37
|
warp_beacon/telegram/placeholder_message.py,sha256=u5kVfTjGmVYkwA5opniRltHXGpsdSxI41WEde8J5os0,6418
|
38
|
-
warp_beacon/telegram/utils.py,sha256=
|
38
|
+
warp_beacon/telegram/utils.py,sha256=CeWXMwyzv2l4Af6I-wW2ySU490c-5k82sBhkjabv0n4,2452
|
39
39
|
warp_beacon/uploader/__init__.py,sha256=rsUkzzmtaeQY-kNkcIiPsrayS9idFKY3hBC71mR19XE,4743
|
40
|
-
warp_beacon-2.2.
|
41
|
-
warp_beacon-2.2.
|
42
|
-
warp_beacon-2.2.
|
43
|
-
warp_beacon-2.2.
|
44
|
-
warp_beacon-2.2.
|
45
|
-
warp_beacon-2.2.
|
40
|
+
warp_beacon-2.2.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
41
|
+
warp_beacon-2.2.8.dist-info/METADATA,sha256=ThDj6dK54k68nfDR8Nv_LKbzTGUdQtLnOvhjpge_jYI,21250
|
42
|
+
warp_beacon-2.2.8.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
43
|
+
warp_beacon-2.2.8.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
44
|
+
warp_beacon-2.2.8.dist-info/top_level.txt,sha256=ALb_Ft_eG-OY4_m0TWUifNUOZsrx483L-zw7G7vqXoc,971
|
45
|
+
warp_beacon-2.2.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|