Bug Video Info Scraper only considers nfo files matching the movie file name
#1
System: LibreElec on Raspberry Pi2, Kodie 17.6, movies on samba network share (movie type), movie folder content: (movie_file_name.mkv, _imdb.nfo)
Problem: The Video Info Scraper only considers nfo files matching the movie file name, even if the folder only contains one movie file and one nfo file. As soon as I rename the nfo file to the name of the movie file, it works. Regarding the source code, it should also work with a nfo filename different from movie file name.

I've taken a look into VideoInfoScanner.cpp: CVideoInfoScanner::GetnfoFile(). As far as I understand, if "m_bIsFolder" is true, it should work with any nfo files within the folder (GetDirectory with parameter ".nfo") . "m_bIsFolder" should be true in the scenario above (or not?!) . But in my case, it only works, if I name the nfo file "movie_file_name.nfo"

I guess FileItem.cpp_ CFileItem::SetFromVideoInfoTag sets m_bIsFolder to false and it stays in that state.

This is the first time I had contact with the Kodi sources, so it is pretty hard for me to understand everything. I also have no debug environment and everything, just went thru the sources via GitHub... Maybe someone with a little bit more experience with Kodi can take a look into it?!

Regards

Arne
Reply
#2
Why?
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
(2017-12-03, 21:55)Karellen Wrote: Why?
Huh (Look, even one Letter less than your answer...)
Reply
#4
Ok, hows this?

Ignore thread.
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
#5
(2017-12-03, 22:38)Karellen Wrote: Ok, hows this?

Ignore thread.
Sorry, I dont get it. What is your question? It took me some time to look into this and write this thread. I tried to describe it as good as possible and your answer was neither helpful nor understandable.
Reply
#6
Ok,

I am interpreting your post as wanting to ignore naming conventions of nfo files completely, and allow you to name the file whatever you want, as long as it uses the nfo extension. If this is correct, then why do you want that? What possible benefit could that bring to Kodi and its user base.

We have naming conventions for many reasons. Many users keep backup copies of nfo files which would then make scraping from nfo files uncertain. Not only would Kodi need code changes (which won't happen) then all the dependent 3rd party software will need to modify their software. A big change because someone can't be bothered correctly naming their files.

Please correct me if I have completely misunderstood your post Smile
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
I just guess:
If you mean: "Why is this a problem?", my answer would be,
because it is in opposition to http://kodi.wiki/view/NFO_files#Parsing_nfo and it is obviously meant different in the source code (as far as I understand it and the comments within the code)

EDIT: Maybe the wildcard search (*.nfo) could be an option if no nfo with the same name is found? I'm currently using Mediaportal on my clients, which does it that way. It is a lot of work to migrate and (btw) not described anywhere that it has to be the same name - this was also reason why I made this post (pls. correct me if I'm wrong).
Reply
#8
Sorry, not following. How is the current naming convention in opposition to Parsing nfo files?
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
#9
We crossed posts. I'll answer your edit

Kodi cannot control, nor be responsible for how 3rd party software creates nfo files. If they advertise being compatible with Kodi, then it us up to the developers of that software to ensure they are truly compatible with Kodi. Not the other way around. Remember that Kodi does not need specific nfo software to function. Kodi can easily create its own nfo files.

You may not have read the wiki pages in full. Click on the attached pages from the menu box in the top right corner for a Media class. In those specific pages you will see the naming conventions.
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
#10
(2017-12-03, 23:16)Karellen Wrote: Sorry, not following. How is the current naming convention in opposition to Parsing nfo files?I 
The naming conventions does not say anything about that the nfo files has to have the same name like the movie. At least I didn't find it.

On http://kodi.wiki/view/NFO_files/Movies#Requirements it says "*.nfo", which was a hint for me, that something could be wrong.

After I looked into the source code, I saw that there is code for the case if "m_bIsFolder" is true. My interpretation was, that it should be true if the movie has an own folder and that that is the case in my szenario, but it wont work => bug


EDIT:
I'm referring to those comments/lines:

cpp:
// folders (or stacked dvds) can take any nfo file if there's a unique one
if (item->m_bIsFolder || item->IsOpticalMediaFile() || (bGrabAny && nfoFile.empty())) {
 // see if there is a unique nfo file in this folder, and if so, use that
Reply
#11
The names are here... http://kodi.wiki/view/NFO_files/Movies#nfo_Placement for movies.

A similar table exists in the other pages for the other media classes
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
#12
(2017-12-03, 23:35)Karellen Wrote: The names are here... http://kodi.wiki/view/NFO_files/Movies#nfo_Placement for movies.

A similar table exists in the other pages for the other media classes
You're right, maybe I was distracted by the fancy background color Smile - sorry

I also tried "movie.nfo", but it doesn't work. Only <MovieFileName>.nfo works.

Regarding the code, the condition:
cpp:
if (bGrabAny && !item->IsStack())
has to be true if movie.nfo should be used. bGrabAny is been set by "m_containsSingleItem = scanSettings.parent_name_root;" - seems to be a setting/configuration?! Do you know where to find it? I tested it with a freshly installed Kodi with default settings.

btw: In my opinion it is also a bug because of the code that wont be used (comment: folders (or stacked dvds) can take any nfo file if there's a unique one).
Reply
#13
hehe, no problems. I was just trying to brighten up the page with colours. As long as you see it now.

As for your other questions, I am not a developer so they are outside my field. Hopefully one of the developers will see and comment.

Just keep in mind that there is a different naming convention depending upon your file/folder structure, and that is what that table shows. Unless you are preserving DVD or BluRay structures, then <MovieFileName>.nfo is the way to go.
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

Logout Mark Read Team Forum Stats Members Help
Video Info Scraper only considers nfo files matching the movie file name0