Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca39081

Browse files
committed
[pan.baidu.com.py] Update params of transfer api, PeterDing#141
1 parent d07ee93 commit ca39081

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

pan.baidu.com.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,8 +1504,8 @@ def _share_transfer(self, surl, info):
15041504
j = {'errno': 'file has exist'}
15051505
return j
15061506

1507-
data = ('filelist=' \
1508-
+ urllib.quote_plus('["%s"]' % info['path'].encode('utf8')) \
1507+
data = ('fsidlist=' \
1508+
+ urllib.quote_plus('[%s]' % info['fs_id']) \
15091509
+ '&path=' \
15101510
+ urllib.quote_plus(info['remotepath'].encode('utf8'))
15111511
)
@@ -1582,15 +1582,17 @@ def _get_share_infos(self, url, remotepath, infos):
15821582
j = info['file_list']['list']
15831583
isdirs = [x['isdir'] for x in j]
15841584
paths = [x['path'] for x in j]
1585-
z = zip(isdirs, paths)
1585+
fs_ids = [x['fs_id'] for x in j]
1586+
z = zip(fs_ids, isdirs, paths)
15861587
if not infos:
15871588
infos = [
15881589
{
1589-
'isdir': x,
1590-
'path': y,
1590+
'fs_id': a,
1591+
'isdir': b,
1592+
'path': c,
15911593
'remotepath': remotepath \
15921594
if remotepath[-1] != '/' else remotepath[:-1]
1593-
} for x, y in z
1595+
} for a, b, c in z
15941596
]
15951597

15961598
return infos

0 commit comments

Comments
 (0)