From f3eae67d9770bd7ab5d3f983f1aced8cfc0d89e9 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 21 Mar 2021 09:41:05 +0100 Subject: [PATCH] readme --- README.md | 33 +++++++++++++++++++++++++++++++++ copyparty/web/browser.js | 8 ++++++++ docs/notes.sh | 3 +++ 3 files changed, 44 insertions(+) diff --git a/README.md b/README.md index 168d4877..a0ebb428 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,29 @@ turn your phone or raspi into a portable file server with resumable uploads/down * code standard: `black` +## readme toc + +* top + * [quickstart](#quickstart) + * [notes](#notes) + * [status](#status) +* [bugs](#bugs) +* [usage](#usage) +* [searching](#searching) + * [search configuration](#search-configuration) + * [metadata from audio files](#metadata-from-audio-files) + * [file parser plugins](#file-parser-plugins) +* [client examples](#client-examples) +* [dependencies](#dependencies) + * [optional gpl stuff](#optional-gpl-stuff) +* [sfx](#sfx) + * [sfx repack](#sfx-repack) +* [install on android](#install-on-android) +* [dev env setup](#dev-env-setup) +* [how to release](#how-to-release) +* [todo](#todo) + + ## quickstart download [copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py) and you're all set! @@ -74,6 +97,16 @@ summary: it works! you can use it! (but technically not even close to beta) * probably more, pls let me know +# usage + +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 +* `P` parent folder + + # searching when started with `-e2dsa` copyparty will scan/index all your files. This avoids duplicates on upload, and also makes the volumes searchable through the web-ui: diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index a786dbf9..8b065a3a 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -614,6 +614,10 @@ function autoplay_blocked() { function tree_neigh(n) { var links = document.querySelectorAll('#treeul li>a+a'); + if (!links.length) { + alert('switch to the tree for that'); + return; + } var act = -1; for (var a = 0, aa = links.length; a < aa; a++) { if (links[a].getAttribute('class') == 'hl') { @@ -633,6 +637,10 @@ function tree_neigh(n) { function tree_up() { var act = document.querySelector('#treeul a.hl'); + if (!act) { + alert('switch to the tree for that'); + return; + } if (act.previousSibling.textContent == '-') return act.previousSibling.click(); diff --git a/docs/notes.sh b/docs/notes.sh index 76071d3f..d89b956c 100644 --- a/docs/notes.sh +++ b/docs/notes.sh @@ -117,6 +117,9 @@ for d in /usr /var; do find $d -type f -size +30M 2>/dev/null; done | while IFS= brew install python@2 pip install virtualenv +# readme toc +cat README.md | awk '!/^#/{next} {lv=length($1);sub(/[^ ]+ /,"");bab=$0;gsub(/ /,"-",bab)} {printf "%" ((lv-1)*4+1) "s [%s](#%s)\n", "*",$0,bab}' + ## ## http 206