Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 15, 2024
1 parent fac0c76 commit df47c76
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 56 deletions.
1 change: 1 addition & 0 deletions src/iSponsorBlockTV/dial_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Send out an M-SEARCH request and listening for responses."""

import asyncio
import socket

Expand Down
22 changes: 8 additions & 14 deletions src/iSponsorBlockTV/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ def __init__(self, data_dir):
def validate(self):
if hasattr(self, "atvs"):
print(
(
"The atvs config option is deprecated and has stopped working."
" Please read this for more information "
"on how to upgrade to V2:"
" \nhttps://github.com/dmunozv04/iSponsorBlockTV/wiki/Migrate-from-V1-to-V2"
),
"The atvs config option is deprecated and has stopped working."
" Please read this for more information "
"on how to upgrade to V2:"
" \nhttps://github.com/dmunozv04/iSponsorBlockTV/wiki/Migrate-from-V1-to-V2",
)
print("Exiting in 10 seconds...")
time.sleep(10)
Expand Down Expand Up @@ -91,14 +89,10 @@ def __load(self):
"https://github.com/dmunozv04/iSponsorBlockTV/wiki/Installation#Docker"
)
print(
(
"This image has recently been updated to v2, and requires"
" changes."
),
(
"Please read this for more information on how to upgrade"
" to V2:"
),
"This image has recently been updated to v2, and requires"
" changes.",
"Please read this for more information on how to upgrade"
" to V2:",
"https://github.com/dmunozv04/iSponsorBlockTV/wiki/Migrate-from-V1-to-V2",
)
print("Exiting in 10 seconds...")
Expand Down
68 changes: 26 additions & 42 deletions src/iSponsorBlockTV/setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,9 @@ class MigrationScreen(ModalWithClickExit):
def compose(self) -> ComposeResult:
yield Grid(
Label(
(
"Welcome to the new configurator! You seem to have the legacy"
" 'atvs' entry on your config file, do you want to remove it?\n(The"
" app won't start with it present)"
),
"Welcome to the new configurator! You seem to have the legacy"
" 'atvs' entry on your config file, do you want to remove it?\n(The"
" app won't start with it present)",
id="question",
classes="button-100",
),
Expand Down Expand Up @@ -281,13 +279,11 @@ def compose(self) -> ComposeResult:
yield Label(id="add-device-info")
with Container(id="add-device-dial-container"):
yield Label(
(
"Make sure your device is on the same network as this"
" computer\nIf it isn't showing up, try restarting the"
" app.\nIf running in docker, make sure to use"
" `--network=host`\nTo refresh the list, close and open the"
" dialog again"
),
"Make sure your device is on the same network as this"
" computer\nIf it isn't showing up, try restarting the"
" app.\nIf running in docker, make sure to use"
" `--network=host`\nTo refresh the list, close and open the"
" dialog again",
classes="subtitle",
)
yield SelectionList(
Expand Down Expand Up @@ -396,10 +392,8 @@ def compose(self) -> ComposeResult:
with Container(id="add-channel-container"):
yield Label("Add Channel", classes="title")
yield Label(
(
"Select a method to add a channel. Adding via search only works if"
" a YouTube api key has been set"
),
"Select a method to add a channel. Adding via search only works if"
" a YouTube api key has been set",
id="add-channel-label",
classes="subtitle",
)
Expand Down Expand Up @@ -441,10 +435,8 @@ def compose(self) -> ComposeResult:
)
else:
yield Label(
(
"[#ff0000]No api key set, cannot search for channels."
" You can add it the config section below"
),
"[#ff0000]No api key set, cannot search for channels."
" You can add it the config section below",
id="add-channel-search-no-key",
classes="subtitle",
)
Expand Down Expand Up @@ -725,14 +717,12 @@ def __init__(self, config, **kwargs) -> None:
def compose(self) -> ComposeResult:
yield Label("Skip count tracking", classes="title")
yield Label(
(
"This feature tracks which segments you have skipped to let users know"
" how much their submission has helped others and used as a metric"
" along with upvotes to ensure that spam doesn't get into the database."
" The program sends a message to the sponsor block server each time you"
" skip a segment. Hopefully most people don't change this setting so"
" that the view numbers are accurate. :)"
),
"This feature tracks which segments you have skipped to let users know"
" how much their submission has helped others and used as a metric"
" along with upvotes to ensure that spam doesn't get into the database."
" The program sends a message to the sponsor block server each time you"
" skip a segment. Hopefully most people don't change this setting so"
" that the view numbers are accurate. :)",
classes="subtitle",
id="skip-count-tracking-subtitle",
)
Expand All @@ -757,11 +747,9 @@ def __init__(self, config, **kwargs) -> None:
def compose(self) -> ComposeResult:
yield Label("Skip/Mute ads", classes="title")
yield Label(
(
"This feature allows you to automatically mute and/or skip native"
" YouTube ads. Skipping ads only works if that ad shows the 'Skip Ad'"
" button, if it doesn't then it will only be able to be muted."
),
"This feature allows you to automatically mute and/or skip native"
" YouTube ads. Skipping ads only works if that ad shows the 'Skip Ad'"
" button, if it doesn't then it will only be able to be muted.",
classes="subtitle",
id="skip-count-tracking-subtitle",
)
Expand Down Expand Up @@ -796,19 +784,15 @@ def __init__(self, config, **kwargs) -> None:
def compose(self) -> ComposeResult:
yield Label("Channel Whitelist", classes="title")
yield Label(
(
"This feature allows to whitelist channels from being skipped. This"
" feature is automatically disabled when no channels have been"
" specified."
),
"This feature allows to whitelist channels from being skipped. This"
" feature is automatically disabled when no channels have been"
" specified.",
classes="subtitle",
id="channel-whitelist-subtitle",
)
yield Label(
(
":warning: [#FF0000]You need to set your YouTube Api Key in order to"
" use this feature"
),
":warning: [#FF0000]You need to set your YouTube Api Key in order to"
" use this feature",
id="warning-no-key",
)
with Horizontal(id="add-channel-button-container"):
Expand Down

0 comments on commit df47c76

Please sign in to comment.