The branch, gotham has been updated
       via  d556d02a4bbd112407e6e190208f505d1539ef60 (commit)
      from  d3110b0eef43e8ad8be8be157d39852807318f9d (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=d556d02a4bbd112407e6e190208f505d1539ef60

commit d556d02a4bbd112407e6e190208f505d1539ef60
Author: Martijn Kaijser <[email protected]>
Date:   Mon Jul 28 19:07:10 2014 +0200

    [service.subtitles.legendasdivx] 0.1.4

diff --git a/service.subtitles.legendasdivx/addon.xml 
b/service.subtitles.legendasdivx/addon.xml
index df86055..51f9f1b 100644
--- a/service.subtitles.legendasdivx/addon.xml
+++ b/service.subtitles.legendasdivx/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.legendasdivx"
        name="LegendasDivx.com"
-       version="0.1.3"
+       version="0.1.4"
        provider-name="HiGhLaNdeR">
   <requires>
     <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.legendasdivx/changelog.txt 
b/service.subtitles.legendasdivx/changelog.txt
index 314c6c8..b308582 100644
--- a/service.subtitles.legendasdivx/changelog.txt
+++ b/service.subtitles.legendasdivx/changelog.txt
@@ -1,3 +1,5 @@
+0.1.4
+- Bug on the regex prevents ID to be fetch properly, fixed with a workaround 
(string.split).
 0.1.3
 - Bug when the movie is in the movie library and was using filename instead.
 - Added year for better searching when the movie is in the library. (Example: 
Sin City)
diff --git a/service.subtitles.legendasdivx/service.py 
b/service.subtitles.legendasdivx/service.py
index 3ace217..418e244 100644
--- a/service.subtitles.legendasdivx/service.py
+++ b/service.subtitles.legendasdivx/service.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Service LegendasDivx.com version 0.1.3
+# Service LegendasDivx.com version 0.1.4
 # Code based on Undertext (FRODO) service
 # Coded by HiGhLaNdR@OLDSCHOOL
 # Ported to Gotham by HiGhLaNdR@OLDSCHOOL
@@ -25,6 +25,7 @@ import xbmcplugin
 import xbmcvfs
 import cookielib
 import urllib2
+import uuid
 
 __addon__ = xbmcaddon.Addon()
 __author__     = __addon__.getAddonInfo('author')
@@ -93,7 +94,7 @@ HTTP_USER_AGENT = "User-Agent=Mozilla/5.0 (Windows; U; 
Windows NT 6.1; en-US; rv
 Release: The.Dark.Knight.2008.720p.BluRay.DTS.x264-ESiR</td>
 """
 
-subtitle_pattern = 
"<div\sclass=\"sub_box\">[\r\n\t]{2}<div\sclass=\"sub_header\">[\r\n\t]{2}<b>(.+?)</b>\s\((\d\d\d\d)\)\s.+?[\r\n\t
 
]+?[\r\n\t]</div>[\r\n\t]{2}<table\sclass=\"sub_main\scolor1\"\scellspacing=\"0\">[\r\n\t]{2}<tr>[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<th>CDs:</th>[\r\n\t
 
]{2}<td>(.+?)</td>[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<a\shref=\"\?name=Downloads&d_op=ratedownload&lid=(.+?)\">[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<th\sclass=\"color2\">Hits:</th>[\r\n\t]{2}<td>(.+?)</td>[\r\n\t
 ]{2}.+?[\r\n\t]{2}<td>(.+?)</td>[\r\n\t ]{2}.+?[\r\n\t ]{2}.+?[\r\n\t 
]{2}.+?[\r\n\t ]{2}.+?.{2,5}[\r\n\t ]{2}.+?[\r\n\t 
]{2}<td\scolspan=\"5\"\sclass=\"td_desc\sbrd_up\">((\n|.)*)</td>"
+subtitle_pattern = 
"<div\sclass=\"sub_box\">[\r\n\t]{2}<div\sclass=\"sub_header\">[\r\n\t]{2}<b>(.+?)</b>\s\((\d\d\d\d)\)\s.+?[\r\n\t
 
]+?[\r\n\t]</div>[\r\n\t]{2}<table\sclass=\"sub_main\scolor1\"\scellspacing=\"0\">[\r\n\t]{2}<tr>[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<th>CDs:</th>[\r\n\t
 
]{2}<td>(.+?)</td>[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<a\shref=\"\?name=Downloads&d_op=ratedownload&lid=(.+?)\">[\r\n\t]{2}.+?<img\sborder.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}.+?[\r\n\t]{2}<th\sclass=\"color2\">Hits:</th>[\r\n\t]{2}<td>(.+?)</td>[\r\n\t
 ]{2}.+?[\r\n\t]{2}<td>(.+?)</td>[\r\n\t ]{2}.+?[\r\n\t ]{2}.+?[\r\n\t 
]{2}.+?[\r\n\t ]{2}.+?.{2,5}[\r\n\t ]{2}.+?[\r\n\t 
]{2}<td\scolspan=\"5\"\sclass=\"td_desc\sbrd_up\">((\n|.)*)</td>"
 release_pattern = "([^\W]\w{1,}[\.|\-]{1,1}[^\.|^\ 
][^\Ws][\w{1,}\.|\-|\(\d\d\d\d\)|\[\d\d\d\d\]]{3,}[^\Ws][\w{3,}\-|\.{1,1}]\w{2,})"
 release_pattern1 = "([^\W][\w\ ]{4,}[^\Ws][x264|xvid]{1,}-[\w]{1,})"
 #release_pattern = "([^\W][\w\ |\.|\-]{4,}[^\Ws][x264|xvid]{1,}-[\w]{1,})"
@@ -139,6 +140,8 @@ def getallsubs(searchstring, languageshort, languagelong, 
file_original_path, se
         for matches in re.finditer(subtitle_pattern, content, re.IGNORECASE | 
re.DOTALL | re.MULTILINE | re.UNICODE | re.VERBOSE):
             hits = matches.group(5)
             id = matches.group(4)
+            id = string.split(id, '"')
+            id = id[0]
             movieyear = matches.group(2)
             no_files = matches.group(3)
             downloads = int(matches.group(5)) / 200
@@ -408,10 +411,10 @@ def Download(id, filename):
     if content is not None:
         header = content[:4]
         if header == 'Rar!':
-            local_tmp_file = pjoin(__temp__, "ldivx.rar")
+            local_tmp_file = pjoin(__temp__, str(uuid.uuid4())+".rar")
             packed = True
         elif header == 'PK':
-            local_tmp_file = pjoin(__temp__, "ldivx.zip")
+            local_tmp_file = pjoin(__temp__, str(uuid.uuid4())+".zip")
             packed = True
         else:
             # never found/downloaded an unpacked subtitles file, but just to 
be sure ...

-----------------------------------------------------------------------

Summary of changes:
 service.subtitles.legendasdivx/addon.xml     |    2 +-
 service.subtitles.legendasdivx/changelog.txt |    2 ++
 service.subtitles.legendasdivx/service.py    |   11 +++++++----
 3 files changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to