2024-05-15 13:31:41 +02:00
|
|
|
<template>
|
2024-05-15 17:04:19 +02:00
|
|
|
<div class="flex flex-col gap-3 mt-3 font-dm" style="-webkit-app-region: no-drag">
|
2024-06-21 16:27:58 +02:00
|
|
|
<div class="flex flex-col items-center p-3 bg-[#11111189] rounded-xl select-none">
|
|
|
|
<div class="text-sm mb-2">Default Language</div>
|
|
|
|
<select v-model="selectedLanguage" @change="selectLanguage()" class="bg-[#5c5b5b] w-full focus:outline-none px-3 py-2 rounded-xl text-sm text-center cursor-pointer">
|
|
|
|
<option value="en-US">English</option>
|
|
|
|
<option value="de-DE">Deutsch</option>
|
|
|
|
<option value="it-IT">Italiano</option>
|
|
|
|
<option value="es-419">Español</option>
|
|
|
|
<option value="es-ES">Español (España)</option>
|
|
|
|
<option value="fr-FR">Français (France)</option>
|
|
|
|
<option value="pt-BR">Português (Brasil)</option>
|
|
|
|
<option value="pt-PT">Português (Portugal)</option>
|
|
|
|
<option value="ru-RU">Русский</option>
|
|
|
|
<option value="ar-SA">العربية</option>
|
|
|
|
<option value="hi-IN">हिंदी</option>
|
|
|
|
</select>
|
|
|
|
<div class="text-xs mt-2"> For search, series and episode name </div>
|
|
|
|
</div>
|
2024-05-15 17:04:19 +02:00
|
|
|
<div class="flex flex-col items-center p-3 bg-[#11111189] rounded-xl select-none">
|
|
|
|
<div class="text-sm mb-2">Stream Endpoint</div>
|
|
|
|
<select v-model="selectedEndpoint" @change="selectEndpoint()" class="bg-[#5c5b5b] w-full focus:outline-none px-3 py-2 rounded-xl text-sm text-center cursor-pointer">
|
2024-06-19 13:13:28 +02:00
|
|
|
<option :value="1">Switch (DRM PROTECTED)</option>
|
2024-05-15 17:04:19 +02:00
|
|
|
<option :value="2">PS4 (DRM PROTECTED)</option>
|
|
|
|
<option :value="3">PS5 (DRM PROTECTED)</option>
|
|
|
|
<option :value="4">XBOX One (DRM PROTECTED)</option>
|
|
|
|
<option :value="5">Firefox (DRM PROTECTED)</option>
|
|
|
|
<option :value="6">Edge (DRM PROTECTED)</option>
|
2024-06-22 22:01:33 +02:00
|
|
|
<option :value="7">Chrome (DRM PROTECTED)</option>
|
|
|
|
<option :value="8">Web Fallback (DRM PROTECTED)</option>
|
2024-06-29 23:34:44 +02:00
|
|
|
<option :value="9">Android Phone (DRM PROTECTED)</option>
|
|
|
|
<option :value="10">Android Tablet (DRM PROTECTED)</option>
|
|
|
|
<option :value="11">Samsung TV (DRM PROTECTED)</option>
|
|
|
|
<option :value="12">Chromecast (DRM PROTECTED)</option>
|
|
|
|
<option :value="13">Fire TV (DRM PROTECTED)</option>
|
|
|
|
<option :value="14">Android TV (DRM PROTECTED)</option>
|
|
|
|
<option :value="15">LG TV (DRM PROTECTED)</option>
|
|
|
|
<option :value="16">Roku (DRM PROTECTED)</option>
|
2024-05-15 17:04:19 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
2024-06-25 01:43:33 +02:00
|
|
|
<div class="flex flex-col items-center p-3 bg-[#11111189] rounded-xl select-none">
|
|
|
|
<div class="text-sm mb-2">Subtitle Resampler (Experimental)</div>
|
|
|
|
<select v-model="selectedSubResampler" @change="setResampler()" class="bg-[#5c5b5b] w-full focus:outline-none px-3 py-2 rounded-xl text-sm text-center cursor-pointer">
|
2024-06-30 00:53:36 +02:00
|
|
|
<option :value="true">Enabled</option>
|
|
|
|
<option :value="false">Disabled</option>
|
2024-06-25 01:43:33 +02:00
|
|
|
</select>
|
|
|
|
<div class="text-xs mt-2"> Fixes broken crunchyroll subtitles </div>
|
|
|
|
</div>
|
2024-05-15 17:04:19 +02:00
|
|
|
</div>
|
2024-05-15 13:31:41 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2024-06-21 16:27:58 +02:00
|
|
|
const selectedLanguage = ref<string>()
|
2024-05-15 17:04:19 +02:00
|
|
|
const selectedEndpoint = ref<number>()
|
2024-06-25 01:43:33 +02:00
|
|
|
const selectedSubResampler = ref<boolean>()
|
2024-05-15 17:04:19 +02:00
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
;(window as any).myAPI.getEndpoint().then((result: any) => {
|
|
|
|
selectedEndpoint.value = result
|
|
|
|
})
|
2024-06-21 16:27:58 +02:00
|
|
|
;(window as any).myAPI.getDefaultCrunchyrollLanguage().then((result: any) => {
|
|
|
|
selectedLanguage.value = result
|
|
|
|
})
|
2024-06-25 01:43:33 +02:00
|
|
|
;(window as any).myAPI.getSubtitleResampler().then((result: boolean) => {
|
|
|
|
selectedSubResampler.value = result
|
|
|
|
})
|
2024-05-15 17:04:19 +02:00
|
|
|
})
|
|
|
|
|
2024-06-21 16:27:58 +02:00
|
|
|
const selectLanguage = () => {
|
|
|
|
if (process.client) {
|
|
|
|
;(window as any).myAPI.setDefaultCrunchyrollLanguage(selectedLanguage.value)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-15 17:04:19 +02:00
|
|
|
const selectEndpoint = () => {
|
|
|
|
if (process.client) {
|
|
|
|
;(window as any).myAPI.selectEndpoint(selectedEndpoint.value)
|
|
|
|
}
|
|
|
|
}
|
2024-06-25 01:43:33 +02:00
|
|
|
|
|
|
|
const setResampler = () => {
|
|
|
|
if (process.client) {
|
|
|
|
;(window as any).myAPI.setSubtitleResampler(selectedSubResampler.value)
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 13:31:41 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2024-05-15 17:04:19 +02:00
|
|
|
select {
|
|
|
|
background: url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>")
|
|
|
|
no-repeat;
|
|
|
|
background-position: calc(100% - 0.75rem) center !important;
|
|
|
|
background-color: #5c5b5b;
|
|
|
|
-moz-appearance: none !important;
|
|
|
|
-webkit-appearance: none !important;
|
|
|
|
appearance: none !important;
|
|
|
|
}
|
|
|
|
</style>
|