Skip to content

Commit f047ec4

Browse files
committed
Add Caption extension to artworkFileExtension
1 parent 325ec03 commit f047ec4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/Attachment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ enum Extensions {
2929
Partial = ".partial",
3030
NFO = ".nfo",
3131
Thumbnail = ".png",
32+
Caption = ".vtt",
3233
}
3334

3435
export class Attachment implements AttachmentAttributes {
@@ -125,7 +126,12 @@ export class Attachment implements AttachmentAttributes {
125126

126127
const filesInDir = await readdir(fileDir);
127128
const matchingFile = filesInDir.find(
128-
(file) => file.startsWith(fileName) && !file.endsWith(Extensions.NFO) && !file.endsWith(Extensions.Partial) && !file.endsWith(Extensions.Muxed)
129+
(file) =>
130+
file.startsWith(fileName) &&
131+
!file.endsWith(Extensions.NFO) &&
132+
!file.endsWith(Extensions.Partial) &&
133+
!file.endsWith(Extensions.Muxed) &&
134+
!file.endsWith(Extensions.Caption)
129135
);
130136
if (matchingFile) return extname(matchingFile);
131137
return undefined;

0 commit comments

Comments
 (0)