projects
/
booh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
effa118
)
new gen_video_thumbnail because of transcode->mplayer switch
author
gc
<gc>
Sat, 9 Feb 2008 22:31:24 +0000
(22:31 +0000)
committer
gc
<gc>
Sat, 9 Feb 2008 22:31:24 +0000
(22:31 +0000)
bin/booh-classifier
patch
|
blob
|
history
diff --git
a/bin/booh-classifier
b/bin/booh-classifier
index b0bde2f86ddcc999bb15cf7a5282e45d8dba9bbd..b82e364703016c38e8c208dee8afb8e06b3ffd83 100644
(file)
--- a/
bin/booh-classifier
+++ b/
bin/booh-classifier
@@
-375,11
+375,11
@@
class Entry
tmp.close!
Dir.mkdir(dest_dir = tmp.path)
orig_base = File.basename(path)
tmp.close!
Dir.mkdir(dest_dir = tmp.path)
orig_base = File.basename(path)
-
if ! gen_video_thumbnail(path, dest_dir, orig_base
, false, 0)
- cleanup_dir(dest_dir)
+
tmpdir = gen_video_thumbnail(path
, false, 0)
+ if tmpdir.nil?
return
end
return
end
- image_path = "#{
dest_dir}/#{orig_base}.jpg000000
.jpg"
+ image_path = "#{
tmpdir}/00000001
.jpg"
else
image_path = @path
end
else
image_path = @path
end
@@
-388,6
+388,11
@@
class Entry
rescue Gdk::PixbufError
msg 0, "Cannot load #{image_path}: #{$!}"
return
rescue Gdk::PixbufError
msg 0, "Cannot load #{image_path}: #{$!}"
return
+ ensure
+ if @type == 'video'
+ File.delete(image_path)
+ Dir.rmdir(tmpdir)
+ end
end
if @pixbuf_full
if @angle.nil?
end
if @pixbuf_full
if @angle.nil?