kegham 0 Posted July 27, 2020 Posted July 27, 2020 Hello! I would like to know if I can restart the Emby plugin from the command line. I'm doing s script to restart the service once the connection with the server is reestablished, since the plugin can't reconnect to the server unless I restart the app. Thanks!
Luke 40070 Posted July 27, 2020 Posted July 27, 2020 Hi, what exactly do you want to restart? Kodi, or Emby Server?
kegham 0 Posted July 27, 2020 Author Posted July 27, 2020 I would like to restart the Emby plugin itself. At the moment I'm restarting manually in the Kodi app >> Addons > Restart Emby for Kodi.
jachin99 87 Posted July 27, 2020 Posted July 27, 2020 (edited) I use eventghost to send python commands to emby for Kodi. Here is a list of actions that are compatible with e4k but it's up to you to figure out how to execute them from the command line. https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions Edited July 27, 2020 by jachin99
Luke 40070 Posted July 27, 2020 Posted July 27, 2020 40 minutes ago, jachin99 said: I use eventghost to send python commands to emby for Kodi. Here is a list of actions that are compatible with e4k but it's up to you to figure out how to execute them from the command line. https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions Thanks !
kegham 0 Posted July 27, 2020 Author Posted July 27, 2020 I think eventghost doesn't work on linux. If I make a python script to call one of those actions, importing the xbmc module, will it work? I think this "xbmc.executebuiltin('RunPlugin(action)')" would be the command that I need...
jachin99 87 Posted July 27, 2020 Posted July 27, 2020 I'll have to look at my script but that looks about right
kegham 0 Posted July 28, 2020 Author Posted July 28, 2020 I did it via the command line with this package "xbmc-eventclients-xbmc-send". I just created a simple python script to execute the restart action: #!/usr/bin/env python import xbmc xbmc.executebuiltin('RunPlugin(plugin://plugin.video.emby?mode=restartservice)') and called the command: xbmc-send --action='RunScript("/home/osmc/.kodi/addons/temp/restart-emby.py")' Doing without the xbmc-send the module xbmc would't import, since kodi have a build-in python version. Now it works, just what I need it. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now