The branch, gotham has been updated
via aecd0a1afe87b07013f339d5d577253fcb391311 (commit)
via 2e22c7480b092d99cfe0bae814c543b55c3d34e6 (commit)
via ac6038cf2482e4a63f29440048c10ad604ad7d42 (commit)
from cf428b30665c0aa11be84c2bc10bf003f37b3030 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=aecd0a1afe87b07013f339d5d577253fcb391311
commit aecd0a1afe87b07013f339d5d577253fcb391311
Author: Martijn Kaijser <[email protected]>
Date: Mon Apr 28 14:15:32 2014 +0200
[service.subtitles.pipocas] 0.0.2
diff --git a/service.subtitles.pipocas/addon.xml
b/service.subtitles.pipocas/addon.xml
index 6fa643a..edfeab8 100644
--- a/service.subtitles.pipocas/addon.xml
+++ b/service.subtitles.pipocas/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.pipocas"
name="Pipocas.tv"
- version="0.0.1"
+ version="0.0.2"
provider-name="HiGhLaNdeR">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.pipocas/changelog.txt
b/service.subtitles.pipocas/changelog.txt
index 3ff2a59..0aedbc3 100644
--- a/service.subtitles.pipocas/changelog.txt
+++ b/service.subtitles.pipocas/changelog.txt
@@ -1,2 +1,4 @@
+0.0.2
+- Changed description display and fixed rating score.
0.0.1
- Initial port to new Gotham structure.
\ No newline at end of file
diff --git a/service.subtitles.pipocas/service.py
b/service.subtitles.pipocas/service.py
index af37814..28b9331 100644
--- a/service.subtitles.pipocas/service.py
+++ b/service.subtitles.pipocas/service.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Service Pipocas.tv version 0.0.1
+# Service Pipocas.tv version 0.0.2
# Code based on Undertext (FRODO) service and the download function encode fix
from legendastv (FRODO) service
# Coded by HiGhLaNdR@OLDSCHOOL
# Ported to Gotham by HiGhLaNdR@OLDSCHOOL
@@ -158,9 +158,9 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
#for descmatch in re.finditer(desc_pattern, content_details,
re.IGNORECASE | re.DOTALL):
# desc = string.strip(descmatch.group(1))
# log( __name__ ,"%s DESC match: '%s' ..." % (debug_pretext,
decmatch.group(1)))
- downloads = int(hits) / 4
- if (downloads > 10):
- downloads=10
+ downloads = int(hits) / 150
+ if (downloads > 5):
+ downloads=5
filename = re.sub('\n',' ',filename)
desc = re.sub('\n',' ',desc)
#Remove HTML tags on the commentaries
@@ -201,8 +201,7 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
else:
if re.search(filesearch[1][:len(filesearch[1])-4],
desc):
sync = True
- #filename = filename + " " + "(" + movieyear + ")" + " " + hits +
"Hits" + " - " + desc
- filename = filename + " " + "- Enviado por: " + uploader + " -
Hits: " + hits
+ filename = filename + " " + "hits: " + hits + " uploader: " +
uploader + " "
#subtitles_list.append({'rating': str(downloads), 'no_files':
no_files, 'filename': filename, 'desc': desc, 'sync': sync, 'hits' : hits,
'id': id, 'language_flag': 'flags/' + languageshort + '.gif', 'language_name':
languagelong})
subtitles_list.append({'rating': str(downloads), 'filename':
filename, 'hits': hits, 'desc': desc, 'sync': sync, 'id': id, 'language_short':
languageshort, 'language_name': languagelong})
page = page + 1
@@ -232,7 +231,7 @@ def append_subtitle(item):
listitem = xbmcgui.ListItem(
label=item['language_name'],
- label2=item['filename']+ '-' +item['desc'],
+ label2=item['filename'],
iconImage=item['rating'],
thumbnailImage=item['language_short']
)
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=2e22c7480b092d99cfe0bae814c543b55c3d34e6
commit 2e22c7480b092d99cfe0bae814c543b55c3d34e6
Author: Martijn Kaijser <[email protected]>
Date: Mon Apr 28 14:14:16 2014 +0200
[service.subtitles.legendasdivx] 0.0.3
diff --git a/service.subtitles.legendasdivx/addon.xml
b/service.subtitles.legendasdivx/addon.xml
index 0f3dc27..1ab97b9 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.0.2"
+ version="0.0.3"
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 cb7f313..bb692db 100644
--- a/service.subtitles.legendasdivx/changelog.txt
+++ b/service.subtitles.legendasdivx/changelog.txt
@@ -1,3 +1,6 @@
+0.0.3
+- Added Release pattern for better Description display. Now you can choose
Full Description or Release only Description (Default) on addon settings!
+- Some fixes and changes on the code.
0.0.2
- Improved search code, we always depend on the site search...
- Manual search fully working.
diff --git
a/service.subtitles.legendasdivx/resources/language/English/strings.xml
b/service.subtitles.legendasdivx/resources/language/English/strings.xml
index ec1b6ec..57a7f62 100644
--- a/service.subtitles.legendasdivx/resources/language/English/strings.xml
+++ b/service.subtitles.legendasdivx/resources/language/English/strings.xml
@@ -8,4 +8,5 @@
<string id="32005">Portuguese Brazilian Enabled</string>
<string id="32006">Spanish Enabled</string>
<string id="32007">English Enabled</string>
+ <string id="32008">Full Description</string>
</strings>
diff --git
a/service.subtitles.legendasdivx/resources/language/Portuguese/strings.xml
b/service.subtitles.legendasdivx/resources/language/Portuguese/strings.xml
index d5d5883..d0de616 100644
--- a/service.subtitles.legendasdivx/resources/language/Portuguese/strings.xml
+++ b/service.subtitles.legendasdivx/resources/language/Portuguese/strings.xml
@@ -8,4 +8,5 @@
<string id="32005">Português Brasileiro Activo</string>
<string id="32006">Espanhol Activo</string>
<string id="32007">Inglês Activo</string>
+ <string id="32007">Descrição Completa</string>
</strings>
diff --git a/service.subtitles.legendasdivx/resources/settings.xml
b/service.subtitles.legendasdivx/resources/settings.xml
index 8bac68c..dbca84a 100644
--- a/service.subtitles.legendasdivx/resources/settings.xml
+++ b/service.subtitles.legendasdivx/resources/settings.xml
@@ -7,5 +7,6 @@
<setting id="PTBR" type="bool" label="32005" default="true"/>
<setting id="ES" type="bool" label="32006" default="true"/>
<setting id="EN" type="bool" label="32007" default="true"/>
+ <setting id="DESC" type="bool" label="32008" default="false"/>
</category>
</settings>
diff --git a/service.subtitles.legendasdivx/service.py
b/service.subtitles.legendasdivx/service.py
index 6646016..1b1a9be 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.0.1
+# Service LegendasDivx.com version 0.0.3
# Code based on Undertext (FRODO) service and the download function encode fix
from legendastv (FRODO) service
# Coded by HiGhLaNdR@OLDSCHOOL
# Ported to Gotham by HiGhLaNdR@OLDSCHOOL
@@ -103,6 +103,7 @@ 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>"
+release_pattern = "([^\W][\w{3,}\.|\-|\(\d\d\d\d)]{3,}\w{3,}[\-|\.]\w{2,})"
# group(1) = Name, group(2) = Year, group(3) = Number Files, group(4) = ID,
group(5) = Hits, group(6) = Requests, group(7) = Description
#==========
# Functions
@@ -163,18 +164,19 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
#log(u"_desc_dirty '%s' ..." % desc)
#Remove new lines on the commentaries
filename = re.sub('\n',' ',filename)
- desc = re.sub('<br />','',desc)
+ desc = re.sub('<br />',' ',desc)
desc = re.sub('\n',' ',desc)
desc = re.sub(':.','',desc)
#Remove HTML tags on the commentaries
filename = re.sub(r'<[^<]+?>','', filename)
desc = re.sub(r'<[^<]+?>|[~]','', desc)
- #desc = re.findall(r'(.*?)([\. _-].*?([^\s]+))', desc,
re.IGNORECASE | re.MULTILINE | re.UNICODE | re.VERBOSE | re.DOTALL)
- #log(u"_desc_halfdirty '%s' ..." % desc)
- #desc = re.findall(r'([^\s]+.*?\..*?[\. _-].*?[^\s]+)', desc,
re.IGNORECASE)
- #for descs in desc:
- # log(u"_desc '%s' ..." % descs)
-
+ DESC_ON = __addon__.getSetting( 'DESC' )
+ if DESC_ON == "false":
+ desc = re.findall(release_pattern, desc, re.IGNORECASE |
re.VERBOSE | re.DOTALL | re.UNICODE | re.MULTILINE)
+ desc = " / ".join(desc)
+ if desc == "":
+ desc = "No Description!"
+ #log(u"_desc '%s' ..." % desc)
#Find filename on the comentaries to show sync label using
filename or dirname (making it global for further usage)
global filesearch
filesearch = os.path.abspath(file_original_path)
@@ -212,7 +214,8 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
else:
if re.search(filesearch[1][:len(filesearch[1])-4],
desc):
sync = True
- filename = filename + " " + "(" + movieyear + ")" + " " + hits +
"Hits" + " - " + desc
+ filename = filename + " " + "(" + movieyear + ")" + " " + "hits:
" + hits + " - " + desc
+ #log(u"DN string = %s" % (downloads,))
subtitles_list.append({'rating': str(downloads), 'no_files':
no_files, 'filename': filename, 'desc': desc, 'sync': sync, 'hits' : hits,
'id': id, 'language_short': languageshort, 'language_name': languagelong})
page = page + 1
@@ -243,7 +246,7 @@ def append_subtitle(item):
listitem = xbmcgui.ListItem(
label=item['language_name'],
- label2=item['filename']+ '-' +item['desc'],
+ label2=item['filename'],
iconImage=item['rating'],
thumbnailImage=item['language_short']
)
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=ac6038cf2482e4a63f29440048c10ad604ad7d42
commit ac6038cf2482e4a63f29440048c10ad604ad7d42
Author: Martijn Kaijser <[email protected]>
Date: Mon Apr 28 14:12:56 2014 +0200
[service.subtitles.legendaszone] 0.0.3
diff --git a/script.subtitles.legendaszone/addon.xml
b/script.subtitles.legendaszone/addon.xml
index 82f4eb8..746c017 100644
--- a/script.subtitles.legendaszone/addon.xml
+++ b/script.subtitles.legendaszone/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.legendaszone"
name="Legendas-Zone.org"
- version="0.0.2"
+ version="0.0.3"
provider-name="HiGhLaNdeR">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
diff --git a/script.subtitles.legendaszone/changelog.txt
b/script.subtitles.legendaszone/changelog.txt
index 1e2b1f6..e9e06ec 100644
--- a/script.subtitles.legendaszone/changelog.txt
+++ b/script.subtitles.legendaszone/changelog.txt
@@ -1,3 +1,5 @@
+0.0.3
+- Changed description display and fixed rating score.
0.0.2
- Fix for multiple movies hit.
0.0.1
diff --git a/script.subtitles.legendaszone/service.py
b/script.subtitles.legendaszone/service.py
index 01828c2..4737368 100644
--- a/script.subtitles.legendaszone/service.py
+++ b/script.subtitles.legendaszone/service.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Service Legendas-Zone.org version 0.0.2
+# Service Legendas-Zone.org version 0.0.3
# Code based on Undertext (FRODO) service and the download function encode fix
from legendastv (FRODO) service
# Coded by HiGhLaNdR@OLDSCHOOL
# Ported to Gotham by HiGhLaNdR@OLDSCHOOL
@@ -48,7 +48,7 @@ debug_pretext = "LegendasZone"
MAIN_SUBDIVX_URL = "http://www.legendas-zone.org/"
SEARCH_PAGE_URL = MAIN_SUBDIVX_URL +
"modules.php?name=Downloads&file=jz&d_op=search_next&order=&form_cat=28&page=%(page)s&query=%(query)s"
-INTERNAL_LINK_URL =
"plugin://%(scriptid)s/?action=download&%(id)s&filename=%(filename)s"
+INTERNAL_LINK_URL =
"plugin://%(scriptid)s/?action=download&id=%(id)s&filename=%(filename)s"
SUB_EXTS = ['srt', 'sub', 'txt', 'aas', 'ssa', 'smi']
HTTP_USER_AGENT = "User-Agent=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;
rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
@@ -62,7 +62,7 @@ password = __addon__.getSetting( "LZpass" )
"""
"""
-subtitle_pattern =
"<b><a\shref=\"legendas.php\?modo=detalhes&(.+?)\".+?[\r\n\t]+?.+?[\r\n\t]+?.+?onmouseover=\"Tip\(\'<table><tr><td><b>(.+?)</b></td></tr></table>.+?<b>Hits:</b>\s(.+?)\s<br>.+?<b>CDs:</b>\s(.+?)<br>.+?Uploader:</b>\s(.+?)</td>"
+subtitle_pattern =
"<b><a\shref=\"legendas.php\?modo=detalhes&id=(.+?)\".+?[\r\n\t]+?.+?[\r\n\t]+?.+?onmouseover=\"Tip\(\'<table><tr><td><b>(.+?)</b></td></tr></table>.+?<b>Hits:</b>\s(.+?)\s<br>.+?<b>CDs:</b>\s(.+?)<br>.+?Uploader:</b>\s(.+?)</td>"
# group(1) = ID, group(2) = Name, group(3) = Hits, group(4) = Files, group(5)
= Uploader
multiple_results_pattern =
"<td\salign=\"left\".+?<b><a\shref=\"legendas.php\?imdb=(.+?)\"\stitle=\".+?\">"
# group(1) = IMDB
@@ -127,9 +127,9 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
while re.search(subtitle_pattern, content, re.IGNORECASE | re.DOTALL |
re.MULTILINE | re.UNICODE | re.VERBOSE) and page < 3:
for matches in re.finditer(subtitle_pattern, content,
re.IGNORECASE | re.DOTALL | re.MULTILINE | re.UNICODE | re.VERBOSE):
hits = matches.group(3)
- downloads = int(matches.group(3)) / 5
- if (downloads > 10):
- downloads=10
+ downloads = int(matches.group(3)) / 150
+ if (downloads > 5):
+ downloads=5
id = matches.group(1)
filename = string.strip(matches.group(2))
desc = string.strip(matches.group(2))
@@ -180,7 +180,8 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
else:
if re.search(filesearch[1][:len(filesearch[1])-4],
desc):
sync = True
- #filename = filename + " " + hits + "Hits" + " - " + desc + "
- uploader: " + uploader
+ filename = filename + " " + "hits: " + hits + " uploader: " +
uploader + " "
+ #log(u"DN string = %s" % (downloads,))
if languageshort == "br":
languageshort = "pb"
subtitles_list.append({'rating': str(downloads), 'no_files':
no_files, 'id': id, 'filename': filename, 'desc': desc, 'sync': sync, 'hits':
hits, 'language_short': languageshort, 'language_name': languagelong})
@@ -229,9 +230,9 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
for matches in re.finditer(subtitle_pattern, content1,
re.IGNORECASE | re.DOTALL | re.MULTILINE | re.UNICODE | re.VERBOSE):
#log( __name__ ,"%s PAGE? '%s'" % (debug_pretext,
page1))
hits = matches.group(3)
- downloads = int(matches.group(3)) / 5
- if (downloads > 10):
- downloads=10
+ downloads = int(matches.group(3)) / 150
+ if (downloads > 5):
+ downloads=5
id = matches.group(1)
filename = string.strip(matches.group(2))
desc = string.strip(matches.group(2))
@@ -283,7 +284,7 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, se
else:
if
re.search(filesearch[1][:len(filesearch[1])-4], desc):
sync = True
- filename = filename + " " + hits + "Hits" + " - "
+ desc + " - uploader: " + uploader
+ filename = filename + " " + "hits: " + hits + "
uploader: " + uploader + " "
if languageshort == "br":
languageshort = "pb"
subtitles_list.append({'rating': str(downloads),
'no_files': no_files, 'id': id, 'filename': filename, 'desc': desc, 'sync':
sync, 'hits' : hits, 'language_short': languageshort, 'language_name':
languagelong})
@@ -402,7 +403,7 @@ def append_subtitle(item):
listitem = xbmcgui.ListItem(
label=item['language_name'],
- label2=item['filename']+ '-' +item['desc'],
+ label2=item['filename'],
iconImage=item['rating'],
thumbnailImage=item['language_short']
)
@@ -547,20 +548,20 @@ def Download(id, filename):
subtitles_list = []
content = get_download(main_url+'fazendologin.php',
main_url+'downloadsub.php', id)
-
content = content.read()
+
if content is not None:
header = content[:4]
if header == 'Rar!':
- local_tmp_file = pjoin(__temp__, "ldivx.rar")
+ local_tmp_file = pjoin(__temp__, "lzone.rar")
packed = True
elif header == 'PK':
- local_tmp_file = pjoin(__temp__, "ldivx.zip")
+ local_tmp_file = pjoin(__temp__, "lzone.zip")
packed = True
else:
# never found/downloaded an unpacked subtitles file, but just to
be sure ...
# assume unpacked sub file is an '.srt'
- local_tmp_file = pjoin(__temp__, "ldivx.srt")
+ local_tmp_file = pjoin(__temp__, "lzone.srt")
subs_file = local_tmp_file
packed = False
log(u"Saving subtitles to '%s'" % (local_tmp_file,))
@@ -573,7 +574,7 @@ def Download(id, filename):
if packed:
files = os.listdir(__temp__)
init_filecount = len(files)
- log(u"legendasdivx: número de init_filecount %s" %
(init_filecount,)) #EGO
+ log(u"legendaszone: numero de init_filecount %s" %
(init_filecount,)) #EGO
filecount = init_filecount
max_mtime = 0
# Determine the newest file from __temp__
-----------------------------------------------------------------------
Summary of changes:
script.subtitles.legendaszone/addon.xml | 2 +-
script.subtitles.legendaszone/changelog.txt | 2 +
script.subtitles.legendaszone/service.py | 35 ++++++++++---------
service.subtitles.legendasdivx/addon.xml | 2 +-
service.subtitles.legendasdivx/changelog.txt | 3 ++
.../resources/language/English/strings.xml | 1 +
.../resources/language/Portuguese/strings.xml | 1 +
.../resources/settings.xml | 1 +
service.subtitles.legendasdivx/service.py | 23 +++++++------
service.subtitles.pipocas/addon.xml | 2 +-
service.subtitles.pipocas/changelog.txt | 2 +
service.subtitles.pipocas/service.py | 13 +++----
12 files changed, 50 insertions(+), 37 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons