Need to Re-Read NFO Files - How?
#1
I have an original AppleTV that Apple has dropped support for since iTunes 12.7.  I have loaded a custom build for the AppleTV located here: https://forum.kodi.tv/showthread.php?tid=313407

I have written a script that pulls all metadata out of the .mp4 along with the posterart, parses the iTunes.xml to get a list of unwatched Movies and TV Shows (included in the nfo file) puts them in separate folders on my mac, and optionally, uploads any new movies and nfo/png files to the AppleTV.  I then scan the media and everything is imported exactly how I want.

Here is my problem, I only use this AppleTV to take my media with me when I travel.  Therefore, I need to run my script to get the new media over to it and build the new NFO.  The issue comes in if I've watch a movie via iTunes.  Next time I run the script it will pick that up and tag the NFO file correctly, BUT how do I get Kodi to read it?  Basically, when I run my script, I want a way to delete everything Kodi knows about the previous scan.  I want it to remember the media folder, but I want it to re-read ALL NFO files.  Preferably, I would only want to rescan movies (or rescan TV Shows if that's what I need).  Ultimately, I'd be happy if it rescanned all media types (movies and tv shows).

How do I accomplish this?  Any way to do it from a python script from my mac?

Thanks.  Brian
Reply
#2
NFO files are a means to get information in to the library. Once the information is in the library, the nfo file has no real use anymore, except as backup. This means there is no simple "press one button" solution.

To update an individual movie with the new information in the NFO, call up the Movie Information page and select Refresh. When asked to "...Ignore..." select No.

To update an entire source involves a few more steps. 
  1. Go to Videos>Files and highlight your Source
  2. Call up the Context Menu
  3. Select Change Content
  4. Change This directory contains from Movies to None
  5. Answer NO to Do you want to remove all items...
  6. Go back and repeat Steps 1-5 with the following changes
    1. Change from None to Movies
    2. Answer YES to Do you want to refresh infomration...
  7. Repeat with other Sources
Hope that helps.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Thank you.  I definitely can appreciate that I'm trying to do something that, I guess most normal people wouldn't be doing.  lol!  I understood the purpose of the nfo's, just wasn't sure if there was a way to force a refresh (like clean the database, etc.).  This is what I was starting to think as well.  Not like it takes that long to rescrape local files. Smile

Do you know, maybe I need to post in a different spot, is there a way to do that via ssh?  If I can do that via command prompt (the removal and resetup of the media folder, scrapper, etc), then I should be able to script it in Python.

Thanks.  Brian
Reply
#4
You should be able to do what you want via python or the json interfaces, but how exactly you would do this is way beyond my knowledge.

[edit] this could be of assistance http://kodi.wiki/view/JSON-RPC_API/v8
Reply
#5
I can't find anything that wipes the data and sets up media folders.  Curious if I go at this from a different angle...

The databases that are used for Movie and TV Show metadata and thumbnails are: .kodi/Database/MyVideos99.db and Textures13.db, right?

What if I setup a fresh install, setup my media folders, but DO NOT UPDATE the library.  Copy those files (MyVideo99.db and Textures13.db) to a "safe location".  Then, each time I want to reload the database, I copy the two .db files and replace the current.  Then, rescan the library.  Think that would work?

Thanks.  Brian
Reply
#6
(2017-11-22, 00:10)bjhille Wrote: The databases that are used for Movie and TV Show metadata and thumbnails are: .kodi/Database/MyVideos99.db and Textures13.db, right?
That depends on what version Kodi you are using. See here... http://kodi.wiki/view/Version_table
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
Cool.  So, according to the link provided, I think this will work (I'm running Kodi version 16.1).  If I do copy databases back, that will remember my media paths, right?
Reply
#8
Maybe you should also take a look at this https://forum.kodi.tv/showthread.php?tid=129499 I've personally never used it so won't be able to help if you've any questions about it, but it would seem to me you could do a backup of Kodi in a fully configured state but before any media is scanned into the Libraries.
Reply
#9
(2017-11-21, 02:01)Karellen Wrote: NFO files are a means to get information in to the library. Once the information is in the library, the nfo file has no real use anymore, except as backup. This means there is no simple "press one button" solution.

To update an individual movie with the new information in the NFO, call up the Movie Information page and select Refresh. When asked to "...Ignore..." select No.

To update an entire source involves a few more steps. 
  1. Go to Videos>Files and highlight your Source
  2. Call up the Context Menu
  3. Select Change Content
  4. Change This directory contains from Movies to None
  5. Answer NO to Do you want to remove all items...
  6. Go back and repeat Steps 1-5 with the following changes
    1. Change from None to Movies
    2. Answer YES to Do you want to refresh infomration...
  7. Repeat with other Sources
Hope that helps.

Hi @Karellen , quick question: is this still the "preferred" way (currently running 19.4) to refresh local NFO's for both Movies and TV-Shows? I sometimes update the IMDB rating for both in my library which uses only NFO files, created by using a local media mangement tool. Since IMDB ratings change from time to time (especially after a new movie has been released and amount of ratings increase), I do this from time to time.

I know there is likely to be a reason for it, but I always wondered why these manual steps are necessary in order to re-populate the Kodi DB from local NFO's and why there is no button or some kind of more user friendly way of directly rescanning all local NFO's...
Reply
#10
(2022-10-06, 17:02)spinmaster Wrote: is this still the "preferred" way (currently running 19.4) to refresh local NFO's for both Movies and TV-Shows?
Yes it is. It is the same as removing a source and then adding it back, except you skip the step of actually removing the source.

(2022-10-06, 17:02)spinmaster Wrote: I sometimes update the IMDB rating for both in my library which uses only NFO files
It would be easier to use the LightIMDB addon... https://forum.kodi.tv/showthread.php?tid=316342

(2022-10-06, 17:02)spinmaster Wrote: but I always wondered why these manual steps are necessary in order to re-populate the Kodi DB from local NFO's and why there is no button or some kind of more user friendly way of directly rescanning all local NFO's...
No developer has seen the need, or had the time and motivation, to come up with a new method.
I would rather have the ability to export individual nfo files from Kodi developed first.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
Thanks @Karellen ! I will stick to the known process then for refreshing. The reason I don't want to introduce an addon is, that I use TinyMediaManager (TMM) locally on my Mac to keep my entire media library up to date, including updating IMDB ratings, etc. This should always stay as my single source of truth, so to say. Introducing another addon on my Kodi machine away from my Mac to update certain media attributes, would conflict with my TMM process. I could exclude ratings entirely in TMM and use the addon you mentioned, but I'm entirely fine with sticking to TMM and just refreshing the NFO's "manually" every other month, as described in the steps you confirmed.

Understood that a dedicated function for this is probably something only a small minority of Kodi users are interested in and that the development focus and priority is on other topics. Wink

Again, appreciate your support and help!
Reply

Logout Mark Read Team Forum Stats Members Help
Need to Re-Read NFO Files - How?0