mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 03:51:51 +01:00
capitalize 4k
This commit is contained in:
parent
41f83f4bef
commit
9dd8f372a6
@ -28,7 +28,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@formkit/auto-animate": "^0.8.1",
|
"@formkit/auto-animate": "^0.8.1",
|
||||||
"@headlessui/react": "^1.7.17",
|
"@headlessui/react": "^1.7.17",
|
||||||
"@movie-web/providers": "^2.0.0",
|
"@movie-web/providers": "^2.0.1",
|
||||||
"@noble/hashes": "^1.3.3",
|
"@noble/hashes": "^1.3.3",
|
||||||
"@react-spring/web": "^9.7.3",
|
"@react-spring/web": "^9.7.3",
|
||||||
"@scure/bip39": "^1.2.2",
|
"@scure/bip39": "^1.2.2",
|
||||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -18,8 +18,8 @@ dependencies:
|
|||||||
specifier: ^1.7.17
|
specifier: ^1.7.17
|
||||||
version: 1.7.17(react-dom@18.2.0)(react@18.2.0)
|
version: 1.7.17(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@movie-web/providers':
|
'@movie-web/providers':
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.1
|
||||||
version: 2.0.0
|
version: 2.0.1
|
||||||
'@noble/hashes':
|
'@noble/hashes':
|
||||||
specifier: ^1.3.3
|
specifier: ^1.3.3
|
||||||
version: 1.3.3
|
version: 1.3.3
|
||||||
@ -1912,8 +1912,8 @@ packages:
|
|||||||
'@jridgewell/resolve-uri': 3.1.1
|
'@jridgewell/resolve-uri': 3.1.1
|
||||||
'@jridgewell/sourcemap-codec': 1.4.15
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
|
|
||||||
/@movie-web/providers@2.0.0:
|
/@movie-web/providers@2.0.1:
|
||||||
resolution: {integrity: sha512-+LF7kTLhtpewLdQssnYojW/Dia0UtAkrK9ZvmFSnLIEQoVjVv1vsJUT2JqkjvEC/TM1SnM2N6H+eKLJU4yN2cQ==}
|
resolution: {integrity: sha512-PB1OxSsm4zwD6fuWBCmuqwMpt1UnlKssVZ8jGl6gHioS9/qFXR9Rsd8SnWISQWxF6lVRUp0DBXHfCrXGY/jwhA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
cheerio: 1.0.0-rc.12
|
cheerio: 1.0.0-rc.12
|
||||||
crypto-js: 4.2.0
|
crypto-js: 4.2.0
|
||||||
|
@ -14,7 +14,6 @@ import {
|
|||||||
import { Loading } from "@/components/layout/Loading";
|
import { Loading } from "@/components/layout/Loading";
|
||||||
import { MwLink } from "@/components/text/Link";
|
import { MwLink } from "@/components/text/Link";
|
||||||
import { useBackendUrl } from "@/hooks/auth/useBackendUrl";
|
import { useBackendUrl } from "@/hooks/auth/useBackendUrl";
|
||||||
import { conf } from "@/setup/config";
|
|
||||||
|
|
||||||
interface TrustBackendPartProps {
|
interface TrustBackendPartProps {
|
||||||
onNext?: (meta: MetaResponse) => void;
|
onNext?: (meta: MetaResponse) => void;
|
||||||
|
@ -32,7 +32,7 @@ const qualitySorting: Record<SourceQuality, number> = {
|
|||||||
"480": 20,
|
"480": 20,
|
||||||
"720": 30,
|
"720": 30,
|
||||||
"1080": 40,
|
"1080": 40,
|
||||||
"4k": 50,
|
"4k": 25, // 4k has lower priority, you need faster internet for it
|
||||||
};
|
};
|
||||||
const sortedQualities: SourceQuality[] = Object.entries(qualitySorting)
|
const sortedQualities: SourceQuality[] = Object.entries(qualitySorting)
|
||||||
.sort((a, b) => b[1] - a[1])
|
.sort((a, b) => b[1] - a[1])
|
||||||
@ -101,8 +101,8 @@ export function selectQuality(
|
|||||||
throw new Error("couldn't select quality");
|
throw new Error("couldn't select quality");
|
||||||
}
|
}
|
||||||
|
|
||||||
const qualityMap: Record<SourceQuality, string> = {
|
const qualityNameMap: Record<SourceQuality, string> = {
|
||||||
"4k": "4k",
|
"4k": "4K",
|
||||||
"1080": "1080p",
|
"1080": "1080p",
|
||||||
"360": "360p",
|
"360": "360p",
|
||||||
"480": "480p",
|
"480": "480p",
|
||||||
@ -110,8 +110,8 @@ const qualityMap: Record<SourceQuality, string> = {
|
|||||||
unknown: "unknown",
|
unknown: "unknown",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const allQualities = Object.keys(qualityMap) as SourceQuality[];
|
export const allQualities = Object.keys(qualityNameMap) as SourceQuality[];
|
||||||
|
|
||||||
export function qualityToString(quality: SourceQuality): string {
|
export function qualityToString(quality: SourceQuality): string {
|
||||||
return qualityMap[quality];
|
return qualityNameMap[quality];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user