Small improvement in truncate_titles

Strip truncated text before adding ellipsis.
This commit is contained in:
snegov committed 2024-02-02 21:13:53 -08:00
1 parent b71bfb0674
commit 32c372bb9b
1 file changed
+1 -1
+1 -1
View File
@@ -20,7 +20,7 @@ def _truncate_title(title: str, length: int = 30) -> str:
return title[:length]
if len(title) <= length:
return title
return title[:length-3] + (title[length:] and '...')
return title[:length-3].strip() + (title[length:] and '...')
def get_yt_creds():