v19 [SOLVED] How to "Typing" numbers during video to jump to the right time position? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: v19 [SOLVED] How to "Typing" numbers during video to jump to the right time position? (/showthread.php?tid=363129) |
[SOLVED] How to "Typing" numbers during video to jump to the right time position? - hunadamka - 2021-06-15 (Windows x64 matrix 19.1) Hi guys, Sry for my english! I was wondering if it would be possible to type numbers via Curl while playing video? I was thinking about e.g. 02342,Return this would jump to the 23:42 time position of the video i'm still learning about this json-rpc so far i'm at the point where i can update the video library with this line in batch file .bat @echo off curl -i -X POST -d "{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\": \"mybash\"}" -H "content-type:application/json" http://kodi:kodi@localhost:8080/jsonrpc pause output: HTTP/1.1 200 OK Connection: Keep-Alive Content-Type: application/json Content-Length: 45 Cache-Control: private, max-age=0, no-cache Accept-Ranges: none Date: Tue, 15 Jun 2021 18:12:30 GMT {"id":"mybash","jsonrpc":"2.0","result":"OK"} I found a very similar thread but no reply there JSON command to seek at a specific time if anyone has any advice or ideas, even if not with curl but in some other way, I would be happy to hear them! RE: How to "Typing" numbers during video to jump to the right time position? - hunadamka - 2021-06-20 I finally solved it but in a little different way with this example I have saved the position of the video 27:45 change to 2745{enter} save.bat Code: cd kodi with this save.bat I evaded the access denied error message save-pos.bat Code: cd kodi and this will type this 2745{enter} directly into the screen of the kodi load-pos.bat Code: @echo off then I added keyboard.xml to the two buttons of my remote control Code: <f1 mod="ctrl,alt">System.ExecWait(""c:\kodi\save-pos.bat"")</f1> requirements: WinSendKeys.exe xidel.exe docker desktop singlefile-dockerized RE: [SOLVED] How to "Typing" numbers during video to jump to the right time position? - hunadamka - 2021-07-06 With difficulty but I succeeded re-writing it in python and no more pop-up window just copy the pynput folder from this file pynput-1.7.3.tar.gz (under lib directory) to where the .py files are and you need to rewrite your ip,port,user and pass after saving the position, these will appear in the save.txt file example: full path to the video file 003908 Mr. & Mrs. Smith (the title of the video is just for information only, nothing to do with it) because save.py also creates a bookmark with position it only works under Kodi add to the buttons (keyboard.xml) Code: <keymap> if your skin supports it, you can add this command and launch it from the main screen RunScript("c:\sleepy\load-pos.py") save-pos.py Code: import json load-pos.py Code: import requests for anyone who finds it easier I put it on MEGA |