Small improvement in truncate_titles
Strip truncated text before adding ellipsis.
This commit is contained in:
parent
b71bfb0674
commit
32c372bb9b
2
main.py
2
main.py
@ -20,7 +20,7 @@ def _truncate_title(title: str, length: int = 30) -> str:
|
|||||||
return title[:length]
|
return title[:length]
|
||||||
if len(title) <= length:
|
if len(title) <= length:
|
||||||
return title
|
return title
|
||||||
return title[:length-3] + (title[length:] and '...')
|
return title[:length-3].strip() + (title[length:] and '...')
|
||||||
|
|
||||||
|
|
||||||
def get_yt_creds():
|
def get_yt_creds():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user