Is there something like <tvshowmatching> for movies?
#1
Hi. Quick question: Is there a way to change what the scraper looks for easily when adding movies to the library? Similar to what there is for tv shows. To make it look for "movie.year.ext" instead of "movie (year).ext".

I dislike having spaces in my filenames, for multiple reasons (mainly because it's a pain to either have to quote everything or backslash the spaces when working with the files).
Instead of the filenames having to be "This is a movie (year).ext", or in my case, "This.is.a.movie (year).ext", I would like to have the scraper (TMDB in this case) to look for "This.is.a.movie.year.ext". Do I have to edit the scraper for this? If so, I guess I'll post a feature request.

Thanks.
Reply
#2
I found a workaround I think. Since I have each movie in separate folders it searches for the folder name, so the filename has nothing to do with it, but the folder name does.

I found this regex in this thread: http://forum.kodi.tv/showthread.php?tid=...pid1418461
Code:
(.*[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-1][0-9])([ _\,\.\(\)\[\]\-]|[^0-9]$)

I have a feeling this regex has changed since the post was made, a lot happens in two years, but I cannot find it in the source code (not sure where to look really, and cannot find it with a search), but trying it out it seems it matches
Code:
MovieTitle.Year.
but not
Code:
MovieTitle.Year
(notice, no dot after Year). This doesn't really make sense to me. For a filename, sure, but for a folder? No.

Same thing with parenthesis. Matches "(year)" but not "(year". This does make sense.

Seems there has to be something at the end for it to work.
So, I tried renaming my folders from
Code:
MovieTitle (Year)     ---->     MovieTitle.Year.
seems to do the trick. So I guess that regex is in use in some way.

Not pretty having a dot after each folder name, but it works. Smile

A bug in my eyes, I'll post an issue and see if anyone agrees.
Reply
#3
Please enable debug logging in system settings and reproduce the issue. After that, pastebin the entire kodi.log so we can check what's going on.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Will do when I get home. I'm running kodi in openelec on a pi2, so it's not the latest version, but iirc it's the same on my test setup on Windows with a more recent nightly.
Reply
#5
I created the following folders on the NFS server:
Code:
/storage/filmer/test
(22:02) $ ls
Evan Almighty (2007)/  Rain Man (1988/  Ice.Age.2002./  Gone.in.60.seconds.2000/  Rush.Hour.2 (2001/  Dumb.Dumber (1994)/

Some variations, but IMO at least Evan Almighty, Ice Age, Gone in 60 seconds and Dumb Dumber should be found. The ones missing the closing parenthesis I can see why they are not working. However, it only finds Evan Almighty, Ice Age and Dumb Dumber. Not Gone in 60 seconds, which I think is wrong?

This is what the log says on my windows test computer running latest nightly as of today (KodiSetup-20150807-7909aa4-master.exe):
Code:
22:15:04 T:4136   DEBUG: VideoInfoScanner: Scanning dir 'nfs://192.168.1.65/nfs/videos/movies/test/Gone.in.60.seconds.2000/' as not in the database
22:15:04 T:4136   DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'nfs://192.168.1.65/nfs/videos/movies/test/Gone.in.60.seconds.2000/Gone.in.60.seconds.mp4'
22:15:04 T:4136   DEBUG: ADDON::CScraper::FindMovie: Searching for 'Gone in 60 seconds 2000' using The Movie Database scraper (path: 'D:\Thomas\Portabla program\Kodi_isengard\portable_data\addons\metadata.themoviedb.org', content: 'movies', version: '3.8.4')
22:15:04 T:4136   DEBUG: scraper: CreateSearchUrl returned <url>http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=Gone%20in%2060%20seconds%202000&amp;year=&amp;language=sv</url>
22:15:04 T:4136   DEBUG: CurlFile::Open(0A4F3D50) http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Gone%20in%2060%20seconds%202000&year=&language=sv
22:15:04 T:4136   DEBUG: CScraperUrl::Get: Using "UTF-8" charset for "http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Gone%20in%2060%20seconds%202000&year=&language=sv"
22:15:04 T:4136   DEBUG: scraper: GetSearchResults returned <results></results>
22:15:04 T:4136   DEBUG: ADDON::CScraper::FindMovie: Searching for 'Gone.in.60.seconds.2000' using The Movie Database scraper (path: 'D:\Thomas\Portabla program\Kodi_isengard\portable_data\addons\metadata.themoviedb.org', content: 'movies', version: '3.8.4')
22:15:04 T:4136   DEBUG: scraper: CreateSearchUrl returned <url>http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=Gone.in.60.seconds.2000&amp;year=&amp;language=sv</url>
22:15:04 T:4136   DEBUG: CurlFile::Open(0A4F3D50) http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Gone.in.60.seconds.2000&year=&language=sv
22:15:04 T:4136   DEBUG: CScraperUrl::Get: Using "UTF-8" charset for "http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Gone.in.60.seconds.2000&year=&language=sv"
22:15:04 T:4136   DEBUG: scraper: GetSearchResults returned <results></results>
22:15:04 T:4136 WARNING: No information found for item 'nfs://192.168.1.65/nfs/videos/movies/test/Gone.in.60.seconds.2000/Gone.in.60.seconds.mp4', it won't be added to the library.
22:15:04 T:4136   DEBUG: VideoInfoScanner: No (new) information was found in dir nfs://192.168.1.65/nfs/videos/movies/test/Gone.in.60.seconds.2000/

Full log here: Windows debug log

And here's the RPi2/Openelec log, which looks basically the same: RPi2 debug log


Let me know if you need anything else!
Reply
#6
Just updating this thread to add that this has been fixed, in case anyone sees this and for some reason it still doesn't work for them.
It was added from this pr: https://github.com/xbmc/xbmc/pull/7861

I tested it on windows, and it works like a charm.

Thanks mkortstiege (and anyone else involved) for the quick fix!
Reply
#7
Glad to hear Wink Thanks for reporting back.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Is there something like <tvshowmatching> for movies?0