better handling on web player
This commit is contained in:
@@ -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: {}
|
||||
|
||||
Reference in New Issue
Block a user