Skip to content

Commit

Permalink
feat: Add support for vob (immich-app#14590)
Browse files Browse the repository at this point in the history
Add support for vob
  • Loading branch information
Lukasdotcom authored and yosit committed Dec 20, 2024
1 parent 60dfc59 commit 78f0b7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/services/asset-media.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const validImages = [
'.x3f',
];

const validVideos = ['.3gp', '.avi', '.flv', '.m2ts', '.mkv', '.mov', '.mp4', '.mpg', '.mts', '.webm', '.wmv'];
const validVideos = ['.3gp', '.avi', '.flv', '.m2ts', '.mkv', '.mov', '.mp4', '.mpg', '.mts', '.vob', '.webm', '.wmv'];

const uploadTests = [
{
Expand Down
1 change: 1 addition & 0 deletions server/src/utils/mime-types.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('mimeTypes', () => {
{ mimetype: 'video/x-matroska', extension: '.mkv' },
{ mimetype: 'video/x-ms-wmv', extension: '.wmv' },
{ mimetype: 'video/x-msvideo', extension: '.avi' },
{ mimetype: 'video/mpeg', extension: '.vob' },
]) {
it(`should map ${extension} to ${mimetype}`, () => {
expect({ ...mimeTypes.image, ...mimeTypes.video }[extension]).toContain(mimetype);
Expand Down
1 change: 1 addition & 0 deletions server/src/utils/mime-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const video: Record<string, string[]> = {
'.mpeg': ['video/mpeg'],
'.mpg': ['video/mpeg'],
'.mts': ['video/mp2t'],
'.vob': ['video/mpeg'],
'.webm': ['video/webm'],
'.wmv': ['video/x-ms-wmv'],
};
Expand Down

0 comments on commit 78f0b7f

Please sign in to comment.