diff --git a/src/components/errors/cloudflare.vue b/src/components/errors/cloudflare.vue index d10c66ed..efaeac1f 100644 --- a/src/components/errors/cloudflare.vue +++ b/src/components/errors/cloudflare.vue @@ -32,7 +32,7 @@ no-caps outline rounded - @click="retry" + @click="reload" style="color: #00be06" >{{ t("thu-lai") }} @@ -53,6 +53,7 @@ const { t } = useI18n() function openAnimeVietsub() { window.open(C_URL) } +const reload = () => location.reload() diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index a2c9811a..e322b218 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -624,6 +624,7 @@
@@ -118,7 +118,7 @@
-
+

settingsStore.player.server, async (server) => { + loadedServerFB = false try { if (server === "DU") { if (typeCurrentConfig !== "DU") - // eslint-disable-next-line promise/catch-or-return PlayerLink(currentMetaChap).then((conf) => { // eslint-disable-next-line promise/always-return if (settingsStore.player.server === "DU") { @@ -1238,25 +1240,33 @@ watch( typeCurrentConfig = "DU" } }) + .catch(err => { + error.value =err + }) } if (server === "FB") { // PlayerFB は常に PlayerLink よりも遅いため、DU を使用して高速プリロード戦術を使用する必要があります。 if (typeCurrentConfig !== "DU") - // eslint-disable-next-line promise/catch-or-return PlayerLink(currentMetaChap).then((conf) => { // eslint-disable-next-line promise/always-return - if (settingsStore.player.server === "DU") { + if (!loadedServerFB && settingsStore.player.server === "DU") { configPlayer.value = conf typeCurrentConfig = "DU" } }) - // eslint-disable-next-line promise/catch-or-return + .catch(err => { + error.value =err + }) PlayerFB(currentMetaChap.id).then((conf) => { // eslint-disable-next-line promise/always-return if (settingsStore.player.server === "FB") { configPlayer.value = conf typeCurrentConfig = "FB" } + loadedServerFB = true + }) + .catch(err => { + error.value =err }) } } catch (err) {