Added Diabolic and Cum Louder, added content type expect option to media sources to fix Vixen thumbnails.
This commit is contained in:
@@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user