Skip to content

Commit

Permalink
Fix unicode issue which would prevent certain providers from working
Browse files Browse the repository at this point in the history
  • Loading branch information
steeve committed Feb 21, 2014
1 parent 04dcbc6 commit b49adae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions resources/site-packages/xbmctorrent/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ def _fn(*a, **kwds):
if items is not None:
for item in items:
if item.get("is_playable"):
label = item["label"].encode("utf-8")
item.setdefault("context_menu", []).extend([
("Add to Movies", "XBMC.RunPlugin(%s)" % plugin.url_for("library_add", content_type="movies", label=item["label"], href=item["path"])),
("Add to TV", "XBMC.RunPlugin(%s)" % plugin.url_for("library_add", content_type="tvshows", label=item["label"], href=item["path"])),
("Add to Movies", "XBMC.RunPlugin(%s)" % plugin.url_for("library_add", content_type="movies", label=label, href=item["path"])),
("Add to TV", "XBMC.RunPlugin(%s)" % plugin.url_for("library_add", content_type="tvshows", label=label, href=item["path"])),
])
yield item
return _fn
2 changes: 1 addition & 1 deletion resources/site-packages/xbmctorrent/scrapers/tpb.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def piratebay_page(root, page):
size = re.search("Size (.*?),", desc_node.text).group(1)
text = "%s (%s S:%s P:%s)" % (node.a.text, size.replace(" ", " "), seeds, peers)
yield {
"label": text.encode("utf-8"),
"label": text,
"path": plugin.url_for("play", uri=magnet_node["href"]),
"is_playable": True,
}
Expand Down

0 comments on commit b49adae

Please sign in to comment.