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