mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
fix netfilm qualities
This commit is contained in:
parent
b1333cfc16
commit
a1cae1c9f7
1 changed files with 12 additions and 4 deletions
|
@ -1,14 +1,22 @@
|
|||
import { proxiedFetch } from "../helpers/fetch";
|
||||
import { registerProvider } from "../helpers/register";
|
||||
import { MWStreamType } from "../helpers/streams";
|
||||
import { MWStreamQuality, MWStreamType } from "../helpers/streams";
|
||||
import { MWMediaType } from "../metadata/types";
|
||||
|
||||
const netfilmBase = "https://net-film.vercel.app";
|
||||
|
||||
const qualityMap = {
|
||||
"360": MWStreamQuality.Q360P,
|
||||
"480": MWStreamQuality.Q480P,
|
||||
"720": MWStreamQuality.Q720P,
|
||||
"1080": MWStreamQuality.Q1080P,
|
||||
};
|
||||
type QualityInMap = keyof typeof qualityMap;
|
||||
|
||||
registerProvider({
|
||||
id: "netfilm",
|
||||
displayName: "NetFilm",
|
||||
rank: 999,
|
||||
rank: 150,
|
||||
type: [MWMediaType.MOVIE, MWMediaType.SERIES],
|
||||
|
||||
async scrape({ media, episode, progress }) {
|
||||
|
@ -50,7 +58,7 @@ registerProvider({
|
|||
embeds: [],
|
||||
stream: {
|
||||
streamUrl: source.url,
|
||||
quality: source.quality,
|
||||
quality: qualityMap[source.quality as QualityInMap],
|
||||
type: MWStreamType.HLS,
|
||||
// captions: [],
|
||||
},
|
||||
|
@ -111,7 +119,7 @@ registerProvider({
|
|||
embeds: [],
|
||||
stream: {
|
||||
streamUrl: source.url,
|
||||
quality: source.quality,
|
||||
quality: qualityMap[source.quality as QualityInMap],
|
||||
type: MWStreamType.HLS,
|
||||
// captions: [],
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue