lib/movie-renamer.rb in movie-renamer-0.0.21 vs lib/movie-renamer.rb in movie-renamer-0.0.22
- old
+ new
@@ -167,9 +167,11 @@
m.send e[0], eval("$" +(i+1).to_s)
end
#m.title = $year
#m.director = $director
#m.year = $title
+ if m.title == nil
+ m.title = MovieRenamer::titleExtract(filename)
return m
end
# attempt to remove the divx part from a filename
def MovieRenamer::titleExtract(filename)
r1 = %r{\s*\[?\(?\s*[dD](i|I)(v|V)(x|X)\s?(-|_)?\s?\w+\s*\)?\]?\s*}