Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:binux/lixian.xunlei

  • Loading branch information...
commit bfecf8f5d260d055fe8d182fcb1a0621e8021420 2 parents 59e4a05 + 6a48830
Binux authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 handlers/files.py
View
10 handlers/files.py
@@ -27,14 +27,15 @@ def get(self):
class IDMExportHandler(BaseHandler):
def get(self, task_id):
+ vip_info = self.get_vip()
template = "<\r\n%s\r\ncookie: gdriveid=%s\r\n>\r\n"
- files = self.task_manager.get_file_list(task_id)
+ files = self.task_manager.get_file_list(task_id, vip_info)
if files is None:
raise HTTPError(500)
if files == []:
raise HTTPError(404)
- gdriveid = self.get_vip()["gdriveid"]
+ gdriveid = vip_info["gdriveid"]
self.set_header("Content-Type", "application/octet-stream")
for f in files:
self.write(template % (f.lixian_url, gdriveid))
@@ -42,13 +43,14 @@ def get(self, task_id):
class aria2cExportHandler(BaseHandler):
def get(self, task_id):
template = "%s\r\n out=%s\r\n header=Cookie: gdriveid=%s\r\n continue=true\r\n max-connection-per-server=5\r\n split=10\r\n parameterized-uri=true\r\n\r\n"
- files = self.task_manager.get_file_list(task_id)
+ vip_info = self.get_vip()
+ files = self.task_manager.get_file_list(task_id, vip_info)
if files is None:
raise HTTPError(500)
if files == []:
raise HTTPError(404)
- gdriveid = self.get_vip()["gdriveid"]
+ gdriveid = vip_info["gdriveid"]
self.set_header("Content-Type", "application/octet-stream")
for f in files:
self.write(template % (f.lixian_url.replace("gdl", "{gdl,dl.f,dl.g,dl.h,dl.i,dl.twin}"), f.dirtitle, gdriveid))
Please sign in to comment.
Something went wrong with that request. Please try again.