better handling on web player
This commit is contained in:
@@ -649,6 +649,7 @@ const AnimePlayer = (function() {
|
|||||||
}
|
}
|
||||||
if (currentExt === 'local') {
|
if (currentExt === 'local') {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const localId = await getLocalEntryId();
|
const localId = await getLocalEntryId();
|
||||||
if (!localId) {
|
if (!localId) {
|
||||||
setLoading("Local entry not found in library.");
|
setLoading("Local entry not found in library.");
|
||||||
@@ -658,11 +659,20 @@ const AnimePlayer = (function() {
|
|||||||
const eps = await check.json();
|
const eps = await check.json();
|
||||||
|
|
||||||
if (!eps.includes(_currentEpisode)) {
|
if (!eps.includes(_currentEpisode)) {
|
||||||
// 🔥 forzar online
|
|
||||||
els.extSelect.value = _entrySource;
|
els.extSelect.value = _entrySource;
|
||||||
return loadStream();
|
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 = {
|
_rawVideoData = {
|
||||||
url: window.location.origin + localUrl,
|
url: window.location.origin + localUrl,
|
||||||
headers: {}
|
headers: {}
|
||||||
|
|||||||
@@ -649,6 +649,7 @@ const AnimePlayer = (function() {
|
|||||||
}
|
}
|
||||||
if (currentExt === 'local') {
|
if (currentExt === 'local') {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const localId = await getLocalEntryId();
|
const localId = await getLocalEntryId();
|
||||||
if (!localId) {
|
if (!localId) {
|
||||||
setLoading("Local entry not found in library.");
|
setLoading("Local entry not found in library.");
|
||||||
@@ -658,11 +659,20 @@ const AnimePlayer = (function() {
|
|||||||
const eps = await check.json();
|
const eps = await check.json();
|
||||||
|
|
||||||
if (!eps.includes(_currentEpisode)) {
|
if (!eps.includes(_currentEpisode)) {
|
||||||
// 🔥 forzar online
|
|
||||||
els.extSelect.value = _entrySource;
|
els.extSelect.value = _entrySource;
|
||||||
return loadStream();
|
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 = {
|
_rawVideoData = {
|
||||||
url: window.location.origin + localUrl,
|
url: window.location.origin + localUrl,
|
||||||
headers: {}
|
headers: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user