Re:MDB: IMDB data for a folder of movie files. Sort by ratin...
by jimmyjim on Sunday July 08, 2012 @01:22PM
(#4215032)
Out of curiosity, how? Regex matching? Does it miss a good amount of times or what?
[ Parent
| on HN ]
Re:MDB: IMDB data for a folder of movie files. Sort by ratin...
by legaloslotr on Sunday July 08, 2012 @01:29PM
(#4215052)
Yeah mostly regex. Plus some heuristics. Works most of the times. Pretty efficient for the simple amount of heuristics it uses.
You can see the code here https://github.com/legalosLOTR/mdb/blob/master/MDB/DBbuilder...
Check out the function get_movie_name!
Re:MDB: IMDB data for a folder of movie files. Sort by ratin...
by wingerlang on Sunday July 08, 2012 @02:41PM
(#4215237)
Wouldnt this break a movie like 2012?
#2 remove year and stuff following it
filename = re.sub('\d\d\d\d.*', ' ', filename)
Re:MDB: IMDB data for a folder of movie files. Sort by ratin...
by legaloslotr on Sunday July 08, 2012 @03:18PM
(#4215338)
Yeah it totally would! Thanks for pointing this out.
Btw, I am planning to use another library that has better detection rates - https://github.com/wackou/guessit