better handling on web player

This commit is contained in:
2026-01-01 18:23:10 +01:00
parent 6c3bc4d789
commit d09c769804
2 changed files with 22 additions and 2 deletions

View File

@@ -649,6 +649,7 @@ const AnimePlayer = (function() {
}
if (currentExt === 'local') {
try {
const localId = await getLocalEntryId();
if (!localId) {
setLoading("Local entry not found in library.");
@@ -658,11 +659,20 @@ const AnimePlayer = (function() {
const eps = await check.json();
if (!eps.includes(_currentEpisode)) {
// 🔥 forzar online
els.extSelect.value = _entrySource;
return loadStream();
}
const ext = localUrl.split('.').pop().toLowerCase();
if (!['mp4'].includes(ext)) {
setLoading(
`Currently the web player only supports mp4 files.`
);
if (els.mpvBtn) els.mpvBtn.style.display = 'flex';
return;
}
_rawVideoData = {
url: window.location.origin + localUrl,
headers: {}