fix: GPU flag stuff

This commit is contained in:
ThaUnknown 2024-04-14 17:32:52 +02:00
parent ad53734aff
commit 6abc544d01
3 changed files with 12 additions and 5 deletions

View file

@ -30,6 +30,7 @@
/** @type {{ airingAt: number; episode: number; }[]} */
let alEpisodes = episodeList
// fallback: pull episodes from airing schedule if anime doesn't have expected episode count
if (!(media.episodes && media.episodes === episodeCount && media.status === 'FINISHED')) {
const settled = (await anilistClient.episodes({ id })).data.Page?.airingSchedules
if (settled?.length) alEpisodes = settled
@ -37,6 +38,7 @@
for (const { episode, airingAt } of alEpisodes) {
const alDate = new Date((airingAt || 0) * 1000)
// validate by air date if the anime has specials AND doesn't have matching episode count
const needsValidation = !(!specialCount || (media.episodes && media.episodes === episodeCount && episodes[Number(episode)]))
const { image, summary, rating, title, length, airdate } = needsValidation ? episodeByAirDate(alDate, episodes, episode) : (episodes[Number(episode)] || {})

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "5.0.6",
"version": "5.0.7",
"private": true,
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"description": "Stream anime torrents, real-time with no waiting for downloads.",

View file

@ -4,18 +4,23 @@ import store from './store.js'
export const development = process.env.NODE_ENV?.trim() === 'development'
const flags = [
// not sure if safe?
['disable-gpu-sandbox'],
// not sure if safe?
['disable-direct-composition-video-overlays'],
// not sure if safe?
['double-buffer-compositing'],
['enable-gpu-rasterization'],
// not sure if safe?
['enable-zero-copy'],
// not sure if safe?
['ignore-gpu-blocklist'],
['enable-hardware-overlays', 'single-fullscreen,single-on-top,underlay'],
// dv, drdc display compositor uses 2 gpu threads instead of 1, rest is safe performance
['enable-features', 'PlatformEncryptedDolbyVision,EnableDrDc,CanvasOopRasterization,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation'],
['force_high_performance_gpu'],
// disabling shit, vulkan rendering, native window occlusion calculation, widget layering aka right click context menus [I think] for macOS [I think]
['disable-features', 'Vulkan,CalculateNativeWinOcclusion,WidgetLayering'],
['autoplay-policy', 'no-user-gesture-required'], ['disable-notifications'], ['disable-logging'], ['disable-permissions-api'], ['no-sandbox'], ['no-zygote'],
['bypasscsp-schemes']
// utility stuff, aka website security that's useless for a native app:
['autoplay-policy', 'no-user-gesture-required'], ['disable-notifications'], ['disable-logging'], ['disable-permissions-api'], ['no-sandbox'], ['no-zygote'], ['bypasscsp-schemes']
]
for (const [flag, value] of flags) {
app.commandLine.appendSwitch(flag, value)