add filetype column
This commit is contained in:
		
							parent
							
								
									1aa1b34c80
								
							
						
					
					
						commit
						9c309b1498
					
				| @ -1077,7 +1077,12 @@ class HttpCli(object): | ||||
|             dt = datetime.utcfromtimestamp(inf.st_mtime) | ||||
|             dt = dt.strftime("%Y-%m-%d %H:%M:%S") | ||||
| 
 | ||||
|             item = [margin, quotep(href), html_escape(fn), sz, dt] | ||||
|             try: | ||||
|                 ext = "---" if is_dir else fn.rsplit(".", 1)[1] | ||||
|             except: | ||||
|                 ext = "%" | ||||
| 
 | ||||
|             item = [margin, quotep(href), html_escape(fn), sz, ext, dt] | ||||
|             if is_dir: | ||||
|                 dirs.append(item) | ||||
|             else: | ||||
|  | ||||
| @ -34,13 +34,14 @@ | ||||
|                 <th></th> | ||||
|                 <th>File Name</th> | ||||
|                 <th sort="int">File Size</th> | ||||
|                 <th>T</th> | ||||
|                 <th>Date</th> | ||||
|             </tr> | ||||
|         </thead> | ||||
|         <tbody> | ||||
| 
 | ||||
| {%- for f in files %} | ||||
| <tr><td>{{ f[0] }}</td><td><a href="{{ f[1] }}">{{ f[2] }}</a></td><td>{{ f[3] }}</td><td>{{ f[4] }}</td></tr> | ||||
| <tr><td>{{ f[0] }}</td><td><a href="{{ f[1] }}">{{ f[2] }}</a></td><td>{{ f[3] }}</td><td>{{ f[4] }}</td><td>{{ f[5] }}</td></tr> | ||||
| {%- endfor %} | ||||
| 
 | ||||
|         </tbody> | ||||
|  | ||||
| @ -617,8 +617,8 @@ function unblocked() { | ||||
| // show ui to manually start playback of a linked song
 | ||||
| function autoplay_blocked(tid) { | ||||
| 	show_modal( | ||||
| 		'<div id="blk_play"><a id="blk_go"></a></div>' + | ||||
| 		'<div id="blk_abrt"><a id="blk_na">Cancel<br />(show file list)</a></div>'); | ||||
| 		'<div id="blk_play"><a href="#" id="blk_go"></a></div>' + | ||||
| 		'<div id="blk_abrt"><a href="#" id="blk_na">Cancel<br />(show file list)</a></div>'); | ||||
| 
 | ||||
| 	var go = o('blk_go'); | ||||
| 	var na = o('blk_na'); | ||||
| @ -627,7 +627,8 @@ function autoplay_blocked(tid) { | ||||
| 	fn = decodeURIComponent(fn.replace(/\+/g, ' ')); | ||||
| 
 | ||||
| 	go.textContent = 'Play "' + fn + '"'; | ||||
| 	go.onclick = function () { | ||||
| 	go.onclick = function (e) { | ||||
| 		if (e) e.preventDefault(); | ||||
| 		unblocked(); | ||||
| 		mp.au.play(); | ||||
| 	}; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 ed
						ed