2023-12-07, 18:49
I have an addon, that one of the list items is a "Search" button (url with mode=4) which opens the keyboard,
the results of this search create line items with playable links (url with mode=3 each item).
Each link is played by using this function: "xbmcplugin.setResolvedUrl".
The problem is when I stop the player when ~70% of it was played (Or some other threshold) or finished to play,
the addon is running again with the previous mode (mode=4, "search"),
It causes the keyboard to show up again instead of showing the previous menu with the results of the last search,
And even closing it with Esc, it actually run a search again with empty text, so it shows an empty results list.
Just to mention, when I stop the player few seconds after for example, it's ok.
So my question why does it behave like this?
How can I avoid it?
Thanks.
the results of this search create line items with playable links (url with mode=3 each item).
Each link is played by using this function: "xbmcplugin.setResolvedUrl".
The problem is when I stop the player when ~70% of it was played (Or some other threshold) or finished to play,
the addon is running again with the previous mode (mode=4, "search"),
It causes the keyboard to show up again instead of showing the previous menu with the results of the last search,
And even closing it with Esc, it actually run a search again with empty text, so it shows an empty results list.
Just to mention, when I stop the player few seconds after for example, it's ok.
So my question why does it behave like this?
How can I avoid it?
Thanks.
python:if mode == 0:
main_menu()
elif mode == 2:
category(url, iconimage, fanart)
elif mode == 3:
play_link(name, url)
elif mode == 4:
search()