Ticket #6219: imdb_script.patch
File imdb_script.patch, 1.3 KB (added by , 16 years ago) |
---|
-
imdbpy.py
327 327 shortest_found = None 328 328 #print "%d plots found" % len(plots) 329 329 for plot in plots: 330 text = plot.split("::")[1] 330 #IMDbPY 3.9 doesn't order the content of plot like earlier version of IMDbPY. 331 # IMDB 3.6 is : plot_content::author 332 # IMDB 3.9 is : author::plot_content 333 #So we assume that should one side longer than the other, it's actually where the description is 334 splitvalue = plot.split("::") 335 if len(splitvalue[0]) > len(splitvalue[1]): 336 text = splitvalue[0] 337 else: 338 text = splitvalue[1] 331 339 if shortest_found == None or len(text) < len(shortest_found): 332 340 shortest_found = text 333 341 metadata.plot = shortest_found -
find_meta.py
153 153 lowest_cutpoint = pos 154 154 155 155 title = title[0:lowest_cutpoint] 156 # Remove trailing year in the form of "name [year]" or "name (year)"if any 157 m = re.compile(r"(.*)([\(\[]([0-9]+)[\]\)])$") 158 found = m.match(title.strip()) 159 if found: 160 title = found.group(1) 156 161 return title.strip() 157 162 158 163 def parse_meta(variable, oldvalue, emptyvalue="", meta=""):