[FEATURE] creator_sanitized source variable (#574)
This commit is contained in:
parent
fa6eae7423
commit
e1f2e37858
2 changed files with 11 additions and 0 deletions
|
|
@ -361,6 +361,16 @@ class EntryVariables(BaseEntryVariables):
|
||||||
"""
|
"""
|
||||||
return self.kwargs_get(CREATOR, self.channel)
|
return self.kwargs_get(CREATOR, self.channel)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def creator_sanitized(self: Self) -> str:
|
||||||
|
"""
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
str
|
||||||
|
The creator name, sanitized
|
||||||
|
"""
|
||||||
|
return sanitize_filename(self.creator)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def channel(self: Self) -> str:
|
def channel(self: Self) -> str:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ def mock_entry_to_dict(
|
||||||
"ext": ext,
|
"ext": ext,
|
||||||
"description": "",
|
"description": "",
|
||||||
"creator": "abc123",
|
"creator": "abc123",
|
||||||
|
"creator_sanitized": "abc123",
|
||||||
"channel": "abc123",
|
"channel": "abc123",
|
||||||
"channel_sanitized": "abc123",
|
"channel_sanitized": "abc123",
|
||||||
"extractor": extractor,
|
"extractor": extractor,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue