completed new cli
This commit is contained in:
parent
5156ae715b
commit
6cd54724d2
@ -1,7 +1,7 @@
|
||||
from urllib.parse import urlparse
|
||||
import re
|
||||
|
||||
from .base_classes import Section, FloatAttribute, IntAttribute, BoolAttribute, ListAttribute
|
||||
from .base_classes import Section, FloatAttribute, IntAttribute, BoolAttribute, ListAttribute, StringAttribute
|
||||
from ..regex import URL_PATTERN
|
||||
from ..exception.config import SettingValueError
|
||||
|
||||
@ -15,7 +15,7 @@ class ProxAttribute(ListAttribute):
|
||||
}
|
||||
|
||||
|
||||
class UrlListAttribute(ListAttribute):
|
||||
class UrlStringAttribute(StringAttribute):
|
||||
def validate(self, value: str):
|
||||
v = value.strip()
|
||||
url = re.match(URL_PATTERN, v)
|
||||
@ -64,7 +64,7 @@ class ConnectionSection(Section):
|
||||
)
|
||||
|
||||
# INVIDIOUS INSTANCES LIST
|
||||
self.INVIDIOUS_INSTANCE_LIST = UrlListAttribute(
|
||||
self.INVIDIOUS_INSTANCE = UrlListAttribute(
|
||||
name="invidious_instances",
|
||||
description="This is a List, where you can define the invidious instances,\n"
|
||||
"the youtube downloader should use.\n"
|
||||
|
@ -12,11 +12,11 @@ class MiscSection(Section):
|
||||
"Support the artist.",
|
||||
"Star Me: https://github.com/HeIIow2/music-downloader",
|
||||
"🏳️⚧️🏳️⚧️ Trans rights are human rights. 🏳️⚧️🏳️⚧️",
|
||||
"🏳️⚧️🏳️⚧️ Trans women are women, trans men are men. 🏳️⚧️🏳️⚧️",
|
||||
"🏴☠️🏴☠️ Unite under one flag, fuck borders. 🏴☠️🏴☠️",
|
||||
"🏳️⚧️🏳️⚧️ Trans women are women, trans men are men, and enbies are enbies. 🏳️⚧️🏳️⚧️",
|
||||
"🏴☠️🏴☠️ Unite under one flag, fck borders. 🏴☠️🏴☠️",
|
||||
"Join my Matrix Space: https://matrix.to/#/#music-kraken:matrix.org",
|
||||
"Gotta love the BPJM!! >:(",
|
||||
"🏳️⚧️🏳️⚧️ Protect trans youth. 🏳️⚧️🏳️⚧️"
|
||||
"Gotta love the BPJM ;-;",
|
||||
"🏳️⚧️🏳️⚧️ Protect trans youth. 🏳️⚧️🏳️⚧️",
|
||||
]
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user