tree.html (3889B)
1 $def with (films, film, scenes, str, filmfolder, counttakes, countshots, countscenes, shots, scene, takes, shot, take, checkvideo,randhash, if_exist) 2 $ video = '' 3 <br> 4 <a href="/c/">camera control</a> 5 6 $ t=0 7 <br> 8 $if film != '': 9 $ i = film 10 $ scenes=countscenes(filmfolder, i) 11 $for s in range(scenes): 12 <div class='scene $str(s+1)' style="padding:10px; vertical-align:top; display:inline-block;"> 13 <pre style="background-color:#680000; position:absolute; margin-top:0px; margin-left:5px;" >scene $str(s+1)</pre> 14 $ t = counttakes(i, filmfolder, s+1, 1) 15 $ thumbnail_url = '/'+filmfolder + i + '/scene' + str(s+1).zfill(3) + '/shot001/take' + str(t).zfill(3) + '.jpeg' 16 <a href="?scene=${str(s+1)}"><img style="vertical-align:middle; width:80%; max-width:100px; margin-top:22px;" src="$thumbnail_url?$randhash"/></a> 17 $ shots = countshots(i, filmfolder, s+1) 18 $for s2 in range(shots): 19 <div class='shot $str(s2+1)' style="padding:0px;"> 20 <pre style="background-color:#fffe00; color:#000; position:absolute; margin-top:-1px; margin-left:5px">shot $str(s2+1)</pre> 21 $ t2 = countshots(i, filmfolder, s+1) 22 $ p2 = counttakes(i, filmfolder, s+1, s2+1) 23 $ thumbnail_url = '/'+filmfolder + i + '/scene' + str(s+1).zfill(3) + '/shot' + str(s2+1).zfill(3) + '/take' + str(p2).zfill(3) + '.jpeg' 24 $ check=if_exist(thumbnail_url) 25 $if check == True: 26 <a href="?scene=${str(s+1)}&shot=${str(s2+1)}"><img style="vertical-align:middle; width:80%; max-width:80px; margin-top:20px;" src="$thumbnail_url?$randhash"/></a> 27 $else: 28 $ thumbnail_url = '/static/empty.jpeg' 29 <a href="?scene=${str(s+1)}&shot=${str(s2+1)}"><img style="vertical-align:middle; width:80%; max-width:80px; margin-top:20px;" src="$thumbnail_url?$randhash"/></a> 30 $if p2 != None: 31 $for t3 in range(p2): 32 $ thumbnail_url = '/'+filmfolder + i + '/scene' + str(s+1).zfill(3) + '/shot' + str(s2+1).zfill(3) + '/take' + str(t3+1).zfill(3) + '.jpeg' 33 <div class='take $str(t3+1)' style="padding:0px;"> 34 <pre style="background-color:#0e2b00; position:absolute; margin-top:-1px; margin-left:5px">take $str(t3+1)</pre> 35 <a href="?scene=${str(s+1)}&shot=${str(s2+1)}&take=${str(t)}"><img style="vertical-align:middle; width:80%; max-width:70px; margin-top:20px; margin-left:0px" src="$thumbnail_url?$randhash"/></a> 36 </div> 37 </div> 38 </br> 39 </div> 40 $else: 41 <h1>FILMS</h1> 42 $for i in films: 43 <a href="$i"><pre>$i</pre></a> 44 $ thumbnail_url = '/'+filmfolder + i + '/scene' + str(1).zfill(3) + '/shot' + str(1).zfill(3) + '/take' + str(1).zfill(3) + '.jpeg' 45 <a href="$i"><img style="vertical-align:middle; width:80%; max-width:50px;" src="$thumbnail_url?$randhash"/></a><br><br> 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:50px;" 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:50px;" src="$thumbnail_url?$randhash"/></a><br> 59