Skip to content

Commit

Permalink
release: v1.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed Oct 16, 2021
1 parent f04a429 commit 8bcb00b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* [v1.31.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.31.0):
* Source select dialog now pre-selects first result
* When the Debrid resolve fails, show the source select dialog with the last selected source pre-selected
* Allow to resolve archives for streaming from RD

* [v1.30.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.30.0):
* RealDebrid resolving improvements

Expand Down
36 changes: 19 additions & 17 deletions a4kStreaming/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2313,13 +2313,14 @@ def sorter():
result_style = '[LIGHT]%s[/LIGHT]'
autoplay = core.kodi.get_bool_setting('general.autoplay') and not params.force_sourceselect

selection = 1
label .selection # type: ignore # noqa: F821
if not autoplay:
selection = core.kodi.xbmcgui.Dialog().select(
'Choose source',
[__action_menu_style % 'New Search'] + [result_style % results[key].get('title_with_debrid', results[key]['title']) for key in results_keys],
preselect=selection
)
else:
selection = 1

if selection == -1:
general.last_action_time = core.utils.time_ms()
Expand All @@ -2341,7 +2342,7 @@ def sorter():
else:
selection -= 1

label .begin # type: ignore # noqa: F821
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 @@ -2397,6 +2398,7 @@ def resolve_rd(resolve_files='all'):
try:
all_files = result['debrid_files'].keys()
file_ids = [] if resolve_files != 'all' else all_files

if resolve_files == 'videos':
title_name = provider_params.title.title.lower()
for file_id in result['debrid_files'].keys():
Expand All @@ -2408,6 +2410,7 @@ def resolve_rd(resolve_files='all'):
file_ids.append(file_id)
if len(file_ids) == len(all_files):
file_ids = []

if result['ref'].mediatype == 'episode' and (len(file_ids) == 0 or resolve_files == 'exact'):
resolve_files = 'exact'
episodes = []
Expand All @@ -2419,6 +2422,7 @@ def resolve_rd(resolve_files='all'):
episodes = util_filter_episodes(episodes, 'filename')
for ep in episodes:
file_ids.append(ep['id'])

if len(file_ids) == 0:
return files

Expand Down Expand Up @@ -2450,11 +2454,12 @@ def resolve_rd(resolve_files='all'):
selected_files.append(file)

for i, file in enumerate(selected_files):
files.append({
'path': file['path'],
'size': file['bytes'],
'link': parsed_response['links'][i]
})
if i < len(parsed_response['links']):
files.append({
'path': file['path'],
'size': file['bytes'],
'link': parsed_response['links'][i]
})

finally:
def delete_magnet():
Expand Down Expand Up @@ -2564,15 +2569,12 @@ def delete_magnet():
link = file.get('link', file.get('stream_link', None))

if not link:
if selection + 1 < len(results_keys) and autoplay:
selection += 1
goto .begin # type: ignore # noqa: F821

general.last_action_time = core.utils.time_ms()
core.cache.save_general(general)
core.kodi.notification('Failed to resolve debrid')
core.utils.end_action(core, True)
return
selection += 1
if selection < len(results_keys) and autoplay:
goto .afterselection # type: ignore # noqa: F821
else:
core.kodi.notification('Failed to resolve debrid')
goto .selection # type: ignore # noqa: F821

if result.get('debrid', 'PM') == 'RD':
try:
Expand Down
7 changes: 6 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.30.0"
version="1.31.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -32,6 +32,11 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.31.0]:
* Source select dialog now pre-selects first result
* When the Debrid resolve fails, show the source select dialog with the last selected source pre-selected
* Allow to resolve archives for streaming from RD

[v1.30.0]:
* RealDebrid resolving improvements

Expand Down
7 changes: 6 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.30.0"
version="1.31.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -35,6 +35,11 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.31.0]:
* Source select dialog now pre-selects first result
* When the Debrid resolve fails, show the source select dialog with the last selected source pre-selected
* Allow to resolve archives for streaming from RD

[v1.30.0]:
* RealDebrid resolving improvements

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

0 comments on commit 8bcb00b

Please sign in to comment.