diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 4ccff31..4456a23 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -1048,6 +1048,10 @@ class API(ox.API): time.sleep(5) if data and data.get('result') == 1: done += len(chunk) + if data.get('offset') not in (None, done): + print 'server offset out of sync, continue from', data['offset'] + done = data['offset'] + f.seek(done) with open(self._resume_file, 'w') as r: json.dump({ 'uploadUrl': uploadUrl,