]> git.plutz.net Git - serve0/blobdiff - globals.sh
retain only final dot in fake mp4 file names (e.g. for Android compatibility)
[serve0] / globals.sh
index 1445d48e4efceaf049180bca1d1c6a27e24412cb..b68a8c9e977a803cc0b22868da2d5b8b6054d67a 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Serve0.  If not, see <http://www.gnu.org/licenses/>. 
 
-
 alias _wiki="stx2any --no-template --link-abbrevs --quote -T html"
-file_pattern='^.*(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|webm|iso|rmvb)$'
-
-data_dirs cache meta mp4 videos thumbs trash by_length transcoded
+file_pattern='^.*\.(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|ogv|webm|iso|rmvb)$'
 
-PAGE="${_GET[p]:-${PAGE:-list}}"
+data_dirs cache meta mp4 videos thumbs trash transcoded
 
-cgi_cookie
-validate(){ printf '%s\n' "$1" |sed -rn '2q;/^('"$2"')$/{p;q};a'"$3"; }
+PAGE="${_GET[p]:-${PAGE:-browse}}"
+treeroot="${treeroot:-${_DATA}}"
 
 _GET[o]=$( validate "${_GET[o]}"  'Name|Date|Length' Name)
 _GET[pn]=$(validate "${_GET[pn]}" '[1-9][0-9]*' 1)
 
+cgi_cookie
 _COOKIE[pagesize]=$(validate "${_COOKIE[pagesize]}" '[1-9][0-9]*' 50)
-
-