Skip to content

Commit

Permalink
release: v1.48.0
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed Jan 20, 2023
1 parent db49f3f commit 61b7783
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* [v1.48.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.48.0):
* Support KODI 20

* [v1.47.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.47.0):
* Prevent recursion on cache miss and autoplay on

Expand Down
18 changes: 14 additions & 4 deletions a4kStreaming/explorer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# -*- coding: utf-8 -*-

from .lib.goto import with_goto
import sys

use_goto = sys.version_info <= (3, 8)
if use_goto:
from .lib.goto import with_goto
else:
def with_goto(func):
return func

__action_menu_style = '[COLOR white][B]%s[/B][/COLOR]'

Expand Down Expand Up @@ -2378,7 +2385,8 @@ def sorter():
autoplay = core.kodi.get_bool_setting('general.autoplay') and not params.force_sourceselect

selection = 1
label .selection # type: ignore # noqa: F821
if use_goto:
label .selection # type: ignore # noqa: F821
if not autoplay:
selection = core.kodi.xbmcgui.Dialog().select(
'Choose source',
Expand Down Expand Up @@ -2406,7 +2414,8 @@ def sorter():
else:
selection -= 1

label .afterselection # type: ignore # noqa: F821
if use_goto:
label .afterselection # type: ignore # noqa: F821
result = results[results_keys[selection]]
video_ext = list(map(lambda v: '.%s' % v.upper(), core.utils.video_containers()))
size = 1048576 * 100
Expand Down Expand Up @@ -2680,7 +2689,8 @@ def delete_magnet():
except:
core.logger.notice(core.traceback.format_exc())

label .play # type: ignore # noqa: F821
if use_goto:
label .play # type: ignore # noqa: F821
item = core.kodi.xbmcgui.ListItem(path=link, offscreen=True)
item.setProperty('IsPlayable', 'true')
item.setContentLookup(False)
Expand Down
33 changes: 18 additions & 15 deletions a4kStreaming/lib/goto.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,28 @@ def argument_bits(self):


def _make_code(code, codestring):
args = [
code.co_argcount, code.co_nlocals, code.co_stacksize,
code.co_flags, codestring, code.co_consts,
code.co_names, code.co_varnames, code.co_filename,
code.co_name, code.co_firstlineno, code.co_lnotab,
code.co_freevars, code.co_cellvars
]

try:
args.insert(1, code.co_kwonlyargcount) # PY3
return code.replace(co_code=codestring) # new in 3.8+
except AttributeError:
pass
args = [
code.co_argcount, code.co_nlocals, code.co_stacksize,
code.co_flags, codestring, code.co_consts,
code.co_names, code.co_varnames, code.co_filename,
code.co_name, code.co_firstlineno, code.co_lnotab,
code.co_freevars, code.co_cellvars
]

try:
args.insert(1, code.co_posonlyargcount) # PY3
except AttributeError:
pass
try:
args.insert(1, code.co_kwonlyargcount) # PY3
except AttributeError:
pass

try:
args.insert(1, code.co_posonlyargcount) # PY3
except AttributeError:
pass

return types.CodeType(*args)
return types.CodeType(*args)


def _parse_instructions(code):
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="plugin.video.a4kstreaming"
name="a4kStreaming"
version="1.47.0"
version="1.48.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -32,6 +32,9 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.48.0]:
* Support KODI 20

[v1.47.0]:
* Prevent recursion on cache miss and autoplay on

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="plugin.video.a4kstreaming"
name="a4kStreaming"
version="1.47.0"
version="1.48.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -35,6 +35,9 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.48.0]:
* Support KODI 20

[v1.47.0]:
* Prevent recursion on cache miss and autoplay on

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

0 comments on commit 61b7783

Please sign in to comment.