From 78cebd90999d7cf33a0fc8941370e1accf2beee3 Mon Sep 17 00:00:00 2001 From: prpr Date: Sat, 27 Jan 2024 00:45:00 +0000 Subject: [PATCH] Update extension list and make common --- webif/cgi-bin/status.jim | 3 ++- webif/html/browse/index.jim | 3 +-- webif/html/m/browse.jim | 3 +-- webif/include/extensions.jim | 4 ++++ 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100755 webif/include/extensions.jim diff --git a/webif/cgi-bin/status.jim b/webif/cgi-bin/status.jim index 645e833..606046a 100755 --- a/webif/cgi-bin/status.jim +++ b/webif/cgi-bin/status.jim @@ -30,7 +30,8 @@ if {[catch {set pid [exec pgrep -n humaxtv]}]} { exit } -set exts {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov .hmt .m4v .m4a} +source /mod/webif/include/extensions.jim +set exts $include set statusops { decrypt { "Decrypting" diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index 8cc45c6..eae4fca 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -20,8 +20,7 @@ header set nicesplice [system pkginst nicesplice] -set ignore {.nts .thm .hmi} -set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov .hmt .m4v .m4a .webm} +source /mod/webif/include/extensions.jim if {![dict exists $env SCRIPT_NAME]} { set env(SCRIPT_NAME) "" diff --git a/webif/html/m/browse.jim b/webif/html/m/browse.jim index ed8b174..3fb8366 100755 --- a/webif/html/m/browse.jim +++ b/webif/html/m/browse.jim @@ -6,8 +6,7 @@ require ts.class pretty_size system.class settings.class escape browse.class cgi_input -set ignore {.nts .thm .hmi} -set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov .hmt} +source /mod/webif/include/extensions.jim set dir [cgi_get dir [system mediaroot]] diff --git a/webif/include/extensions.jim b/webif/include/extensions.jim new file mode 100755 index 0000000..9bc8f39 --- /dev/null +++ b/webif/include/extensions.jim @@ -0,0 +1,4 @@ +#!/mod/bin/jimsh + +set ignore {.nts .thm .hmi} +set include {.ts .avi .mpg .mpeg .wmv .mkv .mp2 .mp3 .mp4 .mov .hmt .m4v .m4a .wav .webm}