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


Force update of video media info - activoice - 2019-04-14

I've replaced some of my SD videos with HD equivalents, and in some cases I have replaced 720p versions with the 1080p version.. But I can't find any way to update this when looking at the movie information. 

I have tried removing the video from the library, and doing a video library cleanup, then updating the library, but the video is added back with the original video reolution..

Is there any way to update the video information in the database other than deleting the video database file and rescanning... Or is there a program add on that does this?


RE: Force update of video media info - whysoserious - 2019-04-14

(2019-04-14, 23:23)activoice Wrote: I've replaced some of my SD videos with HD equivalents, and in some cases I have replaced 720p versions with the 1080p version.. But I can't find any way to update this when looking at the movie information. 

I have tried removing the video from the library, and doing a video library cleanup, then updating the library, but the video is added back with the original video reolution..

Is there any way to update the video information in the database other than deleting the video database file and rescanning... Or is there a program add on that does this?
I think this "bug" has been fixed in Kodi 18.2 (soon to be released, I hope). At least, I've had this same issue but when I played with a 18.2 RC version a few days ago I could update the media info by playing the video in question for a few seconds then stopping it. After doing this, the media flags (resolution, audio, etc.) were updated.


RE: Force update of video media info - activoice - 2019-04-14

(2019-04-14, 23:32)whysoserious Wrote:
(2019-04-14, 23:23)activoice Wrote: I've replaced some of my SD videos with HD equivalents, and in some cases I have replaced 720p versions with the 1080p version.. But I can't find any way to update this when looking at the movie information. 

I have tried removing the video from the library, and doing a video library cleanup, then updating the library, but the video is added back with the original video reolution..

Is there any way to update the video information in the database other than deleting the video database file and rescanning... Or is there a program add on that does this?
I think this "bug" has been fixed in Kodi 18.2 (soon to be released, I hope). At least, I've had this same issue but when I played with a 18.2 RC version a few days ago I could update the media info by playing the video in question for a few seconds then stopping it. After doing this, the media flags (resolution, audio, etc.) were updated. 
Ok great, I was pretty sure that in Krypton playing the video forced this update, but couldn't say for sure.. It definitely doesn't work in the current version of Leia. 

Thanks


RE: Force update of video media info - Karellen - 2019-04-15

Fixed... https://github.com/xbmc/xbmc/pull/15589

Also similar issue... https://github.com/xbmc/xbmc/issues/15896


RE: Force update of video media info - ellekz - 2019-12-30

(2019-04-15, 00:40)Karellen Wrote: Fixed... https://github.com/xbmc/xbmc/pull/15589
I'm on v18.5 and for me playing the video file still won't update its information (resolution, codec, etc.) This used to work in v17. Was the above fix reverted again or something or am I doing something wrong?
The only way to do it now is to press "Refresh Information" which will unfortunately also replace my custom posters, fanart etc. Sad


RE: Force update of video media info - Karellen - 2019-12-30

(2019-12-30, 19:44)ellekz Wrote: The only way to do it now is to press "Refresh Information" which will unfortunately also replace my custom posters, fanart etc.
Unfortunately that is the only way to do it now. I am not sure why this method was chosen as it is very frustrating, but that is what we have.

The other solution is to export your library to nfo files. Open the nfo file for the affected movie and delete the <fileinfo></fileinfo> and everything in between. Then Refresh the movie back into the library using the local file. This forces Kodi to re-read the video file, but keep your existing library information from the nfo file.


RE: Force update of video media info - ellekz - 2019-12-31

(2019-12-30, 20:45)Karellen Wrote: Unfortunately that is the only way to do it now. I am not sure why this method was chosen as it is very frustrating, but that is what we have.

Indeed. Maybe we could add a function to the Python library or to the List of built-in functions that updates this information for a specified file? This way a script or small addon could be written that updates that info automatically.


RE: Force update of video media info - Karellen - 2019-12-31

I don't know how that works, but you could make a feature request in the Development forum for a new built in function. Or if you know what has to be done a PR contribution would see it happen a lot faster.


RE: Force update of video media info - z3us - 2022-04-22

I have a similar question. Kodi didn´t grab the media info of a lot of entries (probably due to cloud storage issues). 
1- Is it possible to force kodi to update the mediua info of these files?
2- Or, how can I delete all these entries from my library so I can rescan?

Thx


RE: Force update of video media info - Karellen - 2022-04-22

(2022-04-22, 01:08)z3us Wrote: (probably due to cloud storage issues). 
You probably need to explain your setup first before we can provide steps.
Where is your media located and how do you access it?


RE: Force update of video media info - z3us - 2022-04-23

My kodi is coreelec
Media is stored in google drive, mounted using rclone. Some videos get the media info correctly, but most of the files dont
I don´t want to ask for the reason of this. Probably some google transfer restrictions. I just want to know how can I rescan the missing media info , or delete only those entries of my library


RE: Force update of video media info - Jogee - 2022-04-23

Unless you res-scrape your entire library (which isn't a guarantee), you would have to remove or update the items manually, so far that I have found.  A manual update from the GUI does require a few steps each time -- info for the movie, move to refresh, enter, select yes.

I ended up writing a small script to do those steps with one button.  Totally not elegant, but reduces the annoyance of the repetitive button presses.  But it is still a manual keypress once for every item.


RE: Force update of video media info - z3us - 2022-04-26

can u share that script?
Thx


RE: Force update of video media info - Jogee - 2022-04-26

If you find it useful, sure.  It's just a sequence of keystrokes using built-in functions in a python script that I bound to a key with a Keymap.  It only gets you as far as searching/confirming the movie.  It might be skin dependent, though -- I use Estuary (default skin).

It assumes you are in the video library with a movie highlighted.  The script will basically mimic you: pressing "i" on your keyboard, moving to the "Refresh" button, press enter, wait a second, move left to "Yes" and press enter.

Initiate by pressing "r".  You'll be presented with the normal window to pick the correct movie or manually search.

You will need to create a keyboard.xml and the actual script.  Follow the Keymap wiki for where to put the keyboard.xml.  The script will go into your Userdata folder, or profile folder if you are using profiles.

keyboard.xml
xml:
<keymap>
    <Videos>
        <keyboard>
            <r>RunScript(special://profile/refreshmovie.py)</r>
        </keyboard>
    </Videos>
</keymap>

refreshmovie.py
python:
import xbmc
import time

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

Any info you need is in the wiki.  Including how to modify it.  Of course there is no warranty Smile.


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

I modified your script slightly to refresh from the existing NFO and Artwork..  Is there a command I can add at the end to back out to the previous menu (the equivalent of pressing the Escape key)

-
import xbmc
import time

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