Skip to content

Commit

Permalink
[service.subtitles.subhd] 1.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
taxigps committed Feb 18, 2017
1 parent 8b64d6b commit 2894f81
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 18 deletions.
2 changes: 1 addition & 1 deletion addons.xml
Expand Up @@ -785,7 +785,7 @@ For Non-PRC OS environment (Windows7|WindowsXP):[CR]"Control Panel"|"Region and

<addon id="service.subtitles.subhd"
name="Sub HD"
version="1.0.12"
version="1.0.13"
provider-name="taxigps">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
@@ -1 +1 @@
580ceeba649c88e7940746ba6554e042
82c1c99b1d7e436305ba092fe0baab24
45 changes: 45 additions & 0 deletions repo/service.subtitles.subhd/changelog-1.0.13.txt
@@ -0,0 +1,45 @@
1.0.13
- fixed for site changed

1.0.12
- TV Shows tweak

1.0.11
- minor fix for TV Shows

1.0.10
- minor fix

1.0.9
- subtitle name minor tweak

1.0.8
- updated subtitle name for unknown title version
- added group information
- updated API address to eliminate URL redirect

1.0.7
- fixed no subtitles in the list. thanks generalmilk!

1.0.6
- fixed for download url structure changed

1.0.5
- fixed can't remove temp dir under android

1.0.4
- support search subtitles for tv shows in library

1.0.3
- fixed error when have 机翻版本|官方译本

1.0.2
- fixed can't search chinese word
- fixed error when have 听译版本
- fixed bug when get some sub version string

1.0.1
- fixed can't download sub due to site changed

1.0.0
- initial
Binary file not shown.
2 changes: 1 addition & 1 deletion service.subtitles.subhd/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.subhd"
name="Sub HD"
version="1.0.12"
version="1.0.13"
provider-name="taxigps">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
5 changes: 4 additions & 1 deletion service.subtitles.subhd/changelog.txt
@@ -1,4 +1,7 @@
1.0.12
1.0.13
- fixed for site changed

1.0.12
- TV Shows tweak

1.0.11
Expand Down
17 changes: 3 additions & 14 deletions service.subtitles.subhd/service.py
Expand Up @@ -88,20 +88,9 @@ def Search( item ):

for it in results:
link = SUBHD_BASE + it.find("div", class_="d_title").a.get('href').encode('utf-8')
title = it.find("div", class_="d_title").text.encode('utf-8')
#version = it.find(text=re.compile('(字幕翻译|听译版本|机翻版本|官方译本)'.decode('utf-8'))).parent.get('title').encode('utf-8')
version = it.find_all("span", class_=re.compile("label"))[-1].get('title').encode('utf-8')
if version:
if version.find('本字幕按 ') == 0:
version = version.split()[1]
# if version information is too short, we will append it to the title to give user more information
if (len(re.findall(r"[\w']+", version)) < 5):
if (title.find(version) == -1):
version = title + ' ' + version
else:
version = title
else:
version = title
version = it.find("div", class_="d_title").a.get('title').encode('utf-8')
if version.find('本字幕按 ') == 0:
version = version.split()[1]
try:
group = it.find("div", class_="d_zu").text.encode('utf-8')
if group.isspace():
Expand Down

0 comments on commit 2894f81

Please sign in to comment.