Ticket #6474: imdbpy_plot_2.patch
File imdbpy_plot_2.patch, 1.1 KB (added by , 15 years ago) |
---|
-
mythplugins/mythvideo/mythvideo/scripts/imdbpy.py
19 19 try: 20 20 import imdb 21 21 except ImportError: 22 print"You need to install the IMDbPy library "\23 "from (http://imdbpy.sourceforge.net/?page=download) "22 sys.stderr.write("You need to install the IMDbPy library "\ 23 "from (http://imdbpy.sourceforge.net/?page=download)\n") 24 24 sys.exit(1) 25 25 26 26 try: … … 328 328 #print "%d plots found" % len(plots) 329 329 for plot in plots: 330 330 text = plot.split("::")[1] 331 if shortest_found == None or len(text) < len(shortest_found): 332 shortest_found = text 331 if text.find('@') != -1 or len(text.split(' ')) < 10: # Skip plots of less than 5 words 332 continue 333 # Use word count as the method to identify the smallest plot 334 if shortest_found == None or len(text.split(' ')) < len(shortest_found.split(' ')): 335 shortest_found = text 333 336 metadata.plot = shortest_found 334 337 335 338 cast = movie.get('cast')