[BACKEND] Add playlist_uploader_sanitized var (#414)

This commit is contained in:
Jesse Bannon 2023-01-13 10:47:43 -08:00 committed by GitHub
parent 6020f27f12
commit 30c77565bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,