Skip to content

Commit

Permalink
release: v0.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed Apr 27, 2020
1 parent 1bf2b3f commit 2f8970a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* [v0.0.17](https://github.com/newt-sc/a4kSubtitles/releases/tag/service.subtitles.a4ksubtitles%2Fservice.subtitles.a4ksubtitles-0.0.17):
* Reuse KODI's Python language invoker
* Improves performance on low-end devices when switching subtitles for best match
* Url decode subtitle names

* [v0.0.16](https://github.com/newt-sc/a4kSubtitles/releases/tag/service.subtitles.a4ksubtitles%2Fservice.subtitles.a4ksubtitles-0.0.16):
* Cache last result
* OpenSubtitles always queries:
Expand Down
14 changes: 11 additions & 3 deletions a4kSubtitles/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __sanitize_results(core, meta, results):
result['name'] = '%s%s' % (meta.filename_without_ext, ext)
except: pass

result['name'] = core.utils.unquote(result['name'])

return list(temp_dict.values())

def __apply_language_filter(meta, results):
Expand Down Expand Up @@ -131,6 +133,11 @@ def __wait_threads(core, request_threads):

core.utils.wait_threads(threads)

def __complete_search(core, results):
if core.api_mode_enabled:
return results
__add_results(core, results)

def __search(core, service_name, meta, results):
service = core.services[service_name]
requests = service.build_search_requests(core, service_name, meta)
Expand Down Expand Up @@ -177,6 +184,9 @@ def search(core, params):

threads.append((auth_thread, search_thread))

if len(threads) == 0:
return __complete_search(core, last_query_results)

__wait_threads(core, threads)
results = __apply_language_filter(meta, results)
results = __sanitize_results(core, meta, results)
Expand All @@ -196,6 +206,4 @@ def search(core, params):
results = sorted(results, key=sorter)
__save_results(core, meta, results)

if core.api_mode_enabled:
return results
__add_results(core, results)
return __complete_search(core, results)
9 changes: 7 additions & 2 deletions 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.16"
version="0.0.17"
provider-name="Unknown">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
Expand All @@ -16,14 +16,19 @@ Multi-source subtitles addon optimized for Seren.
Supports: OpenSubtitles, BSPlayer
</description>
<platform>all</platform>
<reuselanguageinvoker>false</reuselanguageinvoker>
<reuselanguageinvoker>true</reuselanguageinvoker>
<license>MIT License</license>
<website>https://github.com/newt-sc/a4kSubtitles</website>
<source>https://github.com/newt-sc/a4kSubtitles</source>
<assets>
<icon>icon.png</icon>
</assets>
<news>
[v0.0.17]:
* Reuse KODI's Python language invoker
* Improves performance on low-end devices when switching subtitles for best match
* Url decode subtitle names

[v0.0.16]:
* Cache last result
* OpenSubtitles always queries:
Expand Down
9 changes: 7 additions & 2 deletions 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.16"
version="0.0.17"
provider-name="Unknown">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
Expand All @@ -19,14 +19,19 @@ Multi-source subtitles addon optimized for Seren.
Supports: OpenSubtitles, BSPlayer
</description>
<platform>all</platform>
<reuselanguageinvoker>false</reuselanguageinvoker>
<reuselanguageinvoker>true</reuselanguageinvoker>
<license>MIT License</license>
<website>https://github.com/newt-sc/a4kSubtitles</website>
<source>https://github.com/newt-sc/a4kSubtitles</source>
<assets>
<icon>icon.png</icon>
</assets>
<news>
[v0.0.17]:
* Reuse KODI's Python language invoker
* Improves performance on low-end devices when switching subtitles for best match
* Url decode subtitle names

[v0.0.16]:
* Cache last result
* OpenSubtitles always queries:
Expand Down
2 changes: 1 addition & 1 deletion packages/addons.xml.crc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1c35d9a401af705d8c83a6b6d89d57d22064ef47
e96e986d49f0f117aa3da261e8ea93e0f8f4a389

0 comments on commit 2f8970a

Please sign in to comment.