Skip to content

Commit

Permalink
Fixed search parsing and PO file header
Browse files Browse the repository at this point in the history
  • Loading branch information
morsela committed Nov 13, 2014
1 parent fabf35d commit 41a44cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.torec"
name="Torec"
version="1.0.1"
version="1.0.2"
provider-name="slmosl">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1.0.2 - Fixed an issue with Torec search results parsing
1.0.1 - Several minor fixes in order to to adhere XBMC add-on repository standards

1.0.0 - Migrated to Gotham style
14 changes: 13 additions & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#English
msgid ""
msgstr ""
"Project-Id-Version: XBMC Main Translation Project (Gotham)\n"
"Report-Msgid-Bugs-To: http://trac.xbmc.org/\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: XBMC Translation Team\n"
"Language-Team: English (http://www.transifex.com/projects/p/XBMC-Main-Gotham/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "#32001"
msgid "Error searching for subtitles"
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/TorecSubtitlesDownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def __init__(self, id, name, url, data):
def _parseOptions(self, data):
subtitleSoup = bs4.BeautifulSoup(data)
subtitleOptions = subtitleSoup("div", {'class' : 'download_box' })[0].findAll("option")
return map(lambda x: SubtitleOption(x.string.strip(), x["value"]), subtitleOptions)
filteredSubtitleOptions = filter(lambda x: x.has_key("value"), subtitleOptions)
return map(lambda x: SubtitleOption(x.string.strip(), x["value"]), filteredSubtitleOptions)

class Response(object):
def __init__(self, response):
Expand Down

0 comments on commit 41a44cb

Please sign in to comment.