i2psnark: Increase min size for video preview

CSS tweaks for large videos
Mime types update
This commit is contained in:
zzz
2020-04-25 14:39:05 +00:00
parent da5c92a599
commit 2a8f23602a
5 changed files with 9 additions and 2 deletions

View File

@ -3572,7 +3572,9 @@ public class I2PSnarkServlet extends BasicServlet {
boolean isVideo = !isAudio && isVideo(mime);
buf.append("<td class=\"snarkFileIcon\">");
String preview = null;
if (complete || (isAudio && fai.preview > 1024*100) || (isVideo && fai.preview > 1024*1024)) {
if (complete ||
(isAudio && fai.preview > 100*1024) ||
(isVideo && fai.preview > 5*1024*1024 && fai.preview / (double) fai.length >= 0.01d)) {
String ppath = complete ? path : path + "?limit=" + fai.preview;
if (!complete) {
double pct = fai.preview / (double) fai.length;

View File

@ -4,7 +4,9 @@
ape = audio/x-monkeys-audio
bz2 = application/x-bzip2
cue = application/x-cue
dff = audio/x-dsd
dmg = application/apple-diskimage
dsf = audio/x-dsd
epub = application/epub+zip
flac = audio/flac
flv = video/x-flv
@ -50,6 +52,7 @@ sud = application/zip
tbz = application/x-bzip2
torrent = application/x-bittorrent
txt = text/plain
vtt = text/vtt
war = application/java-archive
webm = video/webm
wma = audio/x-ms-wma

View File

@ -773,6 +773,7 @@ th.headerdownloaded {
.snarkFileIcon {
width: 16px;
padding: 0;
text-align: left !important;
}
.snarkFileStatusIcon {

View File

@ -740,7 +740,7 @@ _:-ms-lang(x), .snarkTorrents tbody tr:hover, .snarkDirInfo tbody tr:hover {
.snarkFileIcon {
width: 16px;
text-align: center;
text-align: left !important;
padding: 4px !important;
}

View File

@ -818,6 +818,7 @@ _:-ms-lang(x), .snarkTorrents tbody tr:hover, .snarkDirInfo tbody tr:hover {
.snarkFileIcon {
width: 16px;
text-align: left !important;
}
.snarkFileIcon img, .snarkFileIcon img:hover {