Skip to content

Commit 2a993bd

Browse files
author
NoAiOne
committed
black/flake8: reformat
1 parent 09bf0b3 commit 2a993bd

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

scripts/twitcast.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
os.path.splitext(os.path.basename(job))[0] for job in twitcast_jobs
4242
]
4343

44+
4445
def announce_shit(msg="Unknown"):
4546
if not DISCORD_WEBHOOK_URL:
4647
vtlog.debug("No Discord Webhook url, skipping announcement...")
@@ -64,6 +65,7 @@ def reset_handler(r=True):
6465
console.setFormatter(formatter0)
6566
vtlog.addHandler(console)
6667

68+
6769
reset_handler(False)
6870

6971
upload_mapping = {
@@ -131,15 +133,9 @@ def reset_handler(r=True):
131133

132134
vtlog.info("Executing streamlink command!")
133135

134-
save_ts_name = (
135-
"'" + BASE_VTHELL_PATH + "streamdump/" + filename + ".ts'"
136-
)
137-
save_mux_name = (
138-
BASE_VTHELL_PATH + "streamdump/" + filename + ".mkv"
139-
)
140-
save_ts_name1 = (
141-
BASE_VTHELL_PATH + "streamdump/" + filename + ".ts"
142-
)
136+
save_ts_name = "'" + BASE_VTHELL_PATH + "streamdump/" + filename + ".ts'"
137+
save_mux_name = BASE_VTHELL_PATH + "streamdump/" + filename + ".mkv"
138+
save_ts_name1 = BASE_VTHELL_PATH + "streamdump/" + filename + ".ts"
143139

144140
STREAMLINK_CMD.extend([save_ts_name, stream_url, "best"])
145141
MKVMERGE_CMD.append(save_mux_name)
@@ -198,15 +194,16 @@ def reset_handler(r=True):
198194
continue
199195
else:
200196
announce_shit(
201-
"Twitcast ID: "
202-
+ user
203-
+ " recorded, will be muxed and uploaded."
197+
"Twitcast ID: " + user + " recorded, will be muxed and uploaded."
204198
)
205199
vtlog.info("Executing mkvmerge command!")
206200
vtlog.debug(" ".join(MKVMERGE_CMD))
207201
sp.call(MKVMERGE_CMD)
208202

209-
if os.path.isfile(save_mux_name) and os.path.getsize(save_mux_name) > 0:
203+
if (
204+
os.path.isfile(save_mux_name)
205+
and os.path.getsize(save_mux_name) > 0
206+
):
210207
UPLOAD_CMD.extend(
211208
[
212209
save_mux_name,

scripts/vthell.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def find_and_parse_cookies() -> list:
6161
if not os.path.isfile(BASE_VTHELL_PATH + COOKIES_NAME):
6262
return []
6363
vtlog.info("Opening cookies file...")
64-
cookies_data = open(BASE_VTHELL_PATH + COOKIES_NAME, "r", encoding="utf-8").readlines()
64+
cookies_data = open(
65+
BASE_VTHELL_PATH + COOKIES_NAME, "r", encoding="utf-8"
66+
).readlines()
6567
vtlog.info("Parsing cookies file...")
6668
cookies_data = [c.rstrip() for c in cookies_data if not c.startswith("#")]
6769

scripts/vtrip_helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def secure_filename(fn: str):
4646
snippets = res["items"][0]["snippet"]
4747
if "liveStreamingDetails" in res["items"][0]:
4848
if "actualStartTime" in res["items"][0]["liveStreamingDetails"]:
49-
stream_start = res["items"][0]["liveStreamingDetails"]["actualStartTime"]
49+
stream_start = res["items"][0]["liveStreamingDetails"][
50+
"actualStartTime"
51+
]
5052
else:
5153
stream_start = res["items"][0]["liveStreamingDetails"][
5254
"scheduledStartTime"

0 commit comments

Comments
 (0)