Kodi Community Forum

Full Version: When is NFO written?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Today I do have a question and a possible Feature Request.

After initial load and scrap into TMM the NFOs are written to disk. After that I put additional data into the NFO files (ISO details). At that point I don't want to loose this data.

1.) If I RMB (right mouse button) on a film and LMB on "Mark selected films as watched" the NFO seems to be written completely and my manually added data is gone.

2.) If I RMB on a film, LMB on "Edit film" and reset the checkbox "Watched" on the dialog the NFO seems to be written but my manually added data is still in there.

At some point I would like TMM to just write changed fields to the NFOs. Would this be possible? Perhaps an additional checkbox "Safe mode" in the global settings would be an idea here.

After reading several posts, it seems that some people manipulate the NFOs by hand ...

Thanks
can't reproduce...

1) we have the same read/write logic for every NFO access (there is no difference between the set watched action and the edit action)
2) we read the whole NFO before we "alter" it and the we write only changed fields.

It could be possible that your own tags get moved to the end of the NFO!
(2016-06-24, 20:47)mlaggner Wrote: [ -> ]we read the whole NFO before we "alter" it and the we write only changed fields.

Hmm, just did a test:

Double checked an existing NFO. The "streamdetails" "width", "height" and "durationinseconds" are set to "1920", "1080", and "7344". Now in TMM I RMB on a movie within the movie list and select "Mark selected movies as watched". After that at least the NFO values "watched" and "playcount" are changed BUT "width", "height" and "durationinseconds"are set to "0" as well.

TMM does not write changed fields in that case. It does write lots of fields - if not all - instead.

I'm on 2.8.1 snapshot from 20160621 2302.

Thanks.
the streamdetails (width, height, ..) are taken from mediainfo and only a hint for Kodi (Kodi replaces these infos with their own upon first play)
If you have a medium like a disc image (iso), we cannot extract width, height, ... and thus we write "nothing" to the NFO again
Thanks for your answer.

So "we write only changed fields" is not true. My problem is: Whenever I change something (say watched state) within TMM I have to "repatch" my values (say width/height) again.
another question: why do you have 0 in width/height?
Does getting mediainfo not work with your media?
I have ISO files only. TMM does set 0 for them, always.

With my own scripts I open the ISOs, call mediainfo and close the ISOs. I grab width, height, runtime, codecs and languages (audio, video, subtitle) from my ISOs and patch it into the NFO files.

Until this part everythings ok.

Now I set a movie to "Watched", nothing else. This results in a completely rewritten NFO. All my correct values are gone then.

This is what I try to explain - must be my bad english. A simple change like "Watched" shouldn't rewrite the complete NFO,

Just my humble opinion.
thanks for your assistance - I've found an issue in the NFO connector where the streamdetails got written every time (in you case with empty data)

will be fixed in the next version
Yes! Thank you very much.