Skip to content

Commit

Permalink
fix dependencies, fix scraping and other minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
djay committed Apr 10, 2016
1 parent e19535f commit 7e0e635
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.thaisubtitle"
name="thaisubtitle.com"
version="1.0"
version="1.1"
provider-name="DylanJay">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
<import addon="script.module.beautifulsoup" version="3.2.1"/>
<import addon="script.module.elementtree" version="1.2.7" optional="true"/>
<import addon="script.module.simplejson" version="3.3.0" />
</requires>
<extension point="xbmc.subtitle.module"
library="service.py"/>
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.1.0 (2016-4-10)
- Fix dependencies
- fix scrapping error
- fix log bug

1.0.0
Initial release with features:
- Shows Sync flag when filename matches
Expand Down
2 changes: 1 addition & 1 deletion service.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def get_params():
for lang in urllib.unquote(params['languages']).decode('utf-8').split(","):
item['3let_language'].append(xbmc.convertLanguage(lang, xbmc.ISO_639_2))
if preferred_language:
log('Using preferred language: %s' % preferred_language)
log('main','Using preferred language: %s' % preferred_language)
item['3let_language'].append(xbmc.convertLanguage(preferred_language, xbmc.ISO_639_2))

if item['title'] == "":
Expand Down
2 changes: 1 addition & 1 deletion thaisubtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def getallsubs(content, allowed_languages, filename="", search_string=""):
return []

for element in table.findAll("tr")[1:]:
num, title, rating, translate, upload, download = element.findAll("td")
num, title, edit, rating, translate, upload, download = element.findAll("td")
subtitle_name = title.find('br').previousSibling.strip().strip(" [En]")
rating = int(round(float(rating.getText().strip('%'))/100.0*5))
sync = False
Expand Down

0 comments on commit 7e0e635

Please sign in to comment.