From 17dbb03b95695a1c4308453e9efbcb951dda6fa2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 6 Nov 2014 10:54:07 +0100 Subject: [PATCH] upload subtitles first --- pandora_client/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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)