kegham 0 Posted July 27, 2020 Share 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! Link to comment Share on other sites More sharing options...
Luke 37009 Posted July 27, 2020 Share Posted July 27, 2020 Hi, what exactly do you want to restart? Kodi, or Emby Server? Link to comment Share on other sites More sharing options...
kegham 0 Posted July 27, 2020 Author Share 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. Link to comment Share on other sites More sharing options...
Luke 37009 Posted July 27, 2020 Share Posted July 27, 2020 @jachin99 do you know if this is possible? Link to comment Share on other sites More sharing options...
jachin99 82 Posted July 27, 2020 Share 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 Link to comment Share on other sites More sharing options...
Luke 37009 Posted July 27, 2020 Share 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 ! Link to comment Share on other sites More sharing options...
kegham 0 Posted July 27, 2020 Author Share 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... Link to comment Share on other sites More sharing options...
Luke 37009 Posted July 27, 2020 Share Posted July 27, 2020 Sounds like it's worth a shot. Link to comment Share on other sites More sharing options...
jachin99 82 Posted July 27, 2020 Share Posted July 27, 2020 I'll have to look at my script but that looks about right Link to comment Share on other sites More sharing options...
kegham 0 Posted July 28, 2020 Author Share 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! Link to comment Share on other sites More sharing options...
Luke 37009 Posted July 29, 2020 Share Posted July 29, 2020 Thanks for the feedback ! Link to comment Share on other sites More sharing options...
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