[BACKEND] Add playlist_uploader_sanitized var

This commit is contained in:
Jesse Bannon 2023-01-13 10:39:51 -08:00
parent c95c0f6aa4
commit a2411578d4
2 changed files with 11 additions and 0 deletions

View file

@ -300,6 +300,16 @@ class EntryVariables(BaseEntryVariables):
"""
return self.kwargs_get(PLAYLIST_UPLOADER, self.uploader)
@property
def playlist_uploader_sanitized(self: Self) -> str:
"""
Returns
-------
str
The playlist uploader, sanitized.
"""
return sanitize_filename(self.playlist_uploader)
@property
def playlist_uploader_url(self: Self) -> str:
"""

View file

@ -116,6 +116,7 @@ def mock_entry_to_dict(
"playlist_webpage_url": "https://yourname.here",
"playlist_uid": "abc123",
"playlist_uploader": "abc123",
"playlist_uploader_sanitized": "abc123",
"playlist_uploader_id": "abc123",
"playlist_uploader_url": "https://yourname.here",
"source_count": 1,