This prevents a possible KeyError or a int-parsing error when an uploaded song has a duration that is not a valid value like "3:31".
Per-recent changes by Google, an uploaded song can have a duration of ' ' or simply not have a fixedColumns object at all. This is most commonly seen immediately after uploading a song but can be seen in other cases as well.
I added a unit test that exercises this. It uploads a song and then starts calling get_library_upload_songs() in a loop, waiting for the song to be available. Without my duration fix, this encounters a parsing error. With the fix, it succeeds.
Fixes #578
This prevents a possible KeyError or a int-parsing error when an uploaded song has a duration that is not a valid value like "3:31".
Per-recent changes by Google, an uploaded song can have a duration of
' '
or simply not have afixedColumns
object at all. This is most commonly seen immediately after uploading a song but can be seen in other cases as well.I added a unit test that exercises this. It uploads a song and then starts calling
get_library_upload_songs()
in a loop, waiting for the song to be available. Without my duration fix, this encounters a parsing error. With the fix, it succeeds.