[facebook] Fix support for untitled videos (Fixes #3757)
This commit is contained in:
parent
b04c8f7358
commit
a020a0dc20
3 changed files with 28 additions and 3 deletions
|
@ -1571,3 +1571,13 @@ except AttributeError:
|
|||
if ret:
|
||||
raise subprocess.CalledProcessError(ret, p.args, output=output)
|
||||
return output
|
||||
|
||||
|
||||
def limit_length(s, length):
|
||||
""" Add ellipses to overly long strings """
|
||||
if s is None:
|
||||
return None
|
||||
ELLIPSES = '...'
|
||||
if len(s) > length:
|
||||
return s[:length - len(ELLIPSES)] + ELLIPSES
|
||||
return s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue