Adjust configurations

This commit is contained in:
Korbs 2024-07-09 15:32:43 -04:00
parent 88d4810a5c
commit 436c1e66f1
9 changed files with 36 additions and 39 deletions

View file

@ -13,13 +13,13 @@ import Video from '@components/VideoItem.astro'
// Configuration
import {
DEFAULT_DATA_PROXY,
DEFAULT_VIDEO_PROXY
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_MEDIA_DATA_PROXY
} from '@utils/GetConfig'
// Fetch
const fetchFrom = DEFAULT_DATA_PROXY + '/api/v1/trending' + FetchData
const fetchFrom = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending' + FetchData
const response = await fetch(fetchFrom)
const data = await response.json()
@ -35,7 +35,7 @@ const heroItem = data.slice(0,1)
</div>
<div class="c-hero-video">
{heroItem.map((data) =>
<video autoplay muted src={DEFAULT_VIDEO_PROXY + '/latest_version?id=' + data.videoId + '&itag=135'}></video>
<video autoplay muted src={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + data.videoId + '&itag=135'}></video>
)}
</div>
</div>

View file

@ -6,15 +6,14 @@ changeLanguage("en");
// Configuration
import {
DEFAULT_DATA_PROXY,
DEFAULT_VIDEO_PROXY
} from '../../../config.json'
DEFAULT_MEDIA_DATA_PROXY
} from '@utils/GetConfig'
// Components
import MusicItem from '@components/MusicItem.astro'
// Fetch
const fetchFrom = DEFAULT_DATA_PROXY + '/api/v1/trending?type=music'
const fetchFrom = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending?type=music'
const response = await fetch(fetchFrom)
const data = await response.json()
@ -30,7 +29,7 @@ const heroItem = data.slice(0,1)
</div>
<div class="c-hero-video">
{heroItem.map((data) =>
<video autoplay muted src={DEFAULT_VIDEO_PROXY + '/latest_version?id=' + data.videoId + '&itag=22&local=true'}></video>
<video autoplay muted src={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + data.videoId + '&itag=22&local=true'}></video>
)}
</div>
</div>

View file

@ -6,7 +6,7 @@ import i18next, { t, changeLanguage } from "i18next";
changeLanguage("en");
// Configuration
import { DEFAULT_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
import { BrightStar, Donate, Download, ShareIos, ThumbsUp } from "@iconoir/vue";
// Components
@ -14,22 +14,22 @@ import Video from '@components/VideoItem.astro'
// Fetch
const SWV = Astro.url.href.split("channel/").pop();
const channel = await fetch(DEFAULT_DATA_PROXY + "/api/v1/channels/" + SWV).then((response) => response.json());
const channel = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/channels/" + SWV).then((response) => response.json());
const DescriptionFormat = channel.descriptionHtml.replaceAll("\n", " <br/> ");
---
<Base Title="MinPluto" Description="">
<div class="channel-backdrop">
<img src={channel.authorBanners[1].url}/>
<!-- <img src={channel.authorBanners[0].url}/> --> <!-- BROKEN -->
</div>
<div class="channel">
<div class="channel-header">
<div class="channel-banner">
<img src={channel.authorBanners[1].url}/>
<!-- <img src={channel.authorBanners[0].url}/> --> <!-- BROKEN -->
</div>
<div class="channel-meta">
<div>
<img src={channel.authorThumbnails[1].url}/>
<img src={channel.authorThumbnails[0].url}/>
<h2>{channel.author}</h2>
<p>{channel.subCountText}</p>
</div>
@ -45,7 +45,6 @@ const DescriptionFormat = channel.descriptionHtml.replaceAll("\n", " <br/> ");
<a href="#">{t("CHANNEL.COMMUNITY")}</a>
</div> -->
<div class="channel-tab-content">
<h2>{t("CHANNEL.ABOUT")} {channel.author}</h2>
<p><Fragment set:html={DescriptionFormat}/></p>
<hr/>
<h2>{t("CHANNEL.LATEST")}</h2>

View file

@ -7,7 +7,7 @@ const { FetchData, CategoryName, CategoryDescription } = Astro.props;
// Use on top of Default Layout
import Base from "@layouts/Default.astro";
// Configuration
import { DEFAULT_DATA_PROXY, DEFAULT_IMAGE_PROXY } from '@utils/GetConfig'
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY } from '@utils/GetConfig'
// Discover Data
import Discover from "../../data/discover.json";
@ -17,9 +17,9 @@ changeLanguage("en");
<Base>
<div class="video-grid">
{Discover.Tech.map((channel) =>
<a href={'/channel/' + channel.Link} style={"background: url('" + DEFAULT_DATA_PROXY + channel.Banner} class="discovery-channel">
<a href={'/channel/' + channel.Link} style={"background: url('" + DEFAULT_MEDIA_DATA_PROXY + channel.Banner} class="discovery-channel">
<div class="dc-c">
<img src={DEFAULT_DATA_PROXY + channel.Logo}/>
<img src={DEFAULT_MEDIA_DATA_PROXY + channel.Logo}/>
<p>{channel.Name}</p>
</div>
</a>

View file

@ -3,11 +3,11 @@ import { t, changeLanguage } from "i18next";
import Embed from "@layouts/Embed.astro";
import "@styles/video.scss";
// Configuration
import { DEFAULT_VIDEO_PROXY, DEFAULT_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
// Fetch
const SWV = Astro.url.href.split("embed/").pop();
const video = await fetch(DEFAULT_DATA_PROXY + "/api/v1/videos/" + SWV).then((response) => response.json());
const video = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/videos/" + SWV).then((response) => response.json());
changeLanguage("en");
---
@ -15,7 +15,7 @@ changeLanguage("en");
<Embed
Title={video.title}
EmbedId={video.videoId}
EmbedVideo={DEFAULT_VIDEO_PROXY + '/latest_version?id=' + video.videoId + '&itag=22&local=true'}
EmbedVideo={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=22&local=true'}
EmbedImage={DEFAULT_IMAGE_PROXY + '/https://i.ytimg.com/vi/' + video.videoId + '/maxresdefault.jpg'}
EmbedTitle={video.title}
>
@ -25,7 +25,7 @@ changeLanguage("en");
autoplay
poster={DEFAULT_IMAGE_PROXY + '/https://i.ytimg.com/vi/' + video.videoId + '/maxresdefault.jpg'}
video-title={video.title}
src={DEFAULT_VIDEO_PROXY + '/latest_version?id=' + video.videoId + '&itag=22&local=true'}
src={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=22&local=true'}
>
</video>
</div>

View file

@ -8,30 +8,30 @@ changeLanguage("en");
// Configuration
import {
DEFAULT_DATA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_IMAGE_PROXY
} from '@utils/GetConfig'
import { FireFlame, Frame, Gamepad, GraphUp, Movie, MusicDoubleNote } from "@iconoir/vue";
// Fetch
const TrendingFetch = DEFAULT_DATA_PROXY + '/api/v1/trending'
const TrendingFetch = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending'
const TrendingResponse = await fetch(TrendingFetch)
const TrendingData = await TrendingResponse.json()
const TrendingSplit = TrendingData.slice(0, 1)
const MoviesFetch = DEFAULT_DATA_PROXY + '/api/v1/trending?type=movies'
const MoviesFetch = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending?type=movies'
const MoviesResponse = await fetch(MoviesFetch)
const MoviesData = await MoviesResponse.json()
const MoviesSplit = MoviesData.slice(0, 1)
const MusicFetch = DEFAULT_DATA_PROXY + '/api/v1/trending?type=music'
const MusicFetch = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending?type=music'
const MusicResponse = await fetch(MusicFetch)
const MusicData = await MusicResponse.json()
const MusicSplit = MusicData.slice(0, 1)
const GamingFetch = DEFAULT_DATA_PROXY + '/api/v1/trending?type=gaming'
const GamingFetch = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending?type=gaming'
const GamingResponse = await fetch(GamingFetch)
const GamingData = await GamingResponse.json()
const GamingSplit = GamingData.slice(0, 1)
@ -48,7 +48,7 @@ const GamingSplit = GamingData.slice(0, 1)
</div>
<div class="category-select-grid">
{TrendingSplit.map((data) =>
<a href={'/' + i18next.language + '/category/trending'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + DEFAULT_DATA_PROXY + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<a href={'/category/trending'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + 'https://img.youtube.com/' + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<div class="goin-card-content">
<GraphUp viewBox="0 0 10 24"/>
<p>{t("SIDEBAR.CATEGORY_LIST.TRENDING")}</p>
@ -56,7 +56,7 @@ const GamingSplit = GamingData.slice(0, 1)
</a>
)}
{MoviesSplit.map((data) =>
<a href={'/' + i18next.language + '/category/movies'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + DEFAULT_DATA_PROXY + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<a href={'/category/movies'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + 'https://img.youtube.com/' + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<div class="goin-card-content">
<Movie viewBox="0 0 10 24"/>
<p>{t("SIDEBAR.CATEGORY_LIST.MOVIES")}</p>
@ -64,7 +64,7 @@ const GamingSplit = GamingData.slice(0, 1)
</a>
)}
{MusicSplit.map((data) =>
<a href={'/' + i18next.language + '/category/music'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + DEFAULT_DATA_PROXY + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<a href={'/category/music'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + 'https://img.youtube.com/' + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<div class="goin-card-content">
<MusicDoubleNote viewBox="0 0 10 24"/>
<p>{t("SIDEBAR.CATEGORY_LIST.MUSIC")}</p>
@ -72,7 +72,7 @@ const GamingSplit = GamingData.slice(0, 1)
</a>
)}
{GamingSplit.map((data) =>
<a href={'/' + i18next.language + '/category/gaming'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + DEFAULT_DATA_PROXY + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<a href={'/category/gaming'} style={'background: url("' + DEFAULT_IMAGE_PROXY + '/' + 'https://img.youtube.com/' + '/vi/' + data.videoId + '/mqdefault.jpg")'} class="goin-card">
<div class="goin-card-content">
<Gamepad viewBox="0 0 10 24"/>
<p>{t("SIDEBAR.CATEGORY_LIST.GAMES")}</p>
@ -82,7 +82,6 @@ const GamingSplit = GamingData.slice(0, 1)
</div>
</Base>
<style is:inline>a[href="/"] {background: rgb(255 255 255 / 25%) !important;border: 2px rgba(255, 255, 255, 0.25) solid !important;}</style>
<style>
img[src="/images/backgrounds/1.webp"] {
position: fixed;

View file

@ -10,8 +10,8 @@ changeLanguage("en");
import {
SERVER_ADMIN,
ANALYLICS_TOOL,
DEFAULT_VIDEO_PROXY,
DEFAULT_DATA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_IMAGE_PROXY,
DEFAULT_PLAYER,
SERVER_LOCATION,
@ -53,7 +53,7 @@ import { FireFlame, Frame, Gamepad, GraphUp, Movie, MusicDoubleNote } from "@ico
</div>
<div class="in">
<h2>Video Proxy</h2>
<a href={DEFAULT_VIDEO_PROXY}>{DEFAULT_VIDEO_PROXY}</a>
<a href={DEFAULT_MEDIA_DATA_PROXY}>{DEFAULT_MEDIA_DATA_PROXY}</a>
</div>
<div class="in">
<h2>Image Proxy</h2>

View file

@ -3,7 +3,7 @@ import { t, changeLanguage } from "i18next"
import Base from "@layouts/Default.astro"
// Configuration
import { DEFAULT_DATA_PROXY, DEFAULT_IMAGE_PROXY } from '@utils/GetConfig'
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY } from '@utils/GetConfig'
changeLanguage("en")
@ -11,7 +11,7 @@ import Video from '@components/VideoItem.astro'
// Fetch
const SBO = Astro.url.href.split("search?query=").pop()
const response = await fetch(DEFAULT_DATA_PROXY + "/api/v1/search?q=" + SBO)
const response = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/search?q=" + SBO)
.catch((error) => {
console.log(error)
})

View file

@ -3,8 +3,8 @@ export var SERVER_LOCATION = import.meta.env.SERVER_LOCATION
export var SERVER_PROTOCOL = import.meta.env.SERVER_PROTOCOL
export var SERVER_DOMAIN = import.meta.env.SERVER_DOMAIN
export var SERVER_BASE = import.meta.env.SERVER_BASE
export var DEFAULT_VIDEO_PROXY = import.meta.env.DEFAULT_VIDEO_PROXY
export var DEFAULT_DATA_PROXY = import.meta.env.DEFAULT_DATA_PROXY
export var DEFAULT_MEDIA_DATA_PROXY = import.meta.env.DEFAULT_MEDIA_DATA_PROXY
export var DEFAULT_MEDIA_DATA_PROXY = import.meta.env.DEFAULT_MEDIA_DATA_PROXY
export var DEFAULT_IMAGE_PROXY = import.meta.env.DEFAULT_IMAGE_PROXY
export var DEFAULT_PLAYER = import.meta.env.DEFAULT_PLAYER
export var SIDEBAR_CATEGORIES = import.meta.env.SIDEBAR_CATEGORIES