Added Diabolic and Cum Louder, added content type expect option to media sources to fix Vixen thumbnails.

This commit is contained in:
DebaucheryLibrarian
2021-08-09 10:31:12 +02:00
parent 65c3053b49
commit a848d6991b
259 changed files with 880 additions and 15825 deletions

View File

@@ -106,6 +106,8 @@ function toBaseSource(rawSource) {
if (rawSource.url) baseSource.url = rawSource.url;
if (rawSource.extract) baseSource.extract = rawSource.extract;
if (rawSource.expectType) baseSource.expectType = rawSource.expectType;
if (rawSource.stream) {
baseSource.src = rawSource.stream;
baseSource.stream = rawSource.stream;
@@ -548,7 +550,10 @@ async function fetchHttpSource(source, tempFileTarget, hashStream) {
}
return {
mimetype: res.headers['content-type'] || mime.getType(new URL(source.src).pathname),
mimetype: (source.expectType
? source.expectType[res.headers['content-type']]
: res.headers['content-type'])
|| mime.getType(new URL(source.src).pathname),
};
}