Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix..

  • Loading branch information...
commit 00cc7ae26b05b91332f6f070d0a781ca0e568ead 1 parent fbdc4c4
Binux authored
View
6 templates/lixian.html
@@ -84,7 +84,7 @@
<div class="file-title">{{ file.title }}</div>
{% end %}
<div class="file-size">{{ format_size(file.size) }}</div>
- <div class="file-2lixian task-button" style="display:none;"><a href="#" onclick="window.open(this.href); return false;"> 添加到我的离线 </a></div>
+ <div class="file-2lixian task-button" style="display:none;"><a onclick="window.open(this.href); return false;"> 添加到我的离线 </a></div>
<div class="clearfix"></div>
</li>
{% 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() {
View
6 templates/share.html
@@ -96,7 +96,7 @@
<div class="tname"><span class="p1">{{ len(file.title) > 15 and file.title[:-15] or file.title }}</span><span class="p2">{{ len(file.title) > 15 and file.title[-15:] or "" }}</span></div>
{% end %}
<div class="info"><span class="file-size">{{ format_size(file.size) }}</span></div>
- <div class="add2lixian task-button" style="display:none;"><a href="#" onclick="window.open(this.href); return false;"> 添加到我的离线 </a></div>
+ <div class="add2lixian task-button" style="display:none;"><a onclick="window.open(this.href); return false;"> 添加到我的离线 </a></div>
<div class="clearfix"></div>
</li>
{% 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() {
View
3  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, {
Please sign in to comment.
Something went wrong with that request. Please try again.