diff --git a/templates/lixian.html b/templates/lixian.html
index cca60d3..58aaaa4 100644
--- a/templates/lixian.html
+++ b/templates/lixian.html
@@ -84,7 +84,7 @@
{{ file.title }}
{% end %}
{{ format_size(file.size) }}
-
+
{% end %}
@@ -125,7 +125,6 @@
$(".file-item").hover(function() {
function url_fix(url, filename) {
- console.log(url, filename);
var tid = url.match(/&tid=([^&]+)/)[1];
var fid = url.match(/fid=([^&]+)/)[1];
if (fid && tid)
@@ -135,7 +134,8 @@
var _this = $(this);
var t = _this.find("a.file-title");
if (t) {
- _this.find(".file-2lixian a").attr("href", "http://lixian.vip.xunlei.com/lixian_login.html?furl="+encodeURIComponent(url_fix(t.attr("href"), t.text())));
+ if (!_this.find(".file-2lixian a").attr("href"))
+ _this.find(".file-2lixian a").attr("href", "http://lixian.vip.xunlei.com/lixian_login.html?furl="+encodeURIComponent(url_fix(t.attr("href"), t.text())));
_this.find(".file-2lixian").show()
}
}, function() {
diff --git a/templates/share.html b/templates/share.html
index ee4765d..8ffa8ef 100644
--- a/templates/share.html
+++ b/templates/share.html
@@ -96,7 +96,7 @@
{{ len(file.title) > 15 and file.title[:-15] or file.title }}{{ len(file.title) > 15 and file.title[-15:] or "" }}
{% end %}
{{ format_size(file.size) }}
-
+
{% end %}
@@ -152,7 +152,6 @@
$(".file-item").hover(function() {
function url_fix(url, filename) {
- console.log(url, filename);
var tid = url.match(/&tid=([^&]+)/)[1];
var fid = url.match(/fid=([^&]+)/)[1];
if (fid && tid)
@@ -162,7 +161,8 @@
var _this = $(this);
var t = _this.find("a.file-title");
if (t) {
- _this.find(".add2lixian a").attr("href", "http://lixian.vip.xunlei.com/lixian_login.html?furl="+encodeURIComponent(url_fix(t.attr("href"), t.text())));
+ if(!_this.find(".file-2lixian a").attr("href"))
+ _this.find(".add2lixian a").attr("href", "http://lixian.vip.xunlei.com/lixian_login.html?furl="+encodeURIComponent(url_fix(t.attr("href"), t.text())));
_this.find(".add2lixian").show()
}
}, function() {
diff --git a/upload_local_file.py b/upload_local_file.py
index 63be7e7..1dc9048 100644
--- a/upload_local_file.py
+++ b/upload_local_file.py
@@ -26,7 +26,7 @@
gcid = tools.gcid_hash_file(argv[3])
size = os.path.getsize(argv[3])
fid = tools.gen_fid(cid, size, gcid)
-fake_url = "http://sendfile.vip.xunlei.com/filename?fid=%s&mid=666&threshold=150&tid=%s" % (fid, tid_dic.get(size, 0))
+fake_url = "http://dl1.c11.sendfile.vip.xunlei.com/download?fid=%s&mid=666&threshold=150&tid=%s" % (fid, tid_dic.get(size, 0))
print "cid: %s" % cid
print "gcid: %s" % gcid
print "size: %s" % size
@@ -47,6 +47,7 @@
exit()
else:
print "yes!"
+ fake_url = fake_url.replace("dl1.c11", "dl1.%s" % ret['msg']['section'].split("|")[0])
print "adding task to lixian..."
lx.task_check(fake_url)
lx.add_task_with_dict(fake_url, {