From 06428673c8b3d101ae057a8ed4d94414247e5ffd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 29 Jan 2013 08:47:50 +0530 Subject: [PATCH] first videos, subtitles later --- pandora_client/__init__.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index cd68a2a..cc33e7d 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -505,14 +505,6 @@ class Client(object): print 'uploading info for %d files' % len(post['info']) r = self.api.update(post) - 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: @@ -540,6 +532,15 @@ class Client(object): 'rightsLevel': self._config['rightsLevel'] }) 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 files(self, prefix): conn, c = self._conn()