Skip to content

Commit

Permalink
release: v0.0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed May 6, 2020
1 parent b83a126 commit 7d37b52
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* [v0.0.22](https://github.com/newt-sc/a4kSubtitles/releases/tag/service.subtitles.a4ksubtitles%2Fservice.subtitles.a4ksubtitles-0.0.22):
* Fix meta string conversion issue

* [v0.0.21](https://github.com/newt-sc/a4kSubtitles/releases/tag/service.subtitles.a4ksubtitles%2Fservice.subtitles.a4ksubtitles-0.0.21):
* TVShow year scrape from imdb when necessary

Expand Down
6 changes: 5 additions & 1 deletion a4kSubtitles/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
except ImportError:
from urllib.parse import quote_plus, unquote, parse_qsl
from io import StringIO
unicode = None

__url_regex = r'(([a-z0-9][a-z0-9-]{1,5}[a-z0-9]\.[a-z0-9]{2,20})|(opensubtitles))\.[a-z]{2,5}'
__credit_part_regex = r'(sync|synced|fix|fixed|corrected|corrections)'
Expand All @@ -39,7 +40,10 @@ def get_all_relative_py_files(file):
return [filename[:-3] for filename in files if not filename.startswith('__') and filename.endswith('.py')]

def strip_non_ascii_and_unprintable(text):
if isinstance(text, int):
if not isinstance(text, str):
return str(text)

if PY2 and not isinstance(text, unicode):
return str(text)

result = ''.join(char for char in text if char in string.printable)
Expand Down
5 changes: 4 additions & 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.a4ksubtitles"
name="a4kSubtitles"
version="0.0.21"
version="0.0.22"
provider-name="Unknown">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
Expand All @@ -24,6 +24,9 @@ Supports: OpenSubtitles, BSPlayer, Podnadpisi.NET, SubDB, Subscene
<icon>icon.png</icon>
</assets>
<news>
[v0.0.22]:
* Fix meta string conversion issue

[v0.0.21]:
* TVShow year scrape from imdb when necessary

Expand Down
5 changes: 4 additions & 1 deletion packages/addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<addons>
<addon id="service.subtitles.a4ksubtitles"
name="a4kSubtitles"
version="0.0.21"
version="0.0.22"
provider-name="Unknown">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
Expand All @@ -27,6 +27,9 @@ Supports: OpenSubtitles, BSPlayer, Podnadpisi.NET, SubDB, Subscene
<icon>icon.png</icon>
</assets>
<news>
[v0.0.22]:
* Fix meta string conversion issue

[v0.0.21]:
* TVShow year scrape from imdb when necessary

Expand Down
2 changes: 1 addition & 1 deletion packages/addons.xml.crc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cb2c5a3c7846568f15ffc86dd3a3cc20dab27c70
0a73ff2defcf5aff6f157ed75e759508a1e24dce

0 comments on commit 7d37b52

Please sign in to comment.