lib/plugin/textfile.rb in serienrenamer-0.0.5 vs lib/plugin/textfile.rb in serienrenamer-0.0.6
- old
+ new
@@ -35,9 +35,13 @@
Dir.new(sourcedir).each do |e|
file = File.join(sourcedir, e)
next if File.size(file) > 128 || File.zero?(file)
data = File.open(file, "rb").read
+
+ # only files with one line with the title are interesting
+ next if data.lines.to_a.size > 1
+
if data != nil && data.match(/\w+/) &&
Serienrenamer::Episode.contains_episode_information?(data)
matched_episodes.push(data)
end
end