Skip to content

Commit

Permalink
resolved #9
Browse files Browse the repository at this point in the history
  • Loading branch information
morsela committed Jan 12, 2015
1 parent 641caa3 commit e71d60f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.torec"
name="Torec"
version="1.0.3"
version="1.0.4"
provider-name="slmosl">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.0.4
- fixed TOO MANY DL issue, again

1.0.3
- many cleanups
- fixed case comparing issues with rating system (matanelgabsi)
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/TorecSubtitlesDownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self):

def _buildDefaultCookie(self, subID):
currentTime = datetime.datetime.now().strftime("%m/%d/%Y+%I:%M:%S+%p")
return self.DEFAULT_COOKIE % {"screen_width" : 1760,
return self.DEFAULT_COOKIE % {"screen_width" : 1440,
"subId" : subID,
"current_datetime" : currentTime}

Expand Down Expand Up @@ -112,15 +112,15 @@ def search_by_movie_name(self, movie_name):

def _requestSubtitle(self, subID, subURL):
params = {"sub_id" : subID,
"s" : 1760}
"s" : 1440}

return self.urlHandler.request("%s/ajax/sub/guest_time.asp" % self.BASE_URL, params,
ajax=True, referer=subURL, cookie=self._buildDefaultCookie(subID)).data

def getDownloadLink(self, subID, optionID, subURL, persist=True):
requestID = self._requestSubtitle(subID, subURL)

params = {"sub_id" : subID, "code": optionID, "sh" : "yes", "guest" : requestID, "timewaited" : "20"}
params = {"sub_id" : subID, "code": optionID, "sh" : "yes", "guest" : requestID, "timewaited" : "12"}
for i in xrange(16):
response = self.urlHandler.request("%s/ajax/sub/downloadun.asp" % self.BASE_URL, params, ajax=True)
if (len(response.data) != 0 or not persist):
Expand Down

0 comments on commit e71d60f

Please sign in to comment.