The branch, gotham has been updated
via 02338e7fd8e9d1fc107e046546eac02a74b34bba (commit)
via fd519670e8315b5d0f38cf70af2bc8b65aceed3a (commit)
via 09f39263da1180016b2a534eb128f2973b2ad537 (commit)
from ae12e6e6e1a6aae9476d8a9a6a663dfa3b0587e4 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=02338e7fd8e9d1fc107e046546eac02a74b34bba
commit 02338e7fd8e9d1fc107e046546eac02a74b34bba
Author: sphere <[email protected]>
Date: Thu May 8 09:44:24 2014 +0200
[service.subtitles.subscenter] updated to version 3.1.7
diff --git a/service.subtitles.subscenter/addon.xml
b/service.subtitles.subscenter/addon.xml
index b67c932..dfc1ad9 100644
--- a/service.subtitles.subscenter/addon.xml
+++ b/service.subtitles.subscenter/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.subscenter"
name="Subscenter.org"
- version="3.1.6"
+ version="3.1.7"
provider-name="CaTz">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.subscenter/changelog.txt
b/service.subtitles.subscenter/changelog.txt
index 7bc5567..2af7c08 100644
--- a/service.subtitles.subscenter/changelog.txt
+++ b/service.subtitles.subscenter/changelog.txt
@@ -1,3 +1,7 @@
+3.1.7 - by CaTz 07/05/2014
+- Bug fix, url decode the manual search string
+- Added feature, parse RLS names of the shows and movies
+
3.1.6 - by sagiben 01/04/2014
- Fix crash due to a division of a str, adding casting to float
diff --git a/service.subtitles.subscenter/resources/lib/SUBUtilities.py
b/service.subtitles.subscenter/resources/lib/SUBUtilities.py
index 32fcd2e..69c0fc9 100644
--- a/service.subtitles.subscenter/resources/lib/SUBUtilities.py
+++ b/service.subtitles.subscenter/resources/lib/SUBUtilities.py
@@ -40,6 +40,21 @@ def normalizeString(str):
'NFKD', unicode(unicode(str, 'utf-8'))
).encode('ascii', 'ignore')
+def parse_tv_rls(rls):
+ groups =
re.findall(r"(.*)(?:s|season)(?:\d{2})(?:e|x|episode|\n)(?:\d{2})", rls, re.I)
+ if len(groups) > 0:
+ rls = groups[0].strip()
+
+ log(__scriptname__, "%s %s" % ("TV_RLS: ", rls))
+ return rls
+
+def parse_movie_rls(rls):
+ groups = re.findall(r"(.*)(?:\d{4})?", rls, re.I)
+ if len(groups) > 0:
+ rls = groups[0].strip()
+
+ log(__scriptname__, "%s %s" % ("MOVIE_RLS: ", rls))
+ return rls
def clear_cache():
cache.delete("tv-show%")
@@ -103,11 +118,15 @@ class SubscenterHelper:
filtered = []
search_string = search_string.lower()
h = HTMLParser.HTMLParser()
+
+ log(__scriptname__, "urls: %s" % urls)
+
for i, (content_type, slug, eng_name, year) in enumerate(urls):
- eng_name = h.unescape(eng_name)
+ eng_name = h.unescape(eng_name).replace(' ...', '').lower()
+
if ((content_type == "movie" and not item["tvshow"]) or
(content_type == "series" and item["tvshow"])) and \
- search_string.startswith(eng_name.replace(' ...',
'').lower()) and \
+ (search_string.startswith(eng_name) or
eng_name.startswith(search_string)) and \
(item["year"] == '' or
year == '' or
(int(year) - 1) <= int(item["year"]) <=
(int(year) + 1) or
@@ -142,7 +161,7 @@ class SubscenterHelper:
'link': current["key"],
'language_name':
xbmc.convertLanguage(language, xbmc.ENGLISH_NAME),
'language_flag': language,
- 'ID': current["id"],
+ 'id': current["id"],
'rating': str(current["downloaded"]),
'sync': subtitle_rate >= 4,
'hearing_imp':
current["hearing_impaired"] > 0
diff --git a/service.subtitles.subscenter/service.py
b/service.subtitles.subscenter/service.py
index b425b71..83d77ea 100644
--- a/service.subtitles.subscenter/service.py
+++ b/service.subtitles.subscenter/service.py
@@ -24,7 +24,7 @@ __temp__ = xbmc.translatePath(os.path.join(__profile__,
'temp')).decode("utf-8")
sys.path.append(__resource__)
-from SUBUtilities import SubscenterHelper, log, normalizeString, clear_cache
+from SUBUtilities import SubscenterHelper, log, normalizeString, clear_cache,
parse_tv_rls, parse_movie_rls
@@ -48,8 +48,8 @@ def search(item):
else:
listitem.setProperty("hearing_imp", "false")
- url =
"plugin://%s/?action=download&link=%s&ID=%s&filename=%s&language=%s" % (
- __scriptid__, it["link"], it["ID"], it["filename"],
it["language_flag"])
+ url =
"plugin://%s/?action=download&link=%s&id=%s&filename=%s&language=%s" % (
+ __scriptid__, it["link"], it["id"], it["filename"],
it["language_flag"])
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url,
listitem=listitem, isFolder=False)
@@ -96,6 +96,10 @@ params = get_params()
if params['action'] in ['search', 'manualsearch']:
log(__scriptname__, "action '%s' called" % (params['action']))
+
+ if params['action'] == 'manualsearch':
+ params['searchstring'] = urllib.unquote(params['searchstring'])
+
item = {}
item['temp'] = False
item['rar'] = False
@@ -122,14 +126,20 @@ if params['action'] in ['search', 'manualsearch']:
item['season'] = "0"
item['episode'] = item['episode'][-1:]
- if ( item['file_original_path'].find("http") > -1 ):
+ if item['file_original_path'].find("http") > -1:
item['temp'] = True
+ # Parse release name
+ if item['tvshow']:
+ item['tvshow'] = parse_tv_rls(item['tvshow'])
+ else:
+ item['title'] = parse_movie_rls(item['title'])
+
- elif ( item['file_original_path'].find("rar://") > -1 ):
+ elif item['file_original_path'].find("rar://") > -1:
item['rar'] = True
item['file_original_path'] =
os.path.dirname(item['file_original_path'][6:])
- elif ( item['file_original_path'].find("stack://") > -1 ):
+ elif item['file_original_path'].find("stack://") > -1:
stackPath = item['file_original_path'].split(" , ")
item['file_original_path'] = stackPath[0][8:]
log(__scriptname__, "%s" % item)
@@ -138,7 +148,7 @@ if params['action'] in ['search', 'manualsearch']:
elif params['action'] == 'download':
## we pickup all our arguments sent from def search()
- subs = download(params["ID"], params["language"], params["link"],
params["filename"])
+ subs = download(params["id"], params["language"], params["link"],
params["filename"])
## we can return more than one subtitle for multi CD versions, for now we
are still working out how to handle that in XBMC core
for sub in subs:
listitem = xbmcgui.ListItem(label=sub)
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=fd519670e8315b5d0f38cf70af2bc8b65aceed3a
commit fd519670e8315b5d0f38cf70af2bc8b65aceed3a
Author: sphere <[email protected]>
Date: Thu May 8 09:43:54 2014 +0200
[service.subtitles.subtitle] updated to version 4.1.7
diff --git a/service.subtitles.subtitle/addon.xml
b/service.subtitles.subtitle/addon.xml
index 4db8a97..cd017d8 100644
--- a/service.subtitles.subtitle/addon.xml
+++ b/service.subtitles.subtitle/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.subtitle"
name="Subtitle.co.il"
- version="4.1.6"
+ version="4.1.7"
provider-name="CaTz">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.subtitle/changelog.txt
b/service.subtitles.subtitle/changelog.txt
index 5148d7e..f8daeb7 100644
--- a/service.subtitles.subtitle/changelog.txt
+++ b/service.subtitles.subtitle/changelog.txt
@@ -1,3 +1,7 @@
+4.1.7 - by CaTz 07/05/2014
+- Bug fix, url decode the manual search string
+- Added feature, parse RLS names of the tv shows and movies
+
4.1.6 - By CaTz 28/03/2014
- Bug fix, refresh cookie on ajax call
diff --git a/service.subtitles.subtitle/resources/lib/SUBUtilities.py
b/service.subtitles.subtitle/resources/lib/SUBUtilities.py
index 76cb129..cb2d708 100644
--- a/service.subtitles.subtitle/resources/lib/SUBUtilities.py
+++ b/service.subtitles.subtitle/resources/lib/SUBUtilities.py
@@ -40,6 +40,21 @@ def normalizeString(str):
'NFKD', unicode(unicode(str, 'utf-8'))
).encode('ascii', 'ignore')
+def parse_tv_rls(rls):
+ groups =
re.findall(r"(.*)(?:s|season)(?:\d{2})(?:e|x|episode|\n)(?:\d{2})", rls, re.I)
+ if len(groups) > 0:
+ rls = groups[0].strip()
+
+ log(__scriptname__, "%s %s" % ("TV_RLS: ", rls))
+ return rls
+
+def parse_movie_rls(rls):
+ groups = re.findall(r"(.*)(?:\d{4})?", rls, re.I)
+ if len(groups) > 0:
+ rls = groups[0].strip()
+
+ log(__scriptname__, "%s %s" % ("MOVIE_RLS: ", rls))
+ return rls
def log(module, msg):
xbmc.log((u"### [%s] - %s" % (module, msg,)).encode('utf-8'),
level=xbmc.LOGDEBUG)
@@ -138,10 +153,12 @@ class SubtitleHelper:
h = HTMLParser.HTMLParser()
+ log(__scriptname__, "urls: %s" % urls)
+
if not item["tvshow"]:
for (id, eng_name, year) in urls:
- eng_name = h.unescape(eng_name)
- if search_string.startswith(eng_name.lower()) and \
+ eng_name = h.unescape(eng_name).replace(' ...', '').lower()
+ if (search_string.startswith(eng_name) or
eng_name.startswith(search_string)) and \
(item["year"] == '' or
year == '' or
(int(year) - 1) <= int(item["year"]) <=
(int(year) + 1) or
@@ -266,7 +283,7 @@ class SubtitleHelper:
xbmc.ENGLISH_NAME),
'language_flag':
xbmc.convertLanguage(heb_to_eng(language),
xbmc.ISO_639_1),
- 'ID': subtitle_id,
+ 'id': subtitle_id,
'rating': int(downloads.replace(",", "")),
'sync': subtitle_rate >= 4,
'hearing_imp': 0
diff --git a/service.subtitles.subtitle/service.py
b/service.subtitles.subtitle/service.py
index 6e707b1..5a4abbc 100644
--- a/service.subtitles.subtitle/service.py
+++ b/service.subtitles.subtitle/service.py
@@ -24,7 +24,7 @@ __temp__ = xbmc.translatePath(os.path.join(__profile__,
'temp')).decode("utf-8")
sys.path.append(__resource__)
-from SUBUtilities import SubtitleHelper, log, normalizeString, clear_cache
+from SUBUtilities import SubtitleHelper, log, normalizeString, clear_cache,
parse_tv_rls, parse_movie_rls
def search(item):
@@ -47,8 +47,8 @@ def search(item):
else:
listitem.setProperty("hearing_imp", "false")
- url =
"plugin://%s/?action=download&link=%s&ID=%s&filename=%s&language=%s" % (
- __scriptid__, it["link"], it["ID"], it["filename"],
it["language_flag"])
+ url =
"plugin://%s/?action=download&link=%s&id=%s&filename=%s&language=%s" % (
+ __scriptid__, it["link"], it["id"], it["filename"],
it["language_flag"])
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url,
listitem=listitem, isFolder=False)
@@ -90,19 +90,24 @@ def get_params(string=""):
return param
+
params = get_params()
if params['action'] in ['search', 'manualsearch']:
log(__scriptname__, "action '%s' called" % (params['action']))
+
+ if params['action'] == 'manualsearch':
+ params['searchstring'] = urllib.unquote(params['searchstring'])
+
item = {}
item['temp'] = False
item['rar'] = False
- item['year'] = xbmc.getInfoLabel("VideoPlayer.Year")
# Year
- item['season'] = str(xbmc.getInfoLabel("VideoPlayer.Season"))
# Season
- item['episode'] = str(xbmc.getInfoLabel("VideoPlayer.Episode"))
# Episode
+ item['year'] = xbmc.getInfoLabel("VideoPlayer.Year") # Year
+ item['season'] = str(xbmc.getInfoLabel("VideoPlayer.Season")) # Season
+ item['episode'] = str(xbmc.getInfoLabel("VideoPlayer.Episode")) # Episode
item['tvshow'] = params['searchstring'] if params['action'] ==
'manualsearch' \
- else normalizeString(xbmc.getInfoLabel("VideoPlayer.TVshowtitle")) #
Show
+ else normalizeString(xbmc.getInfoLabel("VideoPlayer.TVshowtitle")) #
Show
item['title'] = params['searchstring'] if params['action'] ==
'manualsearch' \
- else normalizeString(xbmc.getInfoLabel("VideoPlayer.OriginalTitle")) #
try to get original title
+ else normalizeString(xbmc.getInfoLabel("VideoPlayer.OriginalTitle"))
# try to get original title
item['file_original_path'] = urllib.unquote(
xbmc.Player().getPlayingFile().decode('utf-8')) # Full path of a
playing file
item['3let_language'] = []
@@ -113,20 +118,26 @@ if params['action'] in ['search', 'manualsearch']:
if item['title'] == "":
log(__scriptname__, "VideoPlayer.OriginalTitle not found")
item['title'] = params['searchstring'] if params['action'] ==
'manualsearch' \
- else normalizeString(xbmc.getInfoLabel("VideoPlayer.Title"))
# no original title, get just Title
+ else normalizeString(xbmc.getInfoLabel("VideoPlayer.Title")) # no
original title, get just Title
- if item['episode'].lower().find("s") > -1:
# Check if season is "Special"
+ if item['episode'].lower().find("s") > -1: # Check if season is "Special"
item['season'] = "0"
item['episode'] = item['episode'][-1:]
- if ( item['file_original_path'].find("http") > -1 ):
+ if item['file_original_path'].find("http") > -1:
item['temp'] = True
- elif ( item['file_original_path'].find("rar://") > -1 ):
+ # Parse release name
+ if item['tvshow']:
+ item['tvshow'] = parse_tv_rls(item['tvshow'])
+ else:
+ item['title'] = parse_movie_rls(item['title'])
+
+ elif item['file_original_path'].find("rar://") > -1:
item['rar'] = True
item['file_original_path'] =
os.path.dirname(item['file_original_path'][6:])
- elif ( item['file_original_path'].find("stack://") > -1 ):
+ elif item['file_original_path'].find("stack://") > -1:
stackPath = item['file_original_path'].split(" , ")
item['file_original_path'] = stackPath[0][8:]
log(__scriptname__, "%s" % item)
@@ -134,7 +145,7 @@ if params['action'] in ['search', 'manualsearch']:
elif params['action'] == 'download':
## we pickup all our arguments sent from def search()
- subs = download(params["ID"], params["filename"])
+ subs = download(params["id"], params["filename"])
## we can return more than one subtitle for multi CD versions, for now we
are still working out how to handle that in XBMC core
for sub in subs:
listitem = xbmcgui.ListItem(label=sub)
@@ -143,4 +154,4 @@ elif params['action'] == 'download':
elif params['action'] == 'clear_cache':
clear_cache()
-xbmcplugin.endOfDirectory(int(sys.argv[1])) ## send end of directory to XBMC
\ No newline at end of file
+xbmcplugin.endOfDirectory(int(sys.argv[1])) ## send end of directory to XBMC
\ No newline at end of file
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=09f39263da1180016b2a534eb128f2973b2ad537
commit 09f39263da1180016b2a534eb128f2973b2ad537
Author: sphere <[email protected]>
Date: Thu May 8 09:42:54 2014 +0200
[service.subtitles.napisy24pl] updated to version 1.0.2
diff --git a/service.subtitles.napisy24pl/README.md
b/service.subtitles.napisy24pl/README.md
index 235d385..042ab9a 100644
--- a/service.subtitles.napisy24pl/README.md
+++ b/service.subtitles.napisy24pl/README.md
@@ -1,4 +1,4 @@
-service.subtitles.napiprojekt
+service.subtitles.napisy24pl
======================
-service.subtitles.napiprojekt
+service.subtitles.napisy24pl
diff --git a/service.subtitles.napisy24pl/addon.xml
b/service.subtitles.napisy24pl/addon.xml
index dc53472..15cb58b 100644
--- a/service.subtitles.napisy24pl/addon.xml
+++ b/service.subtitles.napisy24pl/addon.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.napisy24pl"
name="Napisy24.pl"
- version="1.0.1"
+ version="1.0.2"
provider-name="CaTz">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
+ <import addon="script.module.beautifulsoup4" version="4.3.2"/>
</requires>
<extension point="xbmc.subtitle.module" library="service.py"/>
<extension point="xbmc.addon.metadata">
diff --git a/service.subtitles.napisy24pl/changelog.txt
b/service.subtitles.napisy24pl/changelog.txt
index 525a953..9fcacf2 100644
--- a/service.subtitles.napisy24pl/changelog.txt
+++ b/service.subtitles.napisy24pl/changelog.txt
@@ -1,3 +1,6 @@
+1.0.2 - by CaTz 07/05/2014
+- Added missing dependency in Addon.xml
+
1.0.1 - by CaTz 04/05/2014
- Bug fix, handle empty rows
-----------------------------------------------------------------------
Summary of changes:
service.subtitles.napisy24pl/README.md | 4 +-
service.subtitles.napisy24pl/addon.xml | 3 +-
service.subtitles.napisy24pl/changelog.txt | 3 +
service.subtitles.subscenter/addon.xml | 2 +-
service.subtitles.subscenter/changelog.txt | 4 ++
.../resources/lib/SUBUtilities.py | 25 ++++++++++-
service.subtitles.subscenter/service.py | 24 ++++++++---
service.subtitles.subtitle/addon.xml | 2 +-
service.subtitles.subtitle/changelog.txt | 4 ++
.../resources/lib/SUBUtilities.py | 23 ++++++++++-
service.subtitles.subtitle/service.py | 41 ++++++++++++-------
11 files changed, 102 insertions(+), 33 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons