* add unit test that attempts to retrieve a song after its been uploaded * prevent parsing errors when an uploaded song lacks a duration * update unit test to delete/re-upload song if it already is uploaded * format * fix test * add another sleep to end2end playlist --------- Co-authored-by: sigma67 <ytmusicapi@gmail.com>
This commit is contained in:
parent
614999c77d
commit
ae966bb96a
4 changed files with 41 additions and 2 deletions
|
|
@ -61,7 +61,8 @@ def get_dot_separator_index(runs):
|
|||
|
||||
|
||||
def parse_duration(duration):
|
||||
if duration is None:
|
||||
# duration may be falsy or a single space: ' '
|
||||
if not duration or not duration.strip():
|
||||
return duration
|
||||
mapped_increments = zip([1, 60, 3600], reversed(duration.split(":")))
|
||||
seconds = sum(multiplier * int(time) for multiplier, time in mapped_increments)
|
||||
|
|
|
|||
Loading…
Reference in a new issue