Kodi Community Forum
Force update of video media info - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Video Support (https://forum.kodi.tv/forumdisplay.php?fid=264)
+--- Thread: Force update of video media info (/showthread.php?tid=343011)

Pages: 1 2


RE: Force update of video media info - izprtxqkft - 2024-02-27

(2024-02-27, 04:24)activoice Wrote: Is there a command I can add at the end to back out to the previous menu

pretty sure there's nothing fancy about doing this

xbmc.executebuiltin("Back")

or

xbmc.executebuiltin("PreviousMenu")


RE: Force update of video media info - activoice - 2024-02-27

(2024-02-27, 04:58)izprtxqkft Wrote:
(2024-02-27, 04:24)activoice Wrote: Is there a command I can add at the end to back out to the previous menu

pretty sure there's nothing fancy about doing this

xbmc.executebuiltin("Back")

or

xbmc.executebuiltin("PreviousMenu")

I tried that already, didn't work, and adding that breaks the script function.  It stops a step earlier which is why I came here to ask.


RE: Force update of video media info - izprtxqkft - 2024-02-27

(2024-02-27, 05:45)activoice Wrote: I tried that already, didn't work

kinda wish you would have mentioned that before i wasted my time suggesting it ..


RE: Force update of video media info - Jogee - 2024-02-28

I don't have access to my setup so I can't say if this will work or not.

Technically, the escape key (ESC) is "Previous menu OR Home screen" according to the keyboard controls wiki.  I think that it would therefore match more closely with the PreviousMenu Action ID.  So maybe try xbmc.executebuiltin('Action(PreviousMenu)') instead.

I don't see how that would work and Back not work, honestly.  But there are differences in how the two react, so I would say it's worth a try.

If that doesn't work, post your entire script.  Maybe there is an error that someone else can spot.  Try to use the Insert Syntax button in the editor (should look like </>)when posting as it will make reading the script easier.


RE: Force update of video media info - activoice - 2024-02-28

Still doesn't work, here is the script that I've got:

Script:
import xbmc
import time

xbmc.executebuiltin('Action(Info)')
xbmc.executebuiltin('SetFocus(6)')
xbmc.executebuiltin('Action(Select)')
time.sleep(1)
xbmc.executebuiltin('Action(Select)')
xbmc.executebuiltin('Action(PreviousMenu)')

So what I'm trying to achieve is

Go to the INFO screen
Click the Refresh Button
Select NO to the question - Locally stored information found. Ignore and refresh from internet

It works up to that point and reloads the information from the NFO, and loads the locally stored Fanart and Poster 

Then I want it to simulate ESC or do what ESC does and back out back to the video titles, but can't get it to do that.  The final line seems to get ignored.


RE: Force update of video media info - Jogee - 2024-03-03

You will have to add a sleep command before the Action(Previousmenu) command.  It's probably executing that command before Kodi is ready, and thus ignoring it or making it look like it doesn't work.  Similar to why I had to put a time.sleep for one second in my original script.

Add a second or two sleep and that might help.


RE: Force update of video media info - activoice - 2024-03-03

Ok so between steps 8 and 9 add something like

time.sleep(2)


RE: Force update of video media info - Jogee - 2024-03-08

Yup.  You might have to increase the value, though.


RE: Force update of video media info - activoice - 2024-03-08

(2024-03-08, 21:16)Jogee Wrote: Yup.  You might have to increase the value, though.

Thanks for your help using a value of 2 worked great.