completed new cli

This commit is contained in:
Hellow 2023-06-12 22:54:04 +02:00
parent 5156ae715b
commit 6cd54724d2
2 changed files with 7 additions and 7 deletions

View File

@ -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"

View File

@ -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. 🏳️‍⚧️🏳️‍⚧️",
]
)