gonzopi

git clone https://git.tarina.org/gonzopi
Log | Files | Refs | README | LICENSE

filmpage.html (3110B)


      1 $def with (films, film, scenes, str, filmfolder, counttakes, countshots, shots, scene, takes, shot, take, checkvideo,randhash)
      2 $ video = ''
      3 $if take != None:
      4     <h1>$film | scene $scene | shot $shot | take $take</h1>
      5     $ video = '/'+filmfolder + film + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3) + '/take' + str(take).zfill(3) + '.mp4'
      6 $elif shot != None:
      7     <h1>$film | scene $scene | shot $shot</h1>
      8     $ video = '/'+filmfolder + film + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3) + '/take' + str(takes).zfill(3) + '.mp4'
      9     $ take = takes
     10 $elif scene != None:
     11     <h1>$film | scene $scene</h1>
     12     $ video = '/'+filmfolder + film + '/scene' + str(scene).zfill(3) + '/scene.mp4'
     13 $elif film != '':
     14     <h1>$film</h1>
     15     $ video = '/'+filmfolder + film + '/' + film + '.mp4'
     16 
     17 $if video != '':
     18     <br>
     19     <h3><a href="javascript:history.back()">Go Back</a></h3>
     20     <br>
     21     $ picture = checkvideo(video,filmfolder,film,scene,shot,take)
     22     $if picture[1] == 'video':
     23         <video width="80%" controls>
     24         <source src="$video?$randhash" style="width:80%; max-width:500px;"  type="video/mp4">
     25         Your brower is caput
     26         </video>
     27     $elif picture[0] != '':
     28         <img style="width:80%;" src="$picture[0]?$randhash"/>
     29     $elif picture[1] == '':
     30         <pre>video not rendered</pre>
     31         <a href="">render now!</a>
     32         <br>
     33 $else:
     34     <br>
     35     <a href="/c/">camera control</a>
     36 
     37 $if film == '':
     38     <h1>FILMS</h1>
     39     $for i in films:
     40         <a href="$i"><h1>$i</h1></a>
     41         $ thumbnail_url = '/'+filmfolder + i + '/scene' + str(1).zfill(3) + '/shot' + str(1).zfill(3) + '/take' + str(1).zfill(3) + '.jpeg'
     42         <a href="$i"><img style="vertical-align:middle; width:80%; max-width:500px;"  src="$thumbnail_url?$randhash"/></a><br>
     43 <br>
     44 
     45 $ t=0
     46 
     47 $if shot != None:
     48     $for t in range(takes):
     49         $ thumbnail_url = '/'+filmfolder + film + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3) + '/take' + str(t+1).zfill(3) + '.jpeg'
     50         <pre>take $str(t+1)</pre>
     51         <a href="?scene=$scene&shot=$shot&take=${str(t+1)}"><img style="vertical-align:middle; width:80%; max-width:500px;"  src="$thumbnail_url?$randhash"/></a><br>
     52 $elif scene != None:
     53     $for s in range(shots)
     54         <pre>shot $str(s+1)</pre>
     55         $ t = countshots(film, filmfolder, scene)
     56         $ p = counttakes(film, filmfolder, scene, s+1)
     57         $ thumbnail_url = '/'+filmfolder + film + '/scene' + str(scene).zfill(3) + '/shot' + str(s+1).zfill(3) + '/take' + str(p).zfill(3) + '.jpeg'
     58         <a href="?scene=$scene&shot=${str(s+1)}"><img style="vertical-align:middle; width:80%; max-width:500px;" src="$thumbnail_url?$randhash"/></a><br>
     59 $else:
     60     $for s in range(scenes):
     61         <pre>scene $str(s+1)</pre>
     62         $ t = counttakes(film, filmfolder, s+1, 1)
     63         $ thumbnail_url = '/'+filmfolder + film + '/scene' + str(s+1).zfill(3) + '/shot001/take' + str(t).zfill(3) + '.jpeg'
     64         <a href="?scene=${str(s+1)}"><img style="vertical-align:middle; width:80%; max-width:500px;" src="$thumbnail_url?$randhash"/></a><br>