keep site config in api
This commit is contained in:
parent
407e303e96
commit
ff715aaf65
1 changed files with 3 additions and 3 deletions
|
@ -156,7 +156,7 @@ class Client(object):
|
||||||
self.api = API(self._config['url'], media_cache=self.media_cache())
|
self.api = API(self._config['url'], media_cache=self.media_cache())
|
||||||
self.api.DEBUG = DEBUG
|
self.api.DEBUG = DEBUG
|
||||||
self.signin()
|
self.signin()
|
||||||
self.profile = "%sp.webm" % max(self.site['video']['resolutions'])
|
self.profile = "%sp.webm" % max(self.api.site['video']['resolutions'])
|
||||||
|
|
||||||
def signin(self):
|
def signin(self):
|
||||||
if 'username' in self._config:
|
if 'username' in self._config:
|
||||||
|
@ -169,7 +169,7 @@ class Client(object):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
r = self.api.init()
|
r = self.api.init()
|
||||||
if r['status']['code'] == 200:
|
if r['status']['code'] == 200:
|
||||||
self.site = r['data']['site']
|
self.api.site = r['data']['site']
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def set_encodes(self, site, files):
|
def set_encodes(self, site, files):
|
||||||
|
@ -354,7 +354,7 @@ class Client(object):
|
||||||
info = self.info(oshash)
|
info = self.info(oshash)
|
||||||
#print path.encode('utf-8')
|
#print path.encode('utf-8')
|
||||||
i = encode(path, self.media_cache(), self.profile, info,
|
i = encode(path, self.media_cache(), self.profile, info,
|
||||||
self.site['media'].get('importFrames'))
|
self.api.site['media'].get('importFrames'))
|
||||||
break
|
break
|
||||||
|
|
||||||
def sync(self, args):
|
def sync(self, args):
|
||||||
|
|
Loading…
Reference in a new issue