maxx 2 Posted September 19, 2022 Share Posted September 19, 2022 I need to know when the sync occurs or if it is possible to push the sync via api or websocket I'm adding a random file from an external server to a kodi client, the issue is that I need to be able to do it this way because the google drive plugin that kodi has requires the client user's permission to appear in the strm. That's why I need to create a strm every time a user runs a movie The problem is that kodi doesn't get to do the sync before I play the new strm file, therefore kodi crashes or at most it doesn't find the file in question obviously because it hasn't detected it yet If I could know when it does the sync, I could at least build a while to stop the play until the sync occurs and the new file is added If you can help me I would appreciate it Link to comment Share on other sites More sharing options...
quickmic 1330 Posted September 19, 2022 Share Posted September 19, 2022 17 hours ago, maxx said: I need to know when the sync occurs or if it is possible to push the sync via api or websocket I'm adding a random file from an external server to a kodi client, the issue is that I need to be able to do it this way because the google drive plugin that kodi has requires the client user's permission to appear in the strm. That's why I need to create a strm every time a user runs a movie The problem is that kodi doesn't get to do the sync before I play the new strm file, therefore kodi crashes or at most it doesn't find the file in question obviously because it hasn't detected it yet If I could know when it does the sync, I could at least build a while to stop the play until the sync occurs and the new file is added If you can help me I would appreciate it Actually this is a Kodi or Emby server API question. Both ways are possible. Not sure if you mean sync or access the file. However, unfortunately I think you must spent several hours or even days learning the basic API's no matter if it's Emby's or Kodis. Documentation is available for each case, there is no shortcut. Link to comment Share on other sites More sharing options...
maxx 2 Posted September 19, 2022 Author Share Posted September 19, 2022 4 hours ago, quickmic said: Actually this is a Kodi or Emby server API question. Both ways are possible. Not sure if you mean sync or access the file. However, unfortunately I think you must spent several hours or even days learning the basic API's no matter if it's Emby's or Kodis. Documentation is available for each case, there is no shortcut. Actually it has to do with kodi because the idea is to get to get something that happens in kodi On this page https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions this action appears xbmc.executebuiltin('RunPlugin(action)') maybe this is the answer, the fact is that there is not much documentation on how to implement this Would you be so kind to explain to me in what context can I run this command and if I can do it externally to the kodi plugin? Can I use this within a websocket or how can I communicate with a specific device on the server? Link to comment Share on other sites More sharing options...
quickmic 1330 Posted September 20, 2022 Share Posted September 20, 2022 (edited) 5 hours ago, maxx said: Actually it has to do with kodi because the idea is to get to get something that happens in kodi On this page https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions this action appears xbmc.executebuiltin('RunPlugin(action)') maybe this is the answer, the fact is that there is not much documentation on how to implement this Would you be so kind to explain to me in what context can I run this command and if I can do it externally to the kodi plugin? Can I use this within a websocket or how can I communicate with a specific device on the server? Sorry dude, I cannot explain you the complete Kodi API. "xbmc.executebuiltin" is an internal API call. "RunPlugin(action)" is a command send by the internal call, or can be used for skin devs. However, you need the callbacks (notifications). Maybe this plugin can do the job you. https://kodi.wiki/view/Add-on:Kodi_Callbacks Otherwise you need to be become a python programmer to get it working. Edited September 20, 2022 by quickmic Link to comment Share on other sites More sharing options...
maxx 2 Posted September 20, 2022 Author Share Posted September 20, 2022 2 hours ago, quickmic said: Sorry dude, I cannot explain you the complete Kodi API. "xbmc.executebuiltin" is an internal API call. "RunPlugin(action)" is a command send by the internal call, or can be used for skin devs. However, you need the callbacks (notifications). Maybe this plugin can do the job you. https://kodi.wiki/view/Add-on:Kodi_Callbacks Otherwise you need to be become a python programmer to get it working. I have expressed myself badly, I do not expect you to explain the entire api to me, much less What I want to know is the xbmc.executebuiltin command can be run from outside of kodi or is it only run from a kodi addon because what I intend is to run it from a python http server that I am programming The only thing I wanted to see is how an action works in a syntax. There are a lot of actions on the page https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions, would you be so kind as to randomly show me how you would write an action to see how the correct syntax is Thanks a lot Link to comment Share on other sites More sharing options...
quickmic 1330 Posted September 20, 2022 Share Posted September 20, 2022 (edited) 13 minutes ago, maxx said: What I want to know is the xbmc.executebuiltin command can be run from outside of kodi or is it only run from a kodi addon Only from addons. Commands can send via jsonrpc from outside. https://kodi.wiki/view/JSON-RPC_API Obviously, you are not familiar what's the commands meaning from here https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions Really, you need to learn the APIs. These are standard Kodi API commands and can be used in multiple ways. From internal via "xbmc.executebuiltin", from skin via xml's via jsonRPC as parameter, via setting.xml etc. Btw, the commands are not up to date. They are for 4.x versions. But you don't need commands. I got the impression, you want to receive (event) notification from Kodi, not sending commands therefore you need callbacks. Edited September 20, 2022 by quickmic Link to comment Share on other sites More sharing options...
maxx 2 Posted September 20, 2022 Author Share Posted September 20, 2022 2 hours ago, quickmic said: Only from addons. Commands can send via jsonrpc from outside. https://kodi.wiki/view/JSON-RPC_API Obviously, you are not familiar what's the commands meaning from here https://github.com/MediaBrowser/plugin.video.emby/wiki/Actions Really, you need to learn the APIs. These are standard Kodi API commands and can be used in multiple ways. From internal via "xbmc.executebuiltin", from skin via xml's via jsonRPC as parameter, via setting.xml etc. Btw, the commands are not up to date. They are for 4.x versions. But you don't need commands. I got the impression, you want to receive (event) notification from Kodi, not sending commands therefore you need callbacks. I thank you very much for the answer There are two possible scenarios, in scenario A I create a strm file, upload it to an emby library, tell emby to update library server via api and then what I need is how to do a push with kodi to also update the kodi library and incorporate the new file and then play from the api. Scenario B is directly being able to send kodi "plugin://plugin.googledrive/?action=play&content_type=video&item_driveid=xxxxxxxx&item_id=xxxxxxxxx&driveid=xxxxxxxx" If I do it with a 303 response I gives error and marks me a 400 Bad request error If I could find a way to run "plugin://plugin.googledrive/?action=play&content_type=video&item_driveid=xxxxxxxx&item_id=xxxxxxxxx&driveid=xxxxxxxx" via api but I haven't found how to do it I have managed to play, browse kodi, send messages, but what I described before is not yet achieved. Thank you very much in advance and sorry for the inconvenience 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