Script to automatically create .nfo files for Kodi.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Script to automatically create .nfo files for Kodi.
Hello,
I have quite a specific issue that I was hoping you guys might be able to help me with.
I have masses of TV recordings that I want to view via Kodi, in Library mode, but I cannot just use the inbuilt scraper as it seems to be picking up lots of incorrect shows and about a third of the shows are not being picked up at all.
The way round this is to have an .nfo file for each show, that Kodi can use to add the file to the library.
Is there any way that I can automatically create an .nfo file for each recording?
Here is some information on how to manually create NFO files. python might be the easiest way to create the files although it depends on your programming skills.
Why re-invent the wheel? try TMM (tiny media manager). I have found it useful for both Kodi and Emby. It also allows you to download the associated media and subtitles to the same folder as the videos. It also automatically sorts Box Sets out for movies, and can rename files to fit the Kodi criteria.
Why re-invent the wheel? try TMM (tiny media manager). I have found it useful for both Kodi and Emby. It also allows you to download the associated media and subtitles to the same folder as the videos. It also automatically sorts Box Sets out for movies, and can rename files to fit the Kodi criteria.
So just to clarify, can TinyMediaManager create an NFO without scraping the information from any internet source first - i.e. can it work purely on the filename?
Out of interest, can I just ask why you are using TMM if you are also using Emby? I was under the impression that they do the same thing.
I use kodi on android tv boxes, which seem to regularly 'lose' the media libraries, and I have to re-add and re-scrape. Even with nfo files, this can be a lengthy process; so lengthy, in fact, that on my FireTV box, it goes to sleep and you have to keep re-starting the scraping. I found TMM and it helped a lot. It is so frustrating though, that I ended up opting for the Server/Client model instead. Using Emby also lets me run Trakt from a central location. Emby also gives me the advantage that I can add content to Kodi that just can't be scraped at all; any tv shows that aren't on tvdb, and films that aren't on themoviedb, I just shove into a folder called "unfound/TV" or "unfound/movies", and add them as "Mixed Content". I've also done it for Football matches (soccer, if you are American) and binaural audio.
The BIG advantage of TMM, is that if the standard scrapes (tvdb for TV & themoviedb for movies) don't find your film or series, you can select trakt or imdb, and it writes that to the nfo. Whichever method I use (emby or kodi), I now have about a 95% success rate for movies and tv. Given that I am into obscure things like 1970s Czechoslovakian science fiction and Chinese martial arts fantasy stuff, that's pretty good.
I have a central, headless server, that does all my recording via TVHeadend (I have Openmediavault as the OS).
I use MYSQL on the server to keep all my watched statuses and libraries synced.
About 90% of everything that gets watched in my household is recorded from Freesat.
I have TVHeadend save its filenames in a Kodi-compliant away and then have the recording folder automatically scraped into Kodi's TV Shows library.
Unfortunately, this does not really work very well - masses of shows never show up in the library and lots of others get picked up as incorrect series.
If you are getting 95% with 1970s Czechoslovakian SF (by the way, that is marvellously niche!), I should be getting around 100% with the more mainstream stuff that we watch.
Is TinyMediaManager something I could install on the headless server and just let it do its thing or is there quite a lot of intervention involved from a user?
OHHHHHH you really need to check out Emby. There is a TVHeadend plugin for TV recording. Then there are 2 different methods of getting Emby content into Kodi:-
1) Embycon - This is a remote connect to the Emby server.
2) Emby for Kodi - Hijacks all the Kodi databases and works as though it is native Kodi data.
The only downside is that there is a small fee for Emby 'Premiere', which you would need to access the TVHeadend stuff across the network through Emby, though most other functionality works out of the box.
TinyMediaManager - I don't think there is any way to get it to run on a headless server, but if the media on it is on network shares, you can easily run it across the network - You would set up your TV and movie folders, and it will do a lot of the scanning itself. Then you have to go through a process of identifying the programs, MOST of which will be automatically picked up, if you follow the naming conventions that Kodi asks for, MOST will be alright. You then just need to scan the list to see which ones are wrong, and which ones aren't identified at all. If it doesn't pick them up from themoviedb or tvdb, just try the other sources from the dropdown.
In the worst case scenario, with foreign language tv, which often have multiple names in multiple languages, I searched IMDB for them, and copied and pasted the imdb ID into the search box (ttxxxxxx from the url) into the search box and it finds them no problem. I would say that it probably took a couple of hours to go through 7000 films and about 1500 series, maybe a little longer. In my case, since I use Trakt, I donated to TMM, to get the additional functionality, which also imported my watched status from trakt, which it also wrote to the nfo files.
Obviously, in your case, whenever you record something new, you would have to scan for that as well, but you are talking about a minute or 2, every week or more.
Have been checking out Emby and it looks amazing - it seems to solve all the issues I have.
Videos can be added to the library (with Emby for Kodi), without having to scrape them first or create an NFO, so I would not need anything like TMM at all.
The one thing I cannot quite get my head around is the TVHeadend plug-in.
What is the difference between using Kodi with both TVHeadend and Emby Plugins installed, vs just the Emby Plugin (which in turn uses its own Plugin for TVHeadend)?
To be honest, if you have TVHeadend installed and working OK, then there is little point in moving that part over. The main advantage is that it makes it an "All-in-one" solution. The only real advantage would be that with Emby, you can also set it up to access everything remotely (either by IP Address, or by using a dynamic DNS service).
The latest version of Emby has made some pretty big improvements to its ffmpeg stuff, so once a program is recorded, you can set it up to process the file to make it a bit less bulky.
If you are excited by Emby, have a look at the Embuary skin for Kodi, which is pretty finely tuned to integrate the emby functionality. It makes it SUCH a rich experience.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.