修复无法显示mp4以外的文件的BUG

This commit is contained in:
CN-JS-HuiBai
2026-04-02 17:25:52 +08:00
parent 1076727596
commit 364438b66d
2 changed files with 29 additions and 4 deletions

View File

@@ -109,6 +109,10 @@ header p {
align-items: flex-start;
}
.dashboard > * {
min-width: 0;
}
.glass-panel {
background: var(--panel-bg);
backdrop-filter: blur(16px);
@@ -155,10 +159,13 @@ header p {
gap: 0.5rem;
max-height: 500px;
overflow-y: auto;
overflow-x: auto;
min-width: 0;
}
.video-list::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.video-list::-webkit-scrollbar-thumb {
@@ -176,6 +183,7 @@ header p {
display: flex;
align-items: center;
gap: 1rem;
min-width: 0;
}
.video-item:hover {
@@ -210,8 +218,19 @@ header p {
font-weight: 600;
font-size: 0.95rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
overflow-x: auto;
overflow-y: hidden;
text-overflow: clip;
padding-bottom: 0.2rem;
}
.video-title::-webkit-scrollbar {
height: 6px;
}
.video-title::-webkit-scrollbar-thumb {
background: var(--panel-border);
border-radius: 6px;
}
.video-meta {
@@ -237,6 +256,7 @@ header p {
display: flex;
align-items: center;
gap: 1rem;
min-width: 0;
}
.folder-header:hover {

View File

@@ -40,8 +40,13 @@ app.get('/api/videos', async (req, res) => {
const response = await s3Client.send(command);
// Filter for common video formats
const videoExtensions = ['.mp4', '.avi', '.mov', '.mkv', '.webm', '.flv', '.wmv', '.m4v'];
// Filter for a broader set of common video formats
const videoExtensions = [
'.3gp', '.3g2', '.asf', '.avi', '.divx', '.flv', '.m2ts', '.m2v',
'.m4v', '.mkv', '.mov', '.mp4', '.mpeg', '.mpg', '.mts', '.mxf',
'.ogm', '.ogv', '.qt', '.rm', '.rmvb', '.ts', '.vob', '.vro',
'.webm', '.wmv'
];
const videos = (response.Contents || [])
.map(item => item.Key)
.filter(key => {