use renamed *Media api

This commit is contained in:
j 2013-03-25 18:28:30 +05:30
parent 0d011e428c
commit ba7b068305

View file

@ -497,14 +497,14 @@ class Client(object):
for arg in args: for arg in args:
if os.path.exists(arg): if os.path.exists(arg):
oshash = ox.oshash(arg) oshash = ox.oshash(arg)
r = self.api.findFiles({'query': { r = self.api.findMedia({'query': {
'conditions': [{'key': 'oshash', 'value': oshash}] 'conditions': [{'key': 'oshash', 'value': oshash}]
}})['data']['items'] }})['data']['items']
if r == 0: if r == 0:
self.scan_file(arg) self.scan_file(arg)
info = self.info(oshash) info = self.info(oshash)
filename = os.path.basename(arg) filename = os.path.basename(arg)
r = self.api.addFile({ r = self.api.addMedia({
'id': oshash, 'id': oshash,
'info': info, 'info': info,
'filename': filename 'filename': filename