Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autostart VRT.nu plugin with autoexec.py #38

Closed
vasonline opened this issue Nov 18, 2018 · 8 comments
Closed

Autostart VRT.nu plugin with autoexec.py #38

vasonline opened this issue Nov 18, 2018 · 8 comments
Labels
enhancement New feature or request

Comments

@vasonline
Copy link

Describe the bug
To make it easier for watching TV We want Kodi to start the Vrt.nu Plugin automatically.

To Reproduce
Create file "autoexec.py" in folder: \Kodi\userdata
https://kodi.wiki/view/Autoexec.py
Add the follwing text to "autoexec.py":

import xbmc
xbmc.executebuiltin("RunScript(plugin.video.vrt.nu)")

Expected behavior
Kodi lauches and VRT.nu plugin started
Instead: Kodi starts and gives 'VRT.nu Error"

Would you be so kind to have a look?
Thanks in advance!

Here is the output from Kodi.log
Happens on Windows and Android
(same message - just different paths)

12:00:28.621 T:3000 WARNING: RunScript called for a non-script addon 'plugin.video.vrt.nu'. This behaviour is deprecated.
12:00:33.313 T:3324 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
File "C:\Users\Beheerder\AppData\Roaming\Kodi\addons\plugin.video.vrt.nu\addon.py", line 12, in
_handle = int(sys.argv[1])
IndexError: list index out of range
-->End of Python script error report<--

@pietje666
Copy link
Collaborator

pietje666 commented Nov 18, 2018

12:00:28.621 T:3000 WARNING: RunScript called for a non-script addon 'plugin.video.vrt.nu'. This behaviour is deprecated.

I think you should use RunAddon instead of runscript. Maybe you should prefix it with XBMC so that will be XBMC.RunAddon like they do in this link https://forum.libreelec.tv/thread/9742-autostart-eurosport-player-addon/

@vasonline
Copy link
Author

Hi,
Many thanks!

Code for autoexec.py:

import xbmc
xbmc.executebuiltin('XBMC.RunAddon(plugin.video.vrt.nu)')

  • Works fine on Windows.
  • On Android: Kodi starts, but immediatly hangs after that (just a black screen)

Anyway, I appreciate you took the time to reply!
I found adding them to favorites also works.

All the best and Greetings

@pietje666
Copy link
Collaborator

No problem :)

@dagwieers
Copy link
Collaborator

Hmmm, Kodi has an interface to select what to show on startup. In Settings » Interface » Startup » Startup Settings you have two options Perform on startup and Startup window. I wonder if there's a possibility that an addon can hook into this and add an option.

Would be nice if this was possible without the need to resort to editing files on disk.

@dagwieers
Copy link
Collaborator

Also, should we maybe open the Wiki and start adding information like this for others ? If we close this issue, it will not be easily found.

@pietje666
Copy link
Collaborator

Maybe we will open it to explain how to enable DRM :)

@dagwieers dagwieers added the enhancement New feature or request label Mar 19, 2019
@dagwieers
Copy link
Collaborator

This is now documented here: https://github.com/pietje666/plugin.video.vrt.nu/wiki/Autostart

@dagwieers
Copy link
Collaborator

I just added documentation to the Wiki page on how to go automatically into a menu, e.g. the Live TV listing. Feedback or improvements appreciated.

mediaminister pushed a commit to mediaminister/plugin.video.vrt.nu that referenced this issue May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants