The branch, gotham has been updated
via 414a7685264eaed0183b45ffeac8c04f9a0ffd84 (commit)
from 04a60b69034c496a564af2162fda2d023d5ea7f9 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=414a7685264eaed0183b45ffeac8c04f9a0ffd84
commit 414a7685264eaed0183b45ffeac8c04f9a0ffd84
Author: sphere <[email protected]>
Date: Mon Jun 30 11:18:32 2014 +0200
[service.subtitles.divxplanet] updated to version 0.0.5
diff --git a/service.subtitles.divxplanet/addon.xml
b/service.subtitles.divxplanet/addon.xml
index cf04a1e..466618f 100644
--- a/service.subtitles.divxplanet/addon.xml
+++ b/service.subtitles.divxplanet/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.divxplanet"
name="Divxplanet Subtitle Service"
- version="0.0.3"
+ version="0.0.5"
provider-name="Koray Al">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.divxplanet/changelog.txt
b/service.subtitles.divxplanet/changelog.txt
index b05185b..3a43980 100644
--- a/service.subtitles.divxplanet/changelog.txt
+++ b/service.subtitles.divxplanet/changelog.txt
@@ -1,3 +1,7 @@
+0.0.4
+- fixed downloaded filename encoding
+- fixed subtitle description text encoding
+
0.0.3
- added tags required for XBMC addon database
- removed dummy translations
diff --git a/service.subtitles.divxplanet/icon.png
b/service.subtitles.divxplanet/icon.png
index 610c8b8..6cd4dab 100644
Binary files a/service.subtitles.divxplanet/icon.png and
b/service.subtitles.divxplanet/icon.png differ
diff --git a/service.subtitles.divxplanet/service.py
b/service.subtitles.divxplanet/service.py
index 56bb539..281f65b 100644
--- a/service.subtitles.divxplanet/service.py
+++ b/service.subtitles.divxplanet/service.py
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
import os
import sys
@@ -132,7 +132,6 @@ def Search(item):
lan = link.parent.parent.findAll("img",
title=re.compile("^.*. (subtitle|altyazi)"))
if tse and tep and lan and lantext:
language = lan[0]["title"]
- filename = info[1].getText()
if language[0] == "e":
language = "English"
lan_short = "en"
@@ -140,7 +139,7 @@ def Search(item):
language = "Turkish"
lan_short = "tr"
filename = "%s S%02dE%02d %s.%s" % (tvshow, season,
episode, title, lan_short)
- description = info[1].getText()
+ description = info[1].getText().encode('ascii', 'ignore')
listitem = xbmcgui.ListItem(label=language,
# language name for the found subtitle
label2=description, # file name
for the found subtitle
iconImage="0",
# rating for the subtitle, string 0-5
@@ -151,7 +150,7 @@ def Search(item):
url =
"plugin://%s/?action=download&link=%s&lang=%s&description=%s" % (__scriptid__,
addr,
lan_short,
-
description)
+ filename)
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem,isFolder=False)
br.close()
log("Divxplanet: found %d subtitles" % (len(subtitles_list)))
@@ -200,12 +199,13 @@ def Search(item):
else:
language = "Turkish"
lan_short = "tr"
- filename = "no-description"
+ description = "no-description"
if info[0].getText() != "":
- filename = info[0].getText()
- log("Divxplanet: found a subtitle with description: %s" %
(filename))
+ description = info[0].getText().encode('ascii', 'ignore')
+ filename = "%s.%s" % (title, lan_short)
+ log("Divxplanet: found a subtitle with description: %s" %
(description))
listitem = xbmcgui.ListItem(label=language,
# language name for the found subtitle
- label2=filename, # file name for
the found subtitle
+ label2=description, # file name
for the found subtitle
iconImage="0",
# rating for the subtitle, string 0-5
thumbnailImage=xbmc.convertLanguage(language,
xbmc.ISO_639_1)
)
@@ -224,7 +224,7 @@ def normalizeString(str):
'NFKD', unicode(unicode(str, 'utf-8'))
).encode('ascii','ignore')
-def Download(link, lang, description): #standard input
+def Download(link, lang, filename): #standard input
subtitle_list = []
## Cleanup temp dir, we recomend you download/unzip your subs in temp
folder and
## pass that to XBMC to copy and activate
@@ -260,7 +260,7 @@ def Download(link, lang, description): #standard input
br.submit()
log("Divxplanet: Fetching subtitles using url %s" % (dlurl))
- local_tmp_file = os.path.join(__temp__, normalizeString(description) +
".rar")
+ local_tmp_file = os.path.join(__temp__, normalizeString(filename) + ".rar")
try:
log("Divxplanet: Saving subtitles to '%s'" % (local_tmp_file))
if not os.path.exists(__temp__):
@@ -303,7 +303,7 @@ def Download(link, lang, description): #standard input
for file in files:
# there could be more subtitle files in __temp__, so make sure
we get the newly created subtitle file
if (string.split(file, '.')[-1] in ['srt', 'sub']) and
(os.stat(os.path.join(__temp__, file)).st_mtime > init_max_mtime): # unpacked
file is a newly created subtitle file
- log("Divxplanet: Unpacked subtitles file '%s'" % (file))
+ log("Divxplanet: Unpacked subtitles file '%s'" %
(file.encode("utf-8")))
subs_file = os.path.join(__temp__, file)
subtitle_list.append(subs_file)
log("Divxplanet: Subtitles saved to '%s'" % ( local_tmp_file))
@@ -376,4 +376,4 @@ elif params['action'] == 'download':
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=sub,listitem=listitem,isFolder=False)
-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
-----------------------------------------------------------------------
Summary of changes:
.../LICENSE.txt | 0
service.subtitles.divxplanet/README.md | 9 +++++++
service.subtitles.divxplanet/addon.xml | 2 +-
service.subtitles.divxplanet/changelog.txt | 4 +++
service.subtitles.divxplanet/icon.png | Bin 16999 -> 20856 bytes
service.subtitles.divxplanet/service.py | 24 ++++++++++----------
6 files changed, 26 insertions(+), 13 deletions(-)
copy {script.filecleaner => service.subtitles.divxplanet}/LICENSE.txt (100%)
create mode 100644 service.subtitles.divxplanet/README.md
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons