Posts: 11
Joined: Jan 2023
Reputation:
0
Hi,
It seems Kodi cannot parse file names like ThisMovieName2010-1080x5.1.mpv, or movies with THIS_MOVIE_NAME.vob, etc. Kodi found 360 of my 960 movies, and I am not going to rename them, so I wrote a quick and dirty script to write .nfo files for each movie.
This works great, I now have all my movies with the correct title, however there is NO metadata. When I try to look it up (and this is a really stupid feature, if you ask me), it puts the movie filename in the space instead of the title. This is again unusable.
Does anyone know of any plugins or some box I've missed that will meld the nfo title and go find the meta data from the online db? It's pretty sad that one of the most important features, that of finding and adding metadata for media it seems it is very immature. I would expect this from alpha or perhaps beta software, but not something that has been around as long as Kodi.
Posts: 11
Joined: Jan 2023
Reputation:
0
My nfo files are like this, if it matters.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><movie><title>The Movie Name</title></movie>
Posts: 11
Joined: Jan 2023
Reputation:
0
For Real? I have to look the title up manually? What's the purpose of Kodi, then? Are you really serious? This is truly the best way?
There is nothing wrong with the .nfo files I did create with a simple bash script because it allowed Kodi to find the other 630 files it originally missed, so I both have movies and the correct titles, and they do play.
If I have to manually look up the movies, I may as well continue with my original endeavor and install Alpine.
I'm grateful CoreElec gave me a stable video driver and sort of stable player on the Le Potato (clearly mvp based, not mplayer...it would be nice to have a choice), but it has this thing called Kodi that I forever find myself confronted with the words Wisky Tango Foxtrot.
Then there is this other part of me that sees a glaring problem and thinks I should find a solution....
Posts: 11
Joined: Jan 2023
Reputation:
0
It's unfortunate that that the first answer was the first answer. I presumed that was my only course. Yours is a far better answer. It's nice to have options.
I suppose I am used to writing software that tries very, very hard not to fail, and at the very least it would be nice if the parser could handle capitalization, and, hey, part of the title, but I digress.
It's not disrespect for the author, I appreciate that someone bothered to respond at all, and I am grateful for that. It is directed towards the software, rather, or perhaps it's lack thereof, and my frustration in general with it as a user.
I might have a look at the parser. Any clues on where to start? Source, repo? I'm sure I can eventually find it, but a pointer would be appreciated.
Thanks
Posts: 11
Joined: Jan 2023
Reputation:
0
that looks like a demo, not the real deal.
Posts: 3,733
Joined: Jan 2023
Reputation:
360
in the tmdb addon from the link
python/scraper.py: line 168, function run()
it calls search_for_movie
search_for_movie is defined on line 29:
def search_for_movie(title, year, handle, settings):
so between run() and search_for_movie(title, year, handle, settings) would be where you can inject a custom parsing
or within search_for_movie have it clean up the name before line 31:
title = _strip_trailing_article(title)
so it would be more like
31: title = cleanmyfilename(title,year)
32: title = _strip_trailing_article(title)
then you can define your own function
def cleanmyfilename(title,year):
return title.replace("_"," ") # or some regex, etc and so on until it meets your needs based on your filenames
Posts: 463
Joined: Aug 2010
Reputation:
14
Why is writing a script to rename your files and/or fix the file structure not an option? It would seem at worst no different level of effort than changing the program code, especially since you seem to have programming experience.
Just curious.
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U