diff --git a/source/src/components/global/Sidebar.astro b/source/src/components/global/Sidebar.astro index 2d3ccfa..ec1071b 100755 --- a/source/src/components/global/Sidebar.astro +++ b/source/src/components/global/Sidebar.astro @@ -61,11 +61,11 @@ let { data: subs } = await supabase diff --git a/source/src/pages/embed/[...slug].astro b/source/src/pages/embed/[...slug].astro index b40db99..3e2b8db 100755 --- a/source/src/pages/embed/[...slug].astro +++ b/source/src/pages/embed/[...slug].astro @@ -2,14 +2,51 @@ import { t, changeLanguage } from "i18next"; import Embed from "@layouts/Embed.astro"; import "@styles/video.scss"; + // Configuration import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig' +// Components +import { Zorn } from "@minpluto/zorn" + // Fetch const SWV = Astro.url.href.split("embed/").pop(); const video = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/videos/" + SWV).then((response) => response.json()); +// Quality Check +const EightKCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=571') +if (EightKCheck.status == 200) { + var EightK = true +} else { + var EightK = false +} +const FourKCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=313') +if (FourKCheck.status == 200) { + var FourK = true +} else { + var FourK = false +} + +const TenEightyCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=303') +if (TenEightyCheck.status == 200) { + var TenEighty = true +} else { + var TenEighty = false +} + +const ThreeSixtyCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=134') +if (ThreeSixtyCheck.status == 200) {var ThreeSixty = true} + +if (EightK === true) { // 571 + var Quality = '571' +} else if (FourK === true) { // 313 + var Quality = '313' +} else if (TenEighty === true) { // 137 + var Quality = '303' +} else if (ThreeSixty === true) { // 134 + var Quality = '134' +} ---
- +