show logues in write-only folders
This commit is contained in:
		
							parent
							
								
									57e1c53cbb
								
							
						
					
					
						commit
						c7d9cbb11f
					
				
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @ -136,11 +136,13 @@ summary: it works! you can use it! (but technically not even close to beta) | |||||||
| ## hotkeys | ## hotkeys | ||||||
| 
 | 
 | ||||||
| the browser has the following hotkeys | the browser has the following hotkeys | ||||||
| * `0..9` jump to 10%..90% |  | ||||||
| * `U/O` skip 10sec back/forward |  | ||||||
| * `J/L` prev/next song |  | ||||||
| * `I/K` prev/next folder | * `I/K` prev/next folder | ||||||
| * `P` parent folder | * `P` parent folder | ||||||
|  | * when playing audio: | ||||||
|  |   * `0..9` jump to 10%..90% | ||||||
|  |   * `U/O` skip 10sec back/forward | ||||||
|  |   * `J/L` prev/next song | ||||||
|  |     * `J` also starts playing the folder | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ## tree-mode | ## tree-mode | ||||||
| @ -399,7 +401,7 @@ these are standalone programs and will never be imported / evaluated by copypart | |||||||
| 
 | 
 | ||||||
| # sfx | # sfx | ||||||
| 
 | 
 | ||||||
| currently there are two self-contained binaries: | currently there are two self-contained "binaries": | ||||||
| * [copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py) -- pure python, works everywhere | * [copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py) -- pure python, works everywhere | ||||||
| * [copyparty-sfx.sh](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.sh) -- smaller, but only for linux and macos | * [copyparty-sfx.sh](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.sh) -- smaller, but only for linux and macos | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1360,6 +1360,13 @@ class HttpCli(object): | |||||||
|         if "b" in self.uparam: |         if "b" in self.uparam: | ||||||
|             tpl = "browser2" |             tpl = "browser2" | ||||||
| 
 | 
 | ||||||
|  |         logues = ["", ""] | ||||||
|  |         for n, fn in enumerate([".prologue.html", ".epilogue.html"]): | ||||||
|  |             fn = os.path.join(abspath, fn) | ||||||
|  |             if os.path.exists(fsenc(fn)): | ||||||
|  |                 with open(fsenc(fn), "rb") as f: | ||||||
|  |                     logues[n] = f.read().decode("utf-8") | ||||||
|  | 
 | ||||||
|         j2a = { |         j2a = { | ||||||
|             "vdir": quotep(self.vpath), |             "vdir": quotep(self.vpath), | ||||||
|             "vpnodes": vpnodes, |             "vpnodes": vpnodes, | ||||||
| @ -1373,7 +1380,7 @@ class HttpCli(object): | |||||||
|             "have_zip": (not self.args.no_zip), |             "have_zip": (not self.args.no_zip), | ||||||
|             "have_b_u": (self.writable and self.uparam.get("b") == "u"), |             "have_b_u": (self.writable and self.uparam.get("b") == "u"), | ||||||
|             "url_suf": url_suf, |             "url_suf": url_suf, | ||||||
|             "logues": ["", ""], |             "logues": logues, | ||||||
|             "title": html_escape(self.vpath, crlf=True), |             "title": html_escape(self.vpath, crlf=True), | ||||||
|             "srv_info": srv_info, |             "srv_info": srv_info, | ||||||
|         } |         } | ||||||
| @ -1526,13 +1533,6 @@ class HttpCli(object): | |||||||
|             for f in dirs: |             for f in dirs: | ||||||
|                 f["tags"] = {} |                 f["tags"] = {} | ||||||
| 
 | 
 | ||||||
|         logues = ["", ""] |  | ||||||
|         for n, fn in enumerate([".prologue.html", ".epilogue.html"]): |  | ||||||
|             fn = os.path.join(abspath, fn) |  | ||||||
|             if os.path.exists(fsenc(fn)): |  | ||||||
|                 with open(fsenc(fn), "rb") as f: |  | ||||||
|                     logues[n] = f.read().decode("utf-8") |  | ||||||
| 
 |  | ||||||
|         if is_ls: |         if is_ls: | ||||||
|             [x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y] |             [x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y] | ||||||
|             ret = { |             ret = { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 ed
						ed