From: Dobrica Pavlinusic Date: Sat, 10 Oct 2009 22:31:51 +0000 (+0200) Subject: create directories for slides by resolution X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=95e0f77a2a8c8583d5d5d710cdf6f4be78c4eff6;p=HTML5TV.git create directories for slides by resolution --- diff --git a/bin/mplayer.pl b/bin/mplayer.pl index 7d1797b..c067e7b 100755 --- a/bin/mplayer.pl +++ b/bin/mplayer.pl @@ -126,6 +126,18 @@ sub html5tv { write_file $sync_path, "var html5tv = " . to_json($html5tv) . " ;\n"; warn "sync $sync_path ", -s $sync_path, " bytes\n"; + if ( $prop->{width} && $prop->{height} ) { + foreach my $factor ( 1, 2, 4 ) { + my $w = $prop->{width} / $factor; + my $h = $prop->{height} / $factor; + my $path = "www/s/${w}x${h}"; + if ( ! -d $path ) { + mkdir $path; + warn "created $path\n"; + } + } + } + }