diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 3f2ee47..cfc94a6 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -669,6 +669,14 @@ class Client(object): data = r['data']['data'] files = r['data']['file'] + if files: + print 'uploading %s files' % len(files) + for oshash in files: + for path in self.path(oshash): + if os.path.exists(path): + self.api.uploadData(path, oshash) + break + if data: print 'encoding and uploading %s videos' % len(data) for oshash in data: @@ -697,14 +705,6 @@ class Client(object): }) break - if files: - print 'uploading %s files' % len(files) - for oshash in files: - for path in self.path(oshash): - if os.path.exists(path): - self.api.uploadData(path, oshash) - break - def update_info(self, info, prefix=None): if info: print 'sending info for %d files' % len(info)