subtitle + sitemap

This commit is contained in:
Tejas Panchal
2026-03-01 15:38:07 +05:30
parent ca41ff55b0
commit e43b9c70e9
26 changed files with 99482 additions and 2791 deletions
+208
View File
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://justanime.fun/genre/action</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/adventure</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/cars</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/comedy</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/dementia</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/demons</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/drama</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/ecchi</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/fantasy</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/game</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/harem</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/historical</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/horror</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/isekai</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/josei</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/kids</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/magic</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/marial-arts</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/mecha</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/military</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/music</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/mystery</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/parody</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/police</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/psychological</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/romance</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/samurai</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/school</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/sci-fi</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/seinen</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/shoujo</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/shoujo-ai</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/shounen</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/shounen-ai</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/slice-of-life</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/space</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/sports</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/super-power</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/supernatural</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/thriller</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/genre/vampire</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+73
View File
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://justanime.fun/</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://justanime.fun/home</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://justanime.fun/dubbed-anime</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/subbed-anime</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/top-airing</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/most-popular</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/most-favorite</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/recently-updated</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/recently-added</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/top-upcoming</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/az-list</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/terms-of-service</loc>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/dmca</loc>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://justanime.fun/contact</loc>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
</urlset>
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://justanime.fun/movie</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/tv</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/ova</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/ona</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://justanime.fun/special</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
+72 -2775
View File
File diff suppressed because it is too large Load Diff
+5 -10
View File
@@ -68,7 +68,7 @@ export default function Player({
const artRef = useRef(null); const artRef = useRef(null);
const leftAtRef = useRef(0); const leftAtRef = useRef(0);
const boundKeydownRef = useRef(null); const boundKeydownRef = useRef(null);
const proxy = import.meta.env.VITE_PROXY_URL; const proxy = import.meta.env.VITE_M3U8_PROXY_URL;
const m3u8proxy = import.meta.env.VITE_M3U8_PROXY_URL?.split(",") || []; const m3u8proxy = import.meta.env.VITE_M3U8_PROXY_URL?.split(",") || [];
const [currentEpisodeIndex, setCurrentEpisodeIndex] = useState( const [currentEpisodeIndex, setCurrentEpisodeIndex] = useState(
episodes?.findIndex((episode) => episode.id.match(/ep=(\d+)/)?.[1] === episodeId) episodes?.findIndex((episode) => episode.id.match(/ep=(\d+)/)?.[1] === episodeId)
@@ -253,7 +253,7 @@ export default function Player({
useEffect(() => { useEffect(() => {
if (!streamUrl || !artRef.current) return; if (!streamUrl || !artRef.current) return;
const iframeUrl = streamInfo?.streamingLink?.iframe; const iframeUrl = streamInfo?.streamingLink?.[0]?.iframe;
const headers = { const headers = {
referer: iframeUrl ? new URL(iframeUrl).origin + "/" : window.location.origin + "/", referer: iframeUrl ? new URL(iframeUrl).origin + "/" : window.location.origin + "/",
}; };
@@ -491,12 +491,7 @@ export default function Player({
}, 2000); }, 2000);
const subs = (subtitles || []).map((s) => ({ ...s })); const subs = (subtitles || []).map((s) => ({ ...s }));
// VTT subtitle files from HiAnime CDNs are public, no proxy needed
for (const sub of subs) {
const encodedUrl = encodeURIComponent(sub.file);
const encodedHeaders = encodeURIComponent(JSON.stringify(headers));
sub.file = `${proxy}${encodedUrl}&headers=${encodedHeaders}`;
}
const defaultSubtitle = subs?.find((sub) => sub.label.toLowerCase() === "english"); const defaultSubtitle = subs?.find((sub) => sub.label.toLowerCase() === "english");
if (defaultSubtitle) { if (defaultSubtitle) {
@@ -547,7 +542,7 @@ export default function Player({
if (thumbnail) { if (thumbnail) {
art.plugins.add( art.plugins.add(
artplayerPluginVttThumbnail({ artplayerPluginVttThumbnail({
vtt: `${proxy}${thumbnail}`, vtt: thumbnail,
}) })
); );
} }
@@ -595,7 +590,7 @@ export default function Player({
...subs.map((sub) => ({ ...subs.map((sub) => ({
default: sub.label.toLowerCase() === "english" && sub === defaultEnglishSub, default: sub.label.toLowerCase() === "english" && sub === defaultEnglishSub,
html: sub.label, html: sub.label,
url: sub.file, url: sub.file, // direct CDN URL, no proxy needed
})), })),
], ],
onSelect: (item) => { onSelect: (item) => {
+6 -6
View File
@@ -229,15 +229,15 @@ export const useWatch = (animeId, initialEpisodeId) => {
server.type.toLowerCase() server.type.toLowerCase()
); );
setStreamInfo(data); setStreamInfo(data);
setStreamUrl(data?.streamingLink?.link?.file || null); setStreamUrl(data?.streamingLink?.[0]?.link || null);
setIntro(data?.streamingLink?.intro || null); setIntro(data?.intro || null);
setOutro(data?.streamingLink?.outro || null); setOutro(data?.outro || null);
const subtitles = const subtitles =
data?.streamingLink?.tracks data?.tracks
?.filter((track) => track.kind === "captions") ?.filter((track) => track.kind === "captions")
.map(({ file, label }) => ({ file, label })) || []; .map(({ file, label, default: isDefault }) => ({ file, label, default: isDefault })) || [];
setSubtitles(subtitles); setSubtitles(subtitles);
const thumbnailTrack = data?.streamingLink?.tracks?.find( const thumbnailTrack = data?.tracks?.find(
(track) => track.kind === "thumbnails" && track.file (track) => track.kind === "thumbnails" && track.file
); );
if (thumbnailTrack) setThumbnail(thumbnailTrack.file); if (thumbnailTrack) setThumbnail(thumbnailTrack.file);